diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 58388e428d6..5d49a234106 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -590,6 +590,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Prediction_service.stream_generate_content | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js,packages/google-cloud-aiplatform/samples/README.md) | | Prediction_service.streaming_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_predict.js,packages/google-cloud-aiplatform/samples/README.md) | | Prediction_service.streaming_raw_predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_raw_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.streaming_raw_predict.js,packages/google-cloud-aiplatform/samples/README.md) | +| Reasoning_engine_execution_service.query_reasoning_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js,packages/google-cloud-aiplatform/samples/README.md) | +| Reasoning_engine_service.create_reasoning_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js,packages/google-cloud-aiplatform/samples/README.md) | +| Reasoning_engine_service.delete_reasoning_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js,packages/google-cloud-aiplatform/samples/README.md) | +| Reasoning_engine_service.get_reasoning_engine | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js,packages/google-cloud-aiplatform/samples/README.md) | +| Reasoning_engine_service.list_reasoning_engines | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js,packages/google-cloud-aiplatform/samples/README.md) | | Schedule_service.create_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | | Schedule_service.delete_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.delete_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | | Schedule_service.get_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.get_schedule.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto index a6a2040ab00..53469fc74e0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store.proto @@ -60,6 +60,19 @@ message FeatureOnlineStore { AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED]; } + // Optimized storage type + message Optimized {} + + // The dedicated serving endpoint for this FeatureOnlineStore. Only need to + // set when you choose Optimized storage type. Public endpoint is provisioned + // by default. + message DedicatedServingEndpoint { + // Output only. This field will be populated with the domain name to use for + // this FeatureOnlineStore + string public_endpoint_domain_name = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Possible states a featureOnlineStore can have. enum State { // Default value. This value is unused. @@ -82,6 +95,13 @@ message FeatureOnlineStore { // to serve featureValues for all FeatureViews under this // FeatureOnlineStore. Bigtable bigtable = 8; + + // Contains settings for the Optimized store that will be created + // to serve featureValues for all FeatureViews under this + // FeatureOnlineStore. When choose Optimized storage type, need to set + // [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + // to use private endpoint. Otherwise will use public endpoint by default. + Optimized optimized = 12; } // Identifier. Name of the FeatureOnlineStore. Format: @@ -115,4 +135,9 @@ message FeatureOnlineStore { // Output only. State of the featureOnlineStore. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The dedicated serving endpoint for this FeatureOnlineStore, which + // is different from common Vertex service endpoint. + DedicatedServingEndpoint dedicated_serving_endpoint = 10 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store_service.proto index bb451126e2d..82667c2434a 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_online_store_service.proto @@ -141,6 +141,11 @@ message FetchFeatureValuesResponse { // Feature values in proto Struct format. google.protobuf.Struct proto_struct = 2; } + + // The data key associated with this response. + // Will only be populated for + // [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs. + FeatureViewDataKey data_key = 4; } // A query to find a number of similar entities. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto index 07b5b139d3c..03f080f0db4 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/feature_view.proto @@ -57,6 +57,85 @@ message FeatureView { string cron = 1; } + // Configuration for vector indexing. + message IndexConfig { + // Configuration options for using brute force search. + message BruteForceConfig {} + + // Configuration options for the tree-AH algorithm. + message TreeAHConfig { + // Optional. Number of embeddings on each leaf node. The default value is + // 1000 if not set. + optional int64 leaf_node_embedding_count = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The distance measure used in nearest neighbor search. + enum DistanceMeasureType { + // Should not be set. + DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + + // Euclidean (L_2) Distance. + SQUARED_L2_DISTANCE = 1; + + // Cosine Distance. Defined as 1 - cosine similarity. + // + // We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead + // of COSINE distance. Our algorithms have been more optimized for + // DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is + // mathematically equivalent to COSINE distance and results in the same + // ranking. + COSINE_DISTANCE = 2; + + // Dot Product Distance. Defined as a negative of the dot product. + DOT_PRODUCT_DISTANCE = 3; + } + + // The configuration with regard to the algorithms used for efficient + // search. + oneof algorithm_config { + // Optional. Configuration options for the tree-AH algorithm (Shallow tree + // + Asymmetric Hashing). Please refer to this paper for more details: + // https://arxiv.org/abs/1908.10396 + TreeAHConfig tree_ah_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration options for using brute force search, which + // simply implements the standard linear search in the database for each + // query. It is primarily meant for benchmarking and to generate the + // ground truth for approximate search. + BruteForceConfig brute_force_config = 7 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Column of embedding. This column contains the source data to + // create index for vector search. embedding_column must be set when using + // vector search. + string embedding_column = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Columns of features that're used to filter vector search + // results. + repeated string filter_columns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Column of crowding. This column contains crowding attribute + // which is a constraint on a neighbor list produced by + // [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + // to diversify search results. If + // [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + // is set to K in + // [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + // it's guaranteed that no more than K entities of the same crowding + // attribute are returned in the response. + string crowding_column = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of dimensions of the input embedding. + optional int32 embedding_dimension = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The distance measure used in nearest neighbor search. + DistanceMeasureType distance_measure_type = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + // A Feature Registry source for features that need to be synced to Online // Store. message FeatureRegistrySource { @@ -123,4 +202,10 @@ message FeatureView { // end of the sync the latest featureValues for each entityId of this // FeatureView are made ready for online serving. SyncConfig sync_config = 7; + + // Optional. Configuration for index preparation for vector search. It + // contains the required configurations to create an index from source data, + // so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + // performed during online serving. + IndexConfig index_config = 15 [(google.api.field_behavior) = OPTIONAL]; } 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 5eafeabf3bb..8e2e1cd1fc5 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 @@ -669,6 +669,9 @@ message GenerateContentRequest { // knowledge and scope of the model. repeated Tool tools = 6 [(google.api.field_behavior) = OPTIONAL]; + // Tool config. This config is shared for all tools provided in the request. + ToolConfig tool_config = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. repeated SafetySetting safety_settings = 3 diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto new file mode 100644 index 00000000000..96b97b7c0fd --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto @@ -0,0 +1,92 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// ReasoningEngine configurations +message ReasoningEngineSpec { + // User provided package spec like pickled object and package requirements. + message PackageSpec { + // Optional. The Cloud Storage URI of the pickled python object. + string pickle_object_gcs_uri = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of the dependency files in tar.gz format. + string dependency_files_gcs_uri = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage URI of the `requirements.txt` file + string requirements_gcs_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Python version. Currently support 3.8, 3.9, 3.10, 3.11. + // If not specified, default value is 3.10. + string python_version = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. User provided package spec of the ReasoningEngine. + PackageSpec package_spec = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Declarations for object class methods. + repeated google.protobuf.Struct class_methods = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// ReasoningEngine provides a customizable runtime for models to determine +// which actions to take and in which order. +message ReasoningEngine { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + pattern: "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}" + plural: "reasoningEngines" + singular: "reasoningEngine" + }; + + // Identifier. The resource name of the ReasoningEngine. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The display name of the ReasoningEngine. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The description of the ReasoningEngine. + string description = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Configurations of the ReasoningEngine + ReasoningEngineSpec spec = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Timestamp when this ReasoningEngine was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when this ReasoningEngine was most recently updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Used to perform consistent read-modify-write updates. If not set, + // a blind "overwrite" update happens. + string etag = 6 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto new file mode 100644 index 00000000000..a8768176f0e --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto @@ -0,0 +1,70 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineExecutionServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for executing queries on Reasoning Engine. +service ReasoningEngineExecutionService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Queries using a reasoning engine. + rpc QueryReasoningEngine(QueryReasoningEngineRequest) + returns (QueryReasoningEngineResponse) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}:query" + body: "*" + }; + } +} + +// Request message for [ReasoningEngineExecutionService.Query][]. +message QueryReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource to use. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; + + // Optional. Input content provided by users in JSON object format. Examples + // include text query, function calling parameters, media bytes, etc. + google.protobuf.Struct input = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [ReasoningEngineExecutionService.Query][] +message QueryReasoningEngineResponse { + // Response provided by users in JSON object format. + google.protobuf.Value output = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto new file mode 100644 index 00000000000..a8538695c7d --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto @@ -0,0 +1,173 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/operation.proto"; +import "google/cloud/aiplatform/v1beta1/reasoning_engine.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "ReasoningEngineServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for managing Vertex AI's Reasoning Engines. +service ReasoningEngineService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a reasoning engine. + rpc CreateReasoningEngine(CreateReasoningEngineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines" + body: "reasoning_engine" + }; + option (google.api.method_signature) = "parent,reasoning_engine"; + option (google.longrunning.operation_info) = { + response_type: "ReasoningEngine" + metadata_type: "CreateReasoningEngineOperationMetadata" + }; + } + + // Gets a reasoning engine. + rpc GetReasoningEngine(GetReasoningEngineRequest) returns (ReasoningEngine) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists reasoning engines in a location. + rpc ListReasoningEngines(ListReasoningEnginesRequest) + returns (ListReasoningEnginesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a reasoning engine. + rpc DeleteReasoningEngine(DeleteReasoningEngineRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } +} + +// Request message for +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine]. +message CreateReasoningEngineRequest { + // Required. The resource name of the Location to create the ReasoningEngine + // in. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The ReasoningEngine to create. + ReasoningEngine reasoning_engine = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Details of +// [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine] +// operation. +message CreateReasoningEngineOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Request message for +// [ReasoningEngineService.GetReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine]. +message GetReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; +} + +// Request message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines]. +message ListReasoningEnginesRequest { + // Required. The resource name of the Location to list the ReasoningEngines + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list filter. + // More detail in [AIP-160](https://google.aip.dev/160). + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines] +message ListReasoningEnginesResponse { + // List of ReasoningEngines in the requested page. + repeated ReasoningEngine reasoning_engines = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListReasoningEnginesRequest.page_token][google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [ReasoningEngineService.DeleteReasoningEngine][google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine]. +message DeleteReasoningEngineRequest { + // Required. The name of the ReasoningEngine resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/ReasoningEngine" + } + ]; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto index a88b2f13226..641d066c2a0 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tool.proto @@ -145,3 +145,38 @@ message GoogleSearchRetrieval { // generation. bool disable_attribution = 1 [(google.api.field_behavior) = OPTIONAL]; } + +// Tool config. This config is shared for all tools provided in the request. +message ToolConfig { + // Function calling config. + FunctionCallingConfig function_calling_config = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Function calling config. +message FunctionCallingConfig { + // Function calling mode. + enum Mode { + // Unspecified function calling mode. This value should not be used. + MODE_UNSPECIFIED = 0; + // Default model behavior, model decides to predict either a function call + // or a natural language repspose. + AUTO = 1; + // Model is constrained to always predicting a function call only. + // If "allowed_function_names" are set, the predicted function call will be + // limited to any one of "allowed_function_names", else the predicted + // function call will be any one of the provided "function_declarations". + ANY = 2; + // Model will not predict any function call. Model behavior is same as when + // not passing any function declarations. + NONE = 3; + } + // Function calling mode. + Mode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Function names to call. Only set when the Mode is ANY. Function names + // should match [FunctionDeclaration.name]. With mode set to ANY, model will + // predict a function call from the set of function names provided. + repeated string allowed_function_names = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 42be135f9fd..26118af3e4e 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -23552,6 +23552,9 @@ export namespace google { /** FeatureOnlineStore bigtable */ bigtable?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IBigtable|null); + /** FeatureOnlineStore optimized */ + optimized?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized|null); + /** FeatureOnlineStore name */ name?: (string|null); @@ -23569,6 +23572,9 @@ export namespace google { /** FeatureOnlineStore state */ state?: (google.cloud.aiplatform.v1.FeatureOnlineStore.State|keyof typeof google.cloud.aiplatform.v1.FeatureOnlineStore.State|null); + + /** FeatureOnlineStore dedicatedServingEndpoint */ + dedicatedServingEndpoint?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint|null); } /** Represents a FeatureOnlineStore. */ @@ -23583,6 +23589,9 @@ export namespace google { /** FeatureOnlineStore bigtable. */ public bigtable?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IBigtable|null); + /** FeatureOnlineStore optimized. */ + public optimized?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized|null); + /** FeatureOnlineStore name. */ public name: string; @@ -23601,8 +23610,11 @@ export namespace google { /** FeatureOnlineStore state. */ public state: (google.cloud.aiplatform.v1.FeatureOnlineStore.State|keyof typeof google.cloud.aiplatform.v1.FeatureOnlineStore.State); + /** FeatureOnlineStore dedicatedServingEndpoint. */ + public dedicatedServingEndpoint?: (google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint|null); + /** FeatureOnlineStore storageType. */ - public storageType?: "bigtable"; + public storageType?: ("bigtable"|"optimized"); /** * Creates a new FeatureOnlineStore instance using the specified properties. @@ -23893,6 +23905,194 @@ export namespace google { } } + /** Properties of an Optimized. */ + interface IOptimized { + } + + /** Represents an Optimized. */ + class Optimized implements IOptimized { + + /** + * Constructs a new Optimized. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized); + + /** + * Creates a new Optimized instance using the specified properties. + * @param [properties] Properties to set + * @returns Optimized instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized): google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized; + + /** + * Encodes the specified Optimized message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.verify|verify} messages. + * @param message Optimized message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Optimized message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.verify|verify} messages. + * @param message Optimized message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Optimized message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Optimized + * @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.FeatureOnlineStore.Optimized; + + /** + * Decodes an Optimized message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Optimized + * @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.FeatureOnlineStore.Optimized; + + /** + * Verifies an Optimized message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Optimized message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Optimized + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized; + + /** + * Creates a plain object from an Optimized message. Also converts values to other types if specified. + * @param message Optimized + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Optimized to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Optimized + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DedicatedServingEndpoint. */ + interface IDedicatedServingEndpoint { + + /** DedicatedServingEndpoint publicEndpointDomainName */ + publicEndpointDomainName?: (string|null); + } + + /** Represents a DedicatedServingEndpoint. */ + class DedicatedServingEndpoint implements IDedicatedServingEndpoint { + + /** + * Constructs a new DedicatedServingEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint); + + /** DedicatedServingEndpoint publicEndpointDomainName. */ + public publicEndpointDomainName: string; + + /** + * Creates a new DedicatedServingEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns DedicatedServingEndpoint instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint): google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint; + + /** + * Encodes the specified DedicatedServingEndpoint message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.verify|verify} messages. + * @param message DedicatedServingEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DedicatedServingEndpoint message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.verify|verify} messages. + * @param message DedicatedServingEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DedicatedServingEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DedicatedServingEndpoint + * @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.FeatureOnlineStore.DedicatedServingEndpoint; + + /** + * Decodes a DedicatedServingEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DedicatedServingEndpoint + * @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.FeatureOnlineStore.DedicatedServingEndpoint; + + /** + * Verifies a DedicatedServingEndpoint 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 DedicatedServingEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DedicatedServingEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint; + + /** + * Creates a plain object from a DedicatedServingEndpoint message. Also converts values to other types if specified. + * @param message DedicatedServingEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DedicatedServingEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DedicatedServingEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** State enum. */ enum State { STATE_UNSPECIFIED = 0, @@ -26399,6 +26599,9 @@ export namespace google { /** FeatureView syncConfig */ syncConfig?: (google.cloud.aiplatform.v1.FeatureView.ISyncConfig|null); + + /** FeatureView indexConfig */ + indexConfig?: (google.cloud.aiplatform.v1.FeatureView.IIndexConfig|null); } /** Represents a FeatureView. */ @@ -26434,6 +26637,9 @@ export namespace google { /** FeatureView syncConfig. */ public syncConfig?: (google.cloud.aiplatform.v1.FeatureView.ISyncConfig|null); + /** FeatureView indexConfig. */ + public indexConfig?: (google.cloud.aiplatform.v1.FeatureView.IIndexConfig|null); + /** FeatureView source. */ public source?: ("bigQuerySource"|"featureRegistrySource"); @@ -26717,6 +26923,347 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an IndexConfig. */ + interface IIndexConfig { + + /** IndexConfig treeAhConfig */ + treeAhConfig?: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig|null); + + /** IndexConfig bruteForceConfig */ + bruteForceConfig?: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig|null); + + /** IndexConfig embeddingColumn */ + embeddingColumn?: (string|null); + + /** IndexConfig filterColumns */ + filterColumns?: (string[]|null); + + /** IndexConfig crowdingColumn */ + crowdingColumn?: (string|null); + + /** IndexConfig embeddingDimension */ + embeddingDimension?: (number|null); + + /** IndexConfig distanceMeasureType */ + distanceMeasureType?: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType|keyof typeof google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType|null); + } + + /** Represents an IndexConfig. */ + class IndexConfig implements IIndexConfig { + + /** + * Constructs a new IndexConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FeatureView.IIndexConfig); + + /** IndexConfig treeAhConfig. */ + public treeAhConfig?: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig|null); + + /** IndexConfig bruteForceConfig. */ + public bruteForceConfig?: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig|null); + + /** IndexConfig embeddingColumn. */ + public embeddingColumn: string; + + /** IndexConfig filterColumns. */ + public filterColumns: string[]; + + /** IndexConfig crowdingColumn. */ + public crowdingColumn: string; + + /** IndexConfig embeddingDimension. */ + public embeddingDimension?: (number|null); + + /** IndexConfig distanceMeasureType. */ + public distanceMeasureType: (google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType|keyof typeof google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType); + + /** IndexConfig algorithmConfig. */ + public algorithmConfig?: ("treeAhConfig"|"bruteForceConfig"); + + /** IndexConfig _embeddingDimension. */ + public _embeddingDimension?: "embeddingDimension"; + + /** + * Creates a new IndexConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IndexConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FeatureView.IIndexConfig): google.cloud.aiplatform.v1.FeatureView.IndexConfig; + + /** + * Encodes the specified IndexConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.verify|verify} messages. + * @param message IndexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FeatureView.IIndexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IndexConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.verify|verify} messages. + * @param message IndexConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FeatureView.IIndexConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IndexConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IndexConfig + * @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.FeatureView.IndexConfig; + + /** + * Decodes an IndexConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IndexConfig + * @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.FeatureView.IndexConfig; + + /** + * Verifies an IndexConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IndexConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FeatureView.IndexConfig; + + /** + * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. + * @param message IndexConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IndexConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IndexConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IndexConfig { + + /** Properties of a BruteForceConfig. */ + interface IBruteForceConfig { + } + + /** Represents a BruteForceConfig. */ + class BruteForceConfig implements IBruteForceConfig { + + /** + * Constructs a new BruteForceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig); + + /** + * Creates a new BruteForceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BruteForceConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig): google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig; + + /** + * Encodes the specified BruteForceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.verify|verify} messages. + * @param message BruteForceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BruteForceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.verify|verify} messages. + * @param message BruteForceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BruteForceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BruteForceConfig + * @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.FeatureView.IndexConfig.BruteForceConfig; + + /** + * Decodes a BruteForceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BruteForceConfig + * @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.FeatureView.IndexConfig.BruteForceConfig; + + /** + * Verifies a BruteForceConfig 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 BruteForceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BruteForceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig; + + /** + * Creates a plain object from a BruteForceConfig message. Also converts values to other types if specified. + * @param message BruteForceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BruteForceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BruteForceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TreeAHConfig. */ + interface ITreeAHConfig { + + /** TreeAHConfig leafNodeEmbeddingCount */ + leafNodeEmbeddingCount?: (number|Long|string|null); + } + + /** Represents a TreeAHConfig. */ + class TreeAHConfig implements ITreeAHConfig { + + /** + * Constructs a new TreeAHConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig); + + /** TreeAHConfig leafNodeEmbeddingCount. */ + public leafNodeEmbeddingCount?: (number|Long|string|null); + + /** TreeAHConfig _leafNodeEmbeddingCount. */ + public _leafNodeEmbeddingCount?: "leafNodeEmbeddingCount"; + + /** + * Creates a new TreeAHConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TreeAHConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig): google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig; + + /** + * Encodes the specified TreeAHConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.verify|verify} messages. + * @param message TreeAHConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TreeAHConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.verify|verify} messages. + * @param message TreeAHConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TreeAHConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TreeAHConfig + * @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.FeatureView.IndexConfig.TreeAHConfig; + + /** + * Decodes a TreeAHConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TreeAHConfig + * @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.FeatureView.IndexConfig.TreeAHConfig; + + /** + * Verifies a TreeAHConfig 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 TreeAHConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TreeAHConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig; + + /** + * Creates a plain object from a TreeAHConfig message. Also converts values to other types if specified. + * @param message TreeAHConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TreeAHConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TreeAHConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DistanceMeasureType enum. */ + enum DistanceMeasureType { + DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0, + SQUARED_L2_DISTANCE = 1, + COSINE_DISTANCE = 2, + DOT_PRODUCT_DISTANCE = 3 + } + } + /** Properties of a FeatureRegistrySource. */ interface IFeatureRegistrySource { @@ -27553,6 +28100,9 @@ export namespace google { /** FetchFeatureValuesResponse protoStruct */ protoStruct?: (google.protobuf.IStruct|null); + + /** FetchFeatureValuesResponse dataKey */ + dataKey?: (google.cloud.aiplatform.v1.IFeatureViewDataKey|null); } /** Represents a FetchFeatureValuesResponse. */ @@ -27570,6 +28120,9 @@ export namespace google { /** FetchFeatureValuesResponse protoStruct. */ public protoStruct?: (google.protobuf.IStruct|null); + /** FetchFeatureValuesResponse dataKey. */ + public dataKey?: (google.cloud.aiplatform.v1.IFeatureViewDataKey|null); + /** FetchFeatureValuesResponse format. */ public format?: ("keyValues"|"protoStruct"); @@ -110158,6 +110711,217 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ToolConfig. */ + interface IToolConfig { + + /** ToolConfig functionCallingConfig */ + functionCallingConfig?: (google.cloud.aiplatform.v1beta1.IFunctionCallingConfig|null); + } + + /** Represents a ToolConfig. */ + class ToolConfig implements IToolConfig { + + /** + * Constructs a new ToolConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolConfig); + + /** ToolConfig functionCallingConfig. */ + public functionCallingConfig?: (google.cloud.aiplatform.v1beta1.IFunctionCallingConfig|null); + + /** + * Creates a new ToolConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolConfig): google.cloud.aiplatform.v1beta1.ToolConfig; + + /** + * Encodes the specified ToolConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolConfig.verify|verify} messages. + * @param message ToolConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolConfig.verify|verify} messages. + * @param message ToolConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ToolConfig; + + /** + * Decodes a ToolConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ToolConfig; + + /** + * Verifies a ToolConfig 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 ToolConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolConfig; + + /** + * Creates a plain object from a ToolConfig message. Also converts values to other types if specified. + * @param message ToolConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FunctionCallingConfig. */ + interface IFunctionCallingConfig { + + /** FunctionCallingConfig mode */ + mode?: (google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode|keyof typeof google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode|null); + + /** FunctionCallingConfig allowedFunctionNames */ + allowedFunctionNames?: (string[]|null); + } + + /** Represents a FunctionCallingConfig. */ + class FunctionCallingConfig implements IFunctionCallingConfig { + + /** + * Constructs a new FunctionCallingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFunctionCallingConfig); + + /** FunctionCallingConfig mode. */ + public mode: (google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode|keyof typeof google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode); + + /** FunctionCallingConfig allowedFunctionNames. */ + public allowedFunctionNames: string[]; + + /** + * Creates a new FunctionCallingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns FunctionCallingConfig instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFunctionCallingConfig): google.cloud.aiplatform.v1beta1.FunctionCallingConfig; + + /** + * Encodes the specified FunctionCallingConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionCallingConfig.verify|verify} messages. + * @param message FunctionCallingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFunctionCallingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FunctionCallingConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionCallingConfig.verify|verify} messages. + * @param message FunctionCallingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFunctionCallingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FunctionCallingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FunctionCallingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FunctionCallingConfig; + + /** + * Decodes a FunctionCallingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FunctionCallingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FunctionCallingConfig; + + /** + * Verifies a FunctionCallingConfig 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 FunctionCallingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FunctionCallingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FunctionCallingConfig; + + /** + * Creates a plain object from a FunctionCallingConfig message. Also converts values to other types if specified. + * @param message FunctionCallingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FunctionCallingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FunctionCallingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FunctionCallingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FunctionCallingConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + AUTO = 1, + ANY = 2, + NONE = 3 + } + } + /** Type enum. */ enum Type { TYPE_UNSPECIFIED = 0, @@ -178404,6 +179168,9 @@ export namespace google { /** GenerateContentRequest tools */ tools?: (google.cloud.aiplatform.v1beta1.ITool[]|null); + /** GenerateContentRequest toolConfig */ + toolConfig?: (google.cloud.aiplatform.v1beta1.IToolConfig|null); + /** GenerateContentRequest safetySettings */ safetySettings?: (google.cloud.aiplatform.v1beta1.ISafetySetting[]|null); @@ -178429,6 +179196,9 @@ export namespace google { /** GenerateContentRequest tools. */ public tools: google.cloud.aiplatform.v1beta1.ITool[]; + /** GenerateContentRequest toolConfig. */ + public toolConfig?: (google.cloud.aiplatform.v1beta1.IToolConfig|null); + /** GenerateContentRequest safetySettings. */ public safetySettings: google.cloud.aiplatform.v1beta1.ISafetySetting[]; @@ -178853,6 +179623,1325 @@ export namespace google { } } + /** Properties of a ReasoningEngineSpec. */ + interface IReasoningEngineSpec { + + /** ReasoningEngineSpec packageSpec */ + packageSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec|null); + + /** ReasoningEngineSpec classMethods */ + classMethods?: (google.protobuf.IStruct[]|null); + } + + /** Represents a ReasoningEngineSpec. */ + class ReasoningEngineSpec implements IReasoningEngineSpec { + + /** + * Constructs a new ReasoningEngineSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IReasoningEngineSpec); + + /** ReasoningEngineSpec packageSpec. */ + public packageSpec?: (google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec|null); + + /** ReasoningEngineSpec classMethods. */ + public classMethods: google.protobuf.IStruct[]; + + /** + * Creates a new ReasoningEngineSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ReasoningEngineSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IReasoningEngineSpec): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec; + + /** + * Encodes the specified ReasoningEngineSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.verify|verify} messages. + * @param message ReasoningEngineSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IReasoningEngineSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReasoningEngineSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.verify|verify} messages. + * @param message ReasoningEngineSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReasoningEngineSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReasoningEngineSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReasoningEngineSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec; + + /** + * Decodes a ReasoningEngineSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReasoningEngineSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec; + + /** + * Verifies a ReasoningEngineSpec 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 ReasoningEngineSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReasoningEngineSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec; + + /** + * Creates a plain object from a ReasoningEngineSpec message. Also converts values to other types if specified. + * @param message ReasoningEngineSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReasoningEngineSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReasoningEngineSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReasoningEngineSpec { + + /** Properties of a PackageSpec. */ + interface IPackageSpec { + + /** PackageSpec pickleObjectGcsUri */ + pickleObjectGcsUri?: (string|null); + + /** PackageSpec dependencyFilesGcsUri */ + dependencyFilesGcsUri?: (string|null); + + /** PackageSpec requirementsGcsUri */ + requirementsGcsUri?: (string|null); + + /** PackageSpec pythonVersion */ + pythonVersion?: (string|null); + } + + /** Represents a PackageSpec. */ + class PackageSpec implements IPackageSpec { + + /** + * Constructs a new PackageSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec); + + /** PackageSpec pickleObjectGcsUri. */ + public pickleObjectGcsUri: string; + + /** PackageSpec dependencyFilesGcsUri. */ + public dependencyFilesGcsUri: string; + + /** PackageSpec requirementsGcsUri. */ + public requirementsGcsUri: string; + + /** PackageSpec pythonVersion. */ + public pythonVersion: string; + + /** + * Creates a new PackageSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns PackageSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec; + + /** + * Encodes the specified PackageSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.verify|verify} messages. + * @param message PackageSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PackageSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.verify|verify} messages. + * @param message PackageSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PackageSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PackageSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec; + + /** + * Decodes a PackageSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PackageSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec; + + /** + * Verifies a PackageSpec 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 PackageSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PackageSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec; + + /** + * Creates a plain object from a PackageSpec message. Also converts values to other types if specified. + * @param message PackageSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PackageSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PackageSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReasoningEngine. */ + interface IReasoningEngine { + + /** ReasoningEngine name */ + name?: (string|null); + + /** ReasoningEngine displayName */ + displayName?: (string|null); + + /** ReasoningEngine description */ + description?: (string|null); + + /** ReasoningEngine spec */ + spec?: (google.cloud.aiplatform.v1beta1.IReasoningEngineSpec|null); + + /** ReasoningEngine createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ReasoningEngine updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ReasoningEngine etag */ + etag?: (string|null); + } + + /** Represents a ReasoningEngine. */ + class ReasoningEngine implements IReasoningEngine { + + /** + * Constructs a new ReasoningEngine. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IReasoningEngine); + + /** ReasoningEngine name. */ + public name: string; + + /** ReasoningEngine displayName. */ + public displayName: string; + + /** ReasoningEngine description. */ + public description: string; + + /** ReasoningEngine spec. */ + public spec?: (google.cloud.aiplatform.v1beta1.IReasoningEngineSpec|null); + + /** ReasoningEngine createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ReasoningEngine updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ReasoningEngine etag. */ + public etag: string; + + /** + * Creates a new ReasoningEngine instance using the specified properties. + * @param [properties] Properties to set + * @returns ReasoningEngine instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IReasoningEngine): google.cloud.aiplatform.v1beta1.ReasoningEngine; + + /** + * Encodes the specified ReasoningEngine message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngine.verify|verify} messages. + * @param message ReasoningEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IReasoningEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReasoningEngine message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngine.verify|verify} messages. + * @param message ReasoningEngine message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IReasoningEngine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReasoningEngine message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReasoningEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ReasoningEngine; + + /** + * Decodes a ReasoningEngine message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReasoningEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ReasoningEngine; + + /** + * Verifies a ReasoningEngine 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 ReasoningEngine message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReasoningEngine + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ReasoningEngine; + + /** + * Creates a plain object from a ReasoningEngine message. Also converts values to other types if specified. + * @param message ReasoningEngine + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ReasoningEngine, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReasoningEngine to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReasoningEngine + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReasoningEngineExecutionService */ + class ReasoningEngineExecutionService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReasoningEngineExecutionService 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 ReasoningEngineExecutionService 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): ReasoningEngineExecutionService; + + /** + * Calls QueryReasoningEngine. + * @param request QueryReasoningEngineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryReasoningEngineResponse + */ + public queryReasoningEngine(request: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, callback: google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngineCallback): void; + + /** + * Calls QueryReasoningEngine. + * @param request QueryReasoningEngineRequest message or plain object + * @returns Promise + */ + public queryReasoningEngine(request: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest): Promise; + } + + namespace ReasoningEngineExecutionService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService|queryReasoningEngine}. + * @param error Error, if any + * @param [response] QueryReasoningEngineResponse + */ + type QueryReasoningEngineCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse) => void; + } + + /** Properties of a QueryReasoningEngineRequest. */ + interface IQueryReasoningEngineRequest { + + /** QueryReasoningEngineRequest name */ + name?: (string|null); + + /** QueryReasoningEngineRequest input */ + input?: (google.protobuf.IStruct|null); + } + + /** Represents a QueryReasoningEngineRequest. */ + class QueryReasoningEngineRequest implements IQueryReasoningEngineRequest { + + /** + * Constructs a new QueryReasoningEngineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest); + + /** QueryReasoningEngineRequest name. */ + public name: string; + + /** QueryReasoningEngineRequest input. */ + public input?: (google.protobuf.IStruct|null); + + /** + * Creates a new QueryReasoningEngineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReasoningEngineRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest): google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest; + + /** + * Encodes the specified QueryReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.verify|verify} messages. + * @param message QueryReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.verify|verify} messages. + * @param message QueryReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReasoningEngineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest; + + /** + * Decodes a QueryReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest; + + /** + * Verifies a QueryReasoningEngineRequest 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 QueryReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReasoningEngineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest; + + /** + * Creates a plain object from a QueryReasoningEngineRequest message. Also converts values to other types if specified. + * @param message QueryReasoningEngineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReasoningEngineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReasoningEngineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryReasoningEngineResponse. */ + interface IQueryReasoningEngineResponse { + + /** QueryReasoningEngineResponse output */ + output?: (google.protobuf.IValue|null); + } + + /** Represents a QueryReasoningEngineResponse. */ + class QueryReasoningEngineResponse implements IQueryReasoningEngineResponse { + + /** + * Constructs a new QueryReasoningEngineResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse); + + /** QueryReasoningEngineResponse output. */ + public output?: (google.protobuf.IValue|null); + + /** + * Creates a new QueryReasoningEngineResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryReasoningEngineResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse): google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse; + + /** + * Encodes the specified QueryReasoningEngineResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.verify|verify} messages. + * @param message QueryReasoningEngineResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryReasoningEngineResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.verify|verify} messages. + * @param message QueryReasoningEngineResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryReasoningEngineResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryReasoningEngineResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse; + + /** + * Decodes a QueryReasoningEngineResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryReasoningEngineResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse; + + /** + * Verifies a QueryReasoningEngineResponse 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 QueryReasoningEngineResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryReasoningEngineResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse; + + /** + * Creates a plain object from a QueryReasoningEngineResponse message. Also converts values to other types if specified. + * @param message QueryReasoningEngineResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryReasoningEngineResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryReasoningEngineResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReasoningEngineService */ + class ReasoningEngineService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReasoningEngineService 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 ReasoningEngineService 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): ReasoningEngineService; + + /** + * Calls CreateReasoningEngine. + * @param request CreateReasoningEngineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReasoningEngine(request: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, callback: google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngineCallback): void; + + /** + * Calls CreateReasoningEngine. + * @param request CreateReasoningEngineRequest message or plain object + * @returns Promise + */ + public createReasoningEngine(request: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest): Promise; + + /** + * Calls GetReasoningEngine. + * @param request GetReasoningEngineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReasoningEngine + */ + public getReasoningEngine(request: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, callback: google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngineCallback): void; + + /** + * Calls GetReasoningEngine. + * @param request GetReasoningEngineRequest message or plain object + * @returns Promise + */ + public getReasoningEngine(request: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest): Promise; + + /** + * Calls ListReasoningEngines. + * @param request ListReasoningEnginesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReasoningEnginesResponse + */ + public listReasoningEngines(request: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, callback: google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEnginesCallback): void; + + /** + * Calls ListReasoningEngines. + * @param request ListReasoningEnginesRequest message or plain object + * @returns Promise + */ + public listReasoningEngines(request: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest): Promise; + + /** + * Calls DeleteReasoningEngine. + * @param request DeleteReasoningEngineRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteReasoningEngine(request: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, callback: google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngineCallback): void; + + /** + * Calls DeleteReasoningEngine. + * @param request DeleteReasoningEngineRequest message or plain object + * @returns Promise + */ + public deleteReasoningEngine(request: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest): Promise; + } + + namespace ReasoningEngineService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|createReasoningEngine}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReasoningEngineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|getReasoningEngine}. + * @param error Error, if any + * @param [response] ReasoningEngine + */ + type GetReasoningEngineCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ReasoningEngine) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|listReasoningEngines}. + * @param error Error, if any + * @param [response] ListReasoningEnginesResponse + */ + type ListReasoningEnginesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse) => void; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|deleteReasoningEngine}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteReasoningEngineCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateReasoningEngineRequest. */ + interface ICreateReasoningEngineRequest { + + /** CreateReasoningEngineRequest parent */ + parent?: (string|null); + + /** CreateReasoningEngineRequest reasoningEngine */ + reasoningEngine?: (google.cloud.aiplatform.v1beta1.IReasoningEngine|null); + } + + /** Represents a CreateReasoningEngineRequest. */ + class CreateReasoningEngineRequest implements ICreateReasoningEngineRequest { + + /** + * Constructs a new CreateReasoningEngineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest); + + /** CreateReasoningEngineRequest parent. */ + public parent: string; + + /** CreateReasoningEngineRequest reasoningEngine. */ + public reasoningEngine?: (google.cloud.aiplatform.v1beta1.IReasoningEngine|null); + + /** + * Creates a new CreateReasoningEngineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReasoningEngineRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest): google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest; + + /** + * Encodes the specified CreateReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.verify|verify} messages. + * @param message CreateReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.verify|verify} messages. + * @param message CreateReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReasoningEngineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest; + + /** + * Decodes a CreateReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest; + + /** + * Verifies a CreateReasoningEngineRequest 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 CreateReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReasoningEngineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest; + + /** + * Creates a plain object from a CreateReasoningEngineRequest message. Also converts values to other types if specified. + * @param message CreateReasoningEngineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReasoningEngineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReasoningEngineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateReasoningEngineOperationMetadata. */ + interface ICreateReasoningEngineOperationMetadata { + + /** CreateReasoningEngineOperationMetadata genericMetadata */ + genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + } + + /** Represents a CreateReasoningEngineOperationMetadata. */ + class CreateReasoningEngineOperationMetadata implements ICreateReasoningEngineOperationMetadata { + + /** + * Constructs a new CreateReasoningEngineOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata); + + /** CreateReasoningEngineOperationMetadata genericMetadata. */ + public genericMetadata?: (google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null); + + /** + * Creates a new CreateReasoningEngineOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReasoningEngineOperationMetadata instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata): google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata; + + /** + * Encodes the specified CreateReasoningEngineOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.verify|verify} messages. + * @param message CreateReasoningEngineOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReasoningEngineOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.verify|verify} messages. + * @param message CreateReasoningEngineOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReasoningEngineOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReasoningEngineOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata; + + /** + * Decodes a CreateReasoningEngineOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReasoningEngineOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata; + + /** + * Verifies a CreateReasoningEngineOperationMetadata 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 CreateReasoningEngineOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReasoningEngineOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata; + + /** + * Creates a plain object from a CreateReasoningEngineOperationMetadata message. Also converts values to other types if specified. + * @param message CreateReasoningEngineOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReasoningEngineOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateReasoningEngineOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetReasoningEngineRequest. */ + interface IGetReasoningEngineRequest { + + /** GetReasoningEngineRequest name */ + name?: (string|null); + } + + /** Represents a GetReasoningEngineRequest. */ + class GetReasoningEngineRequest implements IGetReasoningEngineRequest { + + /** + * Constructs a new GetReasoningEngineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest); + + /** GetReasoningEngineRequest name. */ + public name: string; + + /** + * Creates a new GetReasoningEngineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReasoningEngineRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest): google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest; + + /** + * Encodes the specified GetReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest.verify|verify} messages. + * @param message GetReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest.verify|verify} messages. + * @param message GetReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReasoningEngineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest; + + /** + * Decodes a GetReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest; + + /** + * Verifies a GetReasoningEngineRequest 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 GetReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReasoningEngineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest; + + /** + * Creates a plain object from a GetReasoningEngineRequest message. Also converts values to other types if specified. + * @param message GetReasoningEngineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReasoningEngineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReasoningEngineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReasoningEnginesRequest. */ + interface IListReasoningEnginesRequest { + + /** ListReasoningEnginesRequest parent */ + parent?: (string|null); + + /** ListReasoningEnginesRequest filter */ + filter?: (string|null); + + /** ListReasoningEnginesRequest pageSize */ + pageSize?: (number|null); + + /** ListReasoningEnginesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListReasoningEnginesRequest. */ + class ListReasoningEnginesRequest implements IListReasoningEnginesRequest { + + /** + * Constructs a new ListReasoningEnginesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest); + + /** ListReasoningEnginesRequest parent. */ + public parent: string; + + /** ListReasoningEnginesRequest filter. */ + public filter: string; + + /** ListReasoningEnginesRequest pageSize. */ + public pageSize: number; + + /** ListReasoningEnginesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListReasoningEnginesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReasoningEnginesRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest): google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest; + + /** + * Encodes the specified ListReasoningEnginesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.verify|verify} messages. + * @param message ListReasoningEnginesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReasoningEnginesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.verify|verify} messages. + * @param message ListReasoningEnginesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReasoningEnginesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReasoningEnginesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest; + + /** + * Decodes a ListReasoningEnginesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReasoningEnginesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest; + + /** + * Verifies a ListReasoningEnginesRequest 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 ListReasoningEnginesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReasoningEnginesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest; + + /** + * Creates a plain object from a ListReasoningEnginesRequest message. Also converts values to other types if specified. + * @param message ListReasoningEnginesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReasoningEnginesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReasoningEnginesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReasoningEnginesResponse. */ + interface IListReasoningEnginesResponse { + + /** ListReasoningEnginesResponse reasoningEngines */ + reasoningEngines?: (google.cloud.aiplatform.v1beta1.IReasoningEngine[]|null); + + /** ListReasoningEnginesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListReasoningEnginesResponse. */ + class ListReasoningEnginesResponse implements IListReasoningEnginesResponse { + + /** + * Constructs a new ListReasoningEnginesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse); + + /** ListReasoningEnginesResponse reasoningEngines. */ + public reasoningEngines: google.cloud.aiplatform.v1beta1.IReasoningEngine[]; + + /** ListReasoningEnginesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListReasoningEnginesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReasoningEnginesResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse): google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse; + + /** + * Encodes the specified ListReasoningEnginesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.verify|verify} messages. + * @param message ListReasoningEnginesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReasoningEnginesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.verify|verify} messages. + * @param message ListReasoningEnginesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReasoningEnginesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReasoningEnginesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse; + + /** + * Decodes a ListReasoningEnginesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReasoningEnginesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse; + + /** + * Verifies a ListReasoningEnginesResponse 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 ListReasoningEnginesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReasoningEnginesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse; + + /** + * Creates a plain object from a ListReasoningEnginesResponse message. Also converts values to other types if specified. + * @param message ListReasoningEnginesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReasoningEnginesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReasoningEnginesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteReasoningEngineRequest. */ + interface IDeleteReasoningEngineRequest { + + /** DeleteReasoningEngineRequest name */ + name?: (string|null); + } + + /** Represents a DeleteReasoningEngineRequest. */ + class DeleteReasoningEngineRequest implements IDeleteReasoningEngineRequest { + + /** + * Constructs a new DeleteReasoningEngineRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest); + + /** DeleteReasoningEngineRequest name. */ + public name: string; + + /** + * Creates a new DeleteReasoningEngineRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteReasoningEngineRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest): google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest; + + /** + * Encodes the specified DeleteReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest.verify|verify} messages. + * @param message DeleteReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest.verify|verify} messages. + * @param message DeleteReasoningEngineRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteReasoningEngineRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest; + + /** + * Decodes a DeleteReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest; + + /** + * Verifies a DeleteReasoningEngineRequest 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 DeleteReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteReasoningEngineRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest; + + /** + * Creates a plain object from a DeleteReasoningEngineRequest message. Also converts values to other types if specified. + * @param message DeleteReasoningEngineRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteReasoningEngineRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteReasoningEngineRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a Schedule. */ interface ISchedule { diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index 8e5b67ed7ea..e0b417cae38 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -60041,12 +60041,14 @@ * @memberof google.cloud.aiplatform.v1 * @interface IFeatureOnlineStore * @property {google.cloud.aiplatform.v1.FeatureOnlineStore.IBigtable|null} [bigtable] FeatureOnlineStore bigtable + * @property {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized|null} [optimized] FeatureOnlineStore optimized * @property {string|null} [name] FeatureOnlineStore name * @property {google.protobuf.ITimestamp|null} [createTime] FeatureOnlineStore createTime * @property {google.protobuf.ITimestamp|null} [updateTime] FeatureOnlineStore updateTime * @property {string|null} [etag] FeatureOnlineStore etag * @property {Object.|null} [labels] FeatureOnlineStore labels * @property {google.cloud.aiplatform.v1.FeatureOnlineStore.State|null} [state] FeatureOnlineStore state + * @property {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint|null} [dedicatedServingEndpoint] FeatureOnlineStore dedicatedServingEndpoint */ /** @@ -60073,6 +60075,14 @@ */ FeatureOnlineStore.prototype.bigtable = null; + /** + * FeatureOnlineStore optimized. + * @member {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized|null|undefined} optimized + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @instance + */ + FeatureOnlineStore.prototype.optimized = null; + /** * FeatureOnlineStore name. * @member {string} name @@ -60121,17 +60131,25 @@ */ FeatureOnlineStore.prototype.state = 0; + /** + * FeatureOnlineStore dedicatedServingEndpoint. + * @member {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint|null|undefined} dedicatedServingEndpoint + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @instance + */ + FeatureOnlineStore.prototype.dedicatedServingEndpoint = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * FeatureOnlineStore storageType. - * @member {"bigtable"|undefined} storageType + * @member {"bigtable"|"optimized"|undefined} storageType * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore * @instance */ Object.defineProperty(FeatureOnlineStore.prototype, "storageType", { - get: $util.oneOfGetter($oneOfFields = ["bigtable"]), + get: $util.oneOfGetter($oneOfFields = ["bigtable", "optimized"]), set: $util.oneOfSetter($oneOfFields) }); @@ -60174,6 +60192,10 @@ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); if (message.bigtable != null && Object.hasOwnProperty.call(message, "bigtable")) $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.encode(message.bigtable, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dedicatedServingEndpoint != null && Object.hasOwnProperty.call(message, "dedicatedServingEndpoint")) + $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.encode(message.dedicatedServingEndpoint, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.optimized != null && Object.hasOwnProperty.call(message, "optimized")) + $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.encode(message.optimized, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -60212,6 +60234,10 @@ message.bigtable = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.decode(reader, reader.uint32()); break; } + case 12: { + message.optimized = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.decode(reader, reader.uint32()); + break; + } case 1: { message.name = reader.string(); break; @@ -60255,6 +60281,10 @@ message.state = reader.int32(); break; } + case 10: { + message.dedicatedServingEndpoint = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -60299,6 +60329,16 @@ return "bigtable." + error; } } + if (message.optimized != null && message.hasOwnProperty("optimized")) { + if (properties.storageType === 1) + return "storageType: multiple values"; + properties.storageType = 1; + { + var error = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.verify(message.optimized); + if (error) + return "optimized." + error; + } + } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -60332,6 +60372,11 @@ case 2: break; } + if (message.dedicatedServingEndpoint != null && message.hasOwnProperty("dedicatedServingEndpoint")) { + var error = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.verify(message.dedicatedServingEndpoint); + if (error) + return "dedicatedServingEndpoint." + error; + } return null; }; @@ -60352,6 +60397,11 @@ throw TypeError(".google.cloud.aiplatform.v1.FeatureOnlineStore.bigtable: object expected"); message.bigtable = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Bigtable.fromObject(object.bigtable); } + if (object.optimized != null) { + if (typeof object.optimized !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureOnlineStore.optimized: object expected"); + message.optimized = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.fromObject(object.optimized); + } if (object.name != null) message.name = String(object.name); if (object.createTime != null) { @@ -60393,6 +60443,11 @@ message.state = 2; break; } + if (object.dedicatedServingEndpoint != null) { + if (typeof object.dedicatedServingEndpoint !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureOnlineStore.dedicatedServingEndpoint: object expected"); + message.dedicatedServingEndpoint = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.fromObject(object.dedicatedServingEndpoint); + } return message; }; @@ -60417,6 +60472,7 @@ object.updateTime = null; object.etag = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.dedicatedServingEndpoint = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -60439,6 +60495,13 @@ if (options.oneofs) object.storageType = "bigtable"; } + if (message.dedicatedServingEndpoint != null && message.hasOwnProperty("dedicatedServingEndpoint")) + object.dedicatedServingEndpoint = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.toObject(message.dedicatedServingEndpoint, options); + if (message.optimized != null && message.hasOwnProperty("optimized")) { + object.optimized = $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.toObject(message.optimized, options); + if (options.oneofs) + object.storageType = "optimized"; + } return object; }; @@ -60926,6 +60989,384 @@ return Bigtable; })(); + FeatureOnlineStore.Optimized = (function() { + + /** + * Properties of an Optimized. + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @interface IOptimized + */ + + /** + * Constructs a new Optimized. + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @classdesc Represents an Optimized. + * @implements IOptimized + * @constructor + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized=} [properties] Properties to set + */ + function Optimized(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Optimized instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized} Optimized instance + */ + Optimized.create = function create(properties) { + return new Optimized(properties); + }; + + /** + * Encodes the specified Optimized message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized} message Optimized message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Optimized.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Optimized message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IOptimized} message Optimized message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Optimized.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Optimized message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @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.FeatureOnlineStore.Optimized} Optimized + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Optimized.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.FeatureOnlineStore.Optimized(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Optimized message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized} Optimized + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Optimized.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Optimized message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Optimized.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Optimized message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized} Optimized + */ + Optimized.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized) + return object; + return new $root.google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized(); + }; + + /** + * Creates a plain object from an Optimized message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized} message Optimized + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Optimized.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Optimized to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @instance + * @returns {Object.} JSON object + */ + Optimized.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Optimized + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Optimized.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized"; + }; + + return Optimized; + })(); + + FeatureOnlineStore.DedicatedServingEndpoint = (function() { + + /** + * Properties of a DedicatedServingEndpoint. + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @interface IDedicatedServingEndpoint + * @property {string|null} [publicEndpointDomainName] DedicatedServingEndpoint publicEndpointDomainName + */ + + /** + * Constructs a new DedicatedServingEndpoint. + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore + * @classdesc Represents a DedicatedServingEndpoint. + * @implements IDedicatedServingEndpoint + * @constructor + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint=} [properties] Properties to set + */ + function DedicatedServingEndpoint(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]]; + } + + /** + * DedicatedServingEndpoint publicEndpointDomainName. + * @member {string} publicEndpointDomainName + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @instance + */ + DedicatedServingEndpoint.prototype.publicEndpointDomainName = ""; + + /** + * Creates a new DedicatedServingEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint} DedicatedServingEndpoint instance + */ + DedicatedServingEndpoint.create = function create(properties) { + return new DedicatedServingEndpoint(properties); + }; + + /** + * Encodes the specified DedicatedServingEndpoint message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint} message DedicatedServingEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DedicatedServingEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicEndpointDomainName != null && Object.hasOwnProperty.call(message, "publicEndpointDomainName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicEndpointDomainName); + return writer; + }; + + /** + * Encodes the specified DedicatedServingEndpoint message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.IDedicatedServingEndpoint} message DedicatedServingEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DedicatedServingEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DedicatedServingEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @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.FeatureOnlineStore.DedicatedServingEndpoint} DedicatedServingEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DedicatedServingEndpoint.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.FeatureOnlineStore.DedicatedServingEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.publicEndpointDomainName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DedicatedServingEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint} DedicatedServingEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DedicatedServingEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DedicatedServingEndpoint message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DedicatedServingEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicEndpointDomainName != null && message.hasOwnProperty("publicEndpointDomainName")) + if (!$util.isString(message.publicEndpointDomainName)) + return "publicEndpointDomainName: string expected"; + return null; + }; + + /** + * Creates a DedicatedServingEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint} DedicatedServingEndpoint + */ + DedicatedServingEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint) + return object; + var message = new $root.google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint(); + if (object.publicEndpointDomainName != null) + message.publicEndpointDomainName = String(object.publicEndpointDomainName); + return message; + }; + + /** + * Creates a plain object from a DedicatedServingEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint} message DedicatedServingEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DedicatedServingEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.publicEndpointDomainName = ""; + if (message.publicEndpointDomainName != null && message.hasOwnProperty("publicEndpointDomainName")) + object.publicEndpointDomainName = message.publicEndpointDomainName; + return object; + }; + + /** + * Converts this DedicatedServingEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @instance + * @returns {Object.} JSON object + */ + DedicatedServingEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DedicatedServingEndpoint + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DedicatedServingEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint"; + }; + + return DedicatedServingEndpoint; + })(); + /** * State enum. * @name google.cloud.aiplatform.v1.FeatureOnlineStore.State @@ -66339,6 +66780,7 @@ * @property {string|null} [etag] FeatureView etag * @property {Object.|null} [labels] FeatureView labels * @property {google.cloud.aiplatform.v1.FeatureView.ISyncConfig|null} [syncConfig] FeatureView syncConfig + * @property {google.cloud.aiplatform.v1.FeatureView.IIndexConfig|null} [indexConfig] FeatureView indexConfig */ /** @@ -66421,6 +66863,14 @@ */ FeatureView.prototype.syncConfig = null; + /** + * FeatureView indexConfig. + * @member {google.cloud.aiplatform.v1.FeatureView.IIndexConfig|null|undefined} indexConfig + * @memberof google.cloud.aiplatform.v1.FeatureView + * @instance + */ + FeatureView.prototype.indexConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -66476,6 +66926,8 @@ $root.google.cloud.aiplatform.v1.FeatureView.SyncConfig.encode(message.syncConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.featureRegistrySource != null && Object.hasOwnProperty.call(message, "featureRegistrySource")) $root.google.cloud.aiplatform.v1.FeatureView.FeatureRegistrySource.encode(message.featureRegistrySource, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.indexConfig != null && Object.hasOwnProperty.call(message, "indexConfig")) + $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.encode(message.indexConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); return writer; }; @@ -66561,6 +67013,10 @@ message.syncConfig = $root.google.cloud.aiplatform.v1.FeatureView.SyncConfig.decode(reader, reader.uint32()); break; } + case 15: { + message.indexConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -66644,6 +67100,11 @@ if (error) return "syncConfig." + error; } + if (message.indexConfig != null && message.hasOwnProperty("indexConfig")) { + var error = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.verify(message.indexConfig); + if (error) + return "indexConfig." + error; + } return null; }; @@ -66695,6 +67156,11 @@ throw TypeError(".google.cloud.aiplatform.v1.FeatureView.syncConfig: object expected"); message.syncConfig = $root.google.cloud.aiplatform.v1.FeatureView.SyncConfig.fromObject(object.syncConfig); } + if (object.indexConfig != null) { + if (typeof object.indexConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureView.indexConfig: object expected"); + message.indexConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.fromObject(object.indexConfig); + } return message; }; @@ -66719,6 +67185,7 @@ object.updateTime = null; object.etag = ""; object.syncConfig = null; + object.indexConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -66746,6 +67213,8 @@ if (options.oneofs) object.source = "featureRegistrySource"; } + if (message.indexConfig != null && message.hasOwnProperty("indexConfig")) + object.indexConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.toObject(message.indexConfig, options); return object; }; @@ -67221,6 +67690,870 @@ return SyncConfig; })(); + FeatureView.IndexConfig = (function() { + + /** + * Properties of an IndexConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView + * @interface IIndexConfig + * @property {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig|null} [treeAhConfig] IndexConfig treeAhConfig + * @property {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig|null} [bruteForceConfig] IndexConfig bruteForceConfig + * @property {string|null} [embeddingColumn] IndexConfig embeddingColumn + * @property {Array.|null} [filterColumns] IndexConfig filterColumns + * @property {string|null} [crowdingColumn] IndexConfig crowdingColumn + * @property {number|null} [embeddingDimension] IndexConfig embeddingDimension + * @property {google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType|null} [distanceMeasureType] IndexConfig distanceMeasureType + */ + + /** + * Constructs a new IndexConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView + * @classdesc Represents an IndexConfig. + * @implements IIndexConfig + * @constructor + * @param {google.cloud.aiplatform.v1.FeatureView.IIndexConfig=} [properties] Properties to set + */ + function IndexConfig(properties) { + this.filterColumns = []; + 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]]; + } + + /** + * IndexConfig treeAhConfig. + * @member {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig|null|undefined} treeAhConfig + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.treeAhConfig = null; + + /** + * IndexConfig bruteForceConfig. + * @member {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig|null|undefined} bruteForceConfig + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.bruteForceConfig = null; + + /** + * IndexConfig embeddingColumn. + * @member {string} embeddingColumn + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.embeddingColumn = ""; + + /** + * IndexConfig filterColumns. + * @member {Array.} filterColumns + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.filterColumns = $util.emptyArray; + + /** + * IndexConfig crowdingColumn. + * @member {string} crowdingColumn + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.crowdingColumn = ""; + + /** + * IndexConfig embeddingDimension. + * @member {number|null|undefined} embeddingDimension + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.embeddingDimension = null; + + /** + * IndexConfig distanceMeasureType. + * @member {google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType} distanceMeasureType + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + IndexConfig.prototype.distanceMeasureType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IndexConfig algorithmConfig. + * @member {"treeAhConfig"|"bruteForceConfig"|undefined} algorithmConfig + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + Object.defineProperty(IndexConfig.prototype, "algorithmConfig", { + get: $util.oneOfGetter($oneOfFields = ["treeAhConfig", "bruteForceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IndexConfig _embeddingDimension. + * @member {"embeddingDimension"|undefined} _embeddingDimension + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + */ + Object.defineProperty(IndexConfig.prototype, "_embeddingDimension", { + get: $util.oneOfGetter($oneOfFields = ["embeddingDimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IndexConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IIndexConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig} IndexConfig instance + */ + IndexConfig.create = function create(properties) { + return new IndexConfig(properties); + }; + + /** + * Encodes the specified IndexConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IIndexConfig} message IndexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IndexConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.embeddingColumn != null && Object.hasOwnProperty.call(message, "embeddingColumn")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.embeddingColumn); + if (message.filterColumns != null && message.filterColumns.length) + for (var i = 0; i < message.filterColumns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filterColumns[i]); + if (message.crowdingColumn != null && Object.hasOwnProperty.call(message, "crowdingColumn")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.crowdingColumn); + if (message.embeddingDimension != null && Object.hasOwnProperty.call(message, "embeddingDimension")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.embeddingDimension); + if (message.distanceMeasureType != null && Object.hasOwnProperty.call(message, "distanceMeasureType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.distanceMeasureType); + if (message.treeAhConfig != null && Object.hasOwnProperty.call(message, "treeAhConfig")) + $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.encode(message.treeAhConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bruteForceConfig != null && Object.hasOwnProperty.call(message, "bruteForceConfig")) + $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.encode(message.bruteForceConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IndexConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IIndexConfig} message IndexConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IndexConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IndexConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @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.FeatureView.IndexConfig} IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexConfig.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.FeatureView.IndexConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.treeAhConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.bruteForceConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.decode(reader, reader.uint32()); + break; + } + case 1: { + message.embeddingColumn = reader.string(); + break; + } + case 2: { + if (!(message.filterColumns && message.filterColumns.length)) + message.filterColumns = []; + message.filterColumns.push(reader.string()); + break; + } + case 3: { + message.crowdingColumn = reader.string(); + break; + } + case 4: { + message.embeddingDimension = reader.int32(); + break; + } + case 5: { + message.distanceMeasureType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IndexConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig} IndexConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IndexConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IndexConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IndexConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.treeAhConfig != null && message.hasOwnProperty("treeAhConfig")) { + properties.algorithmConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.verify(message.treeAhConfig); + if (error) + return "treeAhConfig." + error; + } + } + if (message.bruteForceConfig != null && message.hasOwnProperty("bruteForceConfig")) { + if (properties.algorithmConfig === 1) + return "algorithmConfig: multiple values"; + properties.algorithmConfig = 1; + { + var error = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.verify(message.bruteForceConfig); + if (error) + return "bruteForceConfig." + error; + } + } + if (message.embeddingColumn != null && message.hasOwnProperty("embeddingColumn")) + if (!$util.isString(message.embeddingColumn)) + return "embeddingColumn: string expected"; + if (message.filterColumns != null && message.hasOwnProperty("filterColumns")) { + if (!Array.isArray(message.filterColumns)) + return "filterColumns: array expected"; + for (var i = 0; i < message.filterColumns.length; ++i) + if (!$util.isString(message.filterColumns[i])) + return "filterColumns: string[] expected"; + } + if (message.crowdingColumn != null && message.hasOwnProperty("crowdingColumn")) + if (!$util.isString(message.crowdingColumn)) + return "crowdingColumn: string expected"; + if (message.embeddingDimension != null && message.hasOwnProperty("embeddingDimension")) { + properties._embeddingDimension = 1; + if (!$util.isInteger(message.embeddingDimension)) + return "embeddingDimension: integer expected"; + } + if (message.distanceMeasureType != null && message.hasOwnProperty("distanceMeasureType")) + switch (message.distanceMeasureType) { + default: + return "distanceMeasureType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig} IndexConfig + */ + IndexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig(); + if (object.treeAhConfig != null) { + if (typeof object.treeAhConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureView.IndexConfig.treeAhConfig: object expected"); + message.treeAhConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.fromObject(object.treeAhConfig); + } + if (object.bruteForceConfig != null) { + if (typeof object.bruteForceConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FeatureView.IndexConfig.bruteForceConfig: object expected"); + message.bruteForceConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.fromObject(object.bruteForceConfig); + } + if (object.embeddingColumn != null) + message.embeddingColumn = String(object.embeddingColumn); + if (object.filterColumns) { + if (!Array.isArray(object.filterColumns)) + throw TypeError(".google.cloud.aiplatform.v1.FeatureView.IndexConfig.filterColumns: array expected"); + message.filterColumns = []; + for (var i = 0; i < object.filterColumns.length; ++i) + message.filterColumns[i] = String(object.filterColumns[i]); + } + if (object.crowdingColumn != null) + message.crowdingColumn = String(object.crowdingColumn); + if (object.embeddingDimension != null) + message.embeddingDimension = object.embeddingDimension | 0; + switch (object.distanceMeasureType) { + default: + if (typeof object.distanceMeasureType === "number") { + message.distanceMeasureType = object.distanceMeasureType; + break; + } + break; + case "DISTANCE_MEASURE_TYPE_UNSPECIFIED": + case 0: + message.distanceMeasureType = 0; + break; + case "SQUARED_L2_DISTANCE": + case 1: + message.distanceMeasureType = 1; + break; + case "COSINE_DISTANCE": + case 2: + message.distanceMeasureType = 2; + break; + case "DOT_PRODUCT_DISTANCE": + case 3: + message.distanceMeasureType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig} message IndexConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterColumns = []; + if (options.defaults) { + object.embeddingColumn = ""; + object.crowdingColumn = ""; + object.distanceMeasureType = options.enums === String ? "DISTANCE_MEASURE_TYPE_UNSPECIFIED" : 0; + } + if (message.embeddingColumn != null && message.hasOwnProperty("embeddingColumn")) + object.embeddingColumn = message.embeddingColumn; + if (message.filterColumns && message.filterColumns.length) { + object.filterColumns = []; + for (var j = 0; j < message.filterColumns.length; ++j) + object.filterColumns[j] = message.filterColumns[j]; + } + if (message.crowdingColumn != null && message.hasOwnProperty("crowdingColumn")) + object.crowdingColumn = message.crowdingColumn; + if (message.embeddingDimension != null && message.hasOwnProperty("embeddingDimension")) { + object.embeddingDimension = message.embeddingDimension; + if (options.oneofs) + object._embeddingDimension = "embeddingDimension"; + } + if (message.distanceMeasureType != null && message.hasOwnProperty("distanceMeasureType")) + object.distanceMeasureType = options.enums === String ? $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType[message.distanceMeasureType] === undefined ? message.distanceMeasureType : $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType[message.distanceMeasureType] : message.distanceMeasureType; + if (message.treeAhConfig != null && message.hasOwnProperty("treeAhConfig")) { + object.treeAhConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.toObject(message.treeAhConfig, options); + if (options.oneofs) + object.algorithmConfig = "treeAhConfig"; + } + if (message.bruteForceConfig != null && message.hasOwnProperty("bruteForceConfig")) { + object.bruteForceConfig = $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.toObject(message.bruteForceConfig, options); + if (options.oneofs) + object.algorithmConfig = "bruteForceConfig"; + } + return object; + }; + + /** + * Converts this IndexConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @instance + * @returns {Object.} JSON object + */ + IndexConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IndexConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FeatureView.IndexConfig"; + }; + + IndexConfig.BruteForceConfig = (function() { + + /** + * Properties of a BruteForceConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @interface IBruteForceConfig + */ + + /** + * Constructs a new BruteForceConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @classdesc Represents a BruteForceConfig. + * @implements IBruteForceConfig + * @constructor + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig=} [properties] Properties to set + */ + function BruteForceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new BruteForceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig} BruteForceConfig instance + */ + BruteForceConfig.create = function create(properties) { + return new BruteForceConfig(properties); + }; + + /** + * Encodes the specified BruteForceConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig} message BruteForceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BruteForceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BruteForceConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.IBruteForceConfig} message BruteForceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BruteForceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BruteForceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @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.FeatureView.IndexConfig.BruteForceConfig} BruteForceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BruteForceConfig.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.FeatureView.IndexConfig.BruteForceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BruteForceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig} BruteForceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BruteForceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BruteForceConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BruteForceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BruteForceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig} BruteForceConfig + */ + BruteForceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig) + return object; + return new $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig(); + }; + + /** + * Creates a plain object from a BruteForceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig} message BruteForceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BruteForceConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BruteForceConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @instance + * @returns {Object.} JSON object + */ + BruteForceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BruteForceConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BruteForceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig"; + }; + + return BruteForceConfig; + })(); + + IndexConfig.TreeAHConfig = (function() { + + /** + * Properties of a TreeAHConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @interface ITreeAHConfig + * @property {number|Long|null} [leafNodeEmbeddingCount] TreeAHConfig leafNodeEmbeddingCount + */ + + /** + * Constructs a new TreeAHConfig. + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig + * @classdesc Represents a TreeAHConfig. + * @implements ITreeAHConfig + * @constructor + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig=} [properties] Properties to set + */ + function TreeAHConfig(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]]; + } + + /** + * TreeAHConfig leafNodeEmbeddingCount. + * @member {number|Long|null|undefined} leafNodeEmbeddingCount + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @instance + */ + TreeAHConfig.prototype.leafNodeEmbeddingCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TreeAHConfig _leafNodeEmbeddingCount. + * @member {"leafNodeEmbeddingCount"|undefined} _leafNodeEmbeddingCount + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @instance + */ + Object.defineProperty(TreeAHConfig.prototype, "_leafNodeEmbeddingCount", { + get: $util.oneOfGetter($oneOfFields = ["leafNodeEmbeddingCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TreeAHConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig} TreeAHConfig instance + */ + TreeAHConfig.create = function create(properties) { + return new TreeAHConfig(properties); + }; + + /** + * Encodes the specified TreeAHConfig message. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig} message TreeAHConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TreeAHConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leafNodeEmbeddingCount != null && Object.hasOwnProperty.call(message, "leafNodeEmbeddingCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.leafNodeEmbeddingCount); + return writer; + }; + + /** + * Encodes the specified TreeAHConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.ITreeAHConfig} message TreeAHConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TreeAHConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TreeAHConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @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.FeatureView.IndexConfig.TreeAHConfig} TreeAHConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TreeAHConfig.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.FeatureView.IndexConfig.TreeAHConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.leafNodeEmbeddingCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TreeAHConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig} TreeAHConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TreeAHConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TreeAHConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TreeAHConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.leafNodeEmbeddingCount != null && message.hasOwnProperty("leafNodeEmbeddingCount")) { + properties._leafNodeEmbeddingCount = 1; + if (!$util.isInteger(message.leafNodeEmbeddingCount) && !(message.leafNodeEmbeddingCount && $util.isInteger(message.leafNodeEmbeddingCount.low) && $util.isInteger(message.leafNodeEmbeddingCount.high))) + return "leafNodeEmbeddingCount: integer|Long expected"; + } + return null; + }; + + /** + * Creates a TreeAHConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig} TreeAHConfig + */ + TreeAHConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig(); + if (object.leafNodeEmbeddingCount != null) + if ($util.Long) + (message.leafNodeEmbeddingCount = $util.Long.fromValue(object.leafNodeEmbeddingCount)).unsigned = false; + else if (typeof object.leafNodeEmbeddingCount === "string") + message.leafNodeEmbeddingCount = parseInt(object.leafNodeEmbeddingCount, 10); + else if (typeof object.leafNodeEmbeddingCount === "number") + message.leafNodeEmbeddingCount = object.leafNodeEmbeddingCount; + else if (typeof object.leafNodeEmbeddingCount === "object") + message.leafNodeEmbeddingCount = new $util.LongBits(object.leafNodeEmbeddingCount.low >>> 0, object.leafNodeEmbeddingCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TreeAHConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig} message TreeAHConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TreeAHConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.leafNodeEmbeddingCount != null && message.hasOwnProperty("leafNodeEmbeddingCount")) { + if (typeof message.leafNodeEmbeddingCount === "number") + object.leafNodeEmbeddingCount = options.longs === String ? String(message.leafNodeEmbeddingCount) : message.leafNodeEmbeddingCount; + else + object.leafNodeEmbeddingCount = options.longs === String ? $util.Long.prototype.toString.call(message.leafNodeEmbeddingCount) : options.longs === Number ? new $util.LongBits(message.leafNodeEmbeddingCount.low >>> 0, message.leafNodeEmbeddingCount.high >>> 0).toNumber() : message.leafNodeEmbeddingCount; + if (options.oneofs) + object._leafNodeEmbeddingCount = "leafNodeEmbeddingCount"; + } + return object; + }; + + /** + * Converts this TreeAHConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @instance + * @returns {Object.} JSON object + */ + TreeAHConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TreeAHConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TreeAHConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig"; + }; + + return TreeAHConfig; + })(); + + /** + * DistanceMeasureType enum. + * @name google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType + * @enum {number} + * @property {number} DISTANCE_MEASURE_TYPE_UNSPECIFIED=0 DISTANCE_MEASURE_TYPE_UNSPECIFIED value + * @property {number} SQUARED_L2_DISTANCE=1 SQUARED_L2_DISTANCE value + * @property {number} COSINE_DISTANCE=2 COSINE_DISTANCE value + * @property {number} DOT_PRODUCT_DISTANCE=3 DOT_PRODUCT_DISTANCE value + */ + IndexConfig.DistanceMeasureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISTANCE_MEASURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SQUARED_L2_DISTANCE"] = 1; + values[valuesById[2] = "COSINE_DISTANCE"] = 2; + values[valuesById[3] = "DOT_PRODUCT_DISTANCE"] = 3; + return values; + })(); + + return IndexConfig; + })(); + FeatureView.FeatureRegistrySource = (function() { /** @@ -69193,6 +70526,7 @@ * @interface IFetchFeatureValuesResponse * @property {google.cloud.aiplatform.v1.FetchFeatureValuesResponse.IFeatureNameValuePairList|null} [keyValues] FetchFeatureValuesResponse keyValues * @property {google.protobuf.IStruct|null} [protoStruct] FetchFeatureValuesResponse protoStruct + * @property {google.cloud.aiplatform.v1.IFeatureViewDataKey|null} [dataKey] FetchFeatureValuesResponse dataKey */ /** @@ -69226,6 +70560,14 @@ */ FetchFeatureValuesResponse.prototype.protoStruct = null; + /** + * FetchFeatureValuesResponse dataKey. + * @member {google.cloud.aiplatform.v1.IFeatureViewDataKey|null|undefined} dataKey + * @memberof google.cloud.aiplatform.v1.FetchFeatureValuesResponse + * @instance + */ + FetchFeatureValuesResponse.prototype.dataKey = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -69268,6 +70610,8 @@ $root.google.protobuf.Struct.encode(message.protoStruct, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.keyValues != null && Object.hasOwnProperty.call(message, "keyValues")) $root.google.cloud.aiplatform.v1.FetchFeatureValuesResponse.FeatureNameValuePairList.encode(message.keyValues, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataKey != null && Object.hasOwnProperty.call(message, "dataKey")) + $root.google.cloud.aiplatform.v1.FeatureViewDataKey.encode(message.dataKey, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -69310,6 +70654,10 @@ message.protoStruct = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } + case 4: { + message.dataKey = $root.google.cloud.aiplatform.v1.FeatureViewDataKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -69364,6 +70712,11 @@ return "protoStruct." + error; } } + if (message.dataKey != null && message.hasOwnProperty("dataKey")) { + var error = $root.google.cloud.aiplatform.v1.FeatureViewDataKey.verify(message.dataKey); + if (error) + return "dataKey." + error; + } return null; }; @@ -69389,6 +70742,11 @@ throw TypeError(".google.cloud.aiplatform.v1.FetchFeatureValuesResponse.protoStruct: object expected"); message.protoStruct = $root.google.protobuf.Struct.fromObject(object.protoStruct); } + if (object.dataKey != null) { + if (typeof object.dataKey !== "object") + throw TypeError(".google.cloud.aiplatform.v1.FetchFeatureValuesResponse.dataKey: object expected"); + message.dataKey = $root.google.cloud.aiplatform.v1.FeatureViewDataKey.fromObject(object.dataKey); + } return message; }; @@ -69405,6 +70763,8 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.dataKey = null; if (message.protoStruct != null && message.hasOwnProperty("protoStruct")) { object.protoStruct = $root.google.protobuf.Struct.toObject(message.protoStruct, options); if (options.oneofs) @@ -69415,6 +70775,8 @@ if (options.oneofs) object.format = "keyValues"; } + if (message.dataKey != null && message.hasOwnProperty("dataKey")) + object.dataKey = $root.google.cloud.aiplatform.v1.FeatureViewDataKey.toObject(message.dataKey, options); return object; }; @@ -268035,6 +269397,504 @@ return GoogleSearchRetrieval; })(); + v1beta1.ToolConfig = (function() { + + /** + * Properties of a ToolConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolConfig + * @property {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig|null} [functionCallingConfig] ToolConfig functionCallingConfig + */ + + /** + * Constructs a new ToolConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolConfig. + * @implements IToolConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolConfig=} [properties] Properties to set + */ + function ToolConfig(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]]; + } + + /** + * ToolConfig functionCallingConfig. + * @member {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig|null|undefined} functionCallingConfig + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @instance + */ + ToolConfig.prototype.functionCallingConfig = null; + + /** + * Creates a new ToolConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolConfig} ToolConfig instance + */ + ToolConfig.create = function create(properties) { + return new ToolConfig(properties); + }; + + /** + * Encodes the specified ToolConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolConfig} message ToolConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.functionCallingConfig != null && Object.hasOwnProperty.call(message, "functionCallingConfig")) + $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.encode(message.functionCallingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolConfig} message ToolConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ToolConfig} ToolConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ToolConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.functionCallingConfig = $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolConfig} ToolConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.functionCallingConfig != null && message.hasOwnProperty("functionCallingConfig")) { + var error = $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.verify(message.functionCallingConfig); + if (error) + return "functionCallingConfig." + error; + } + return null; + }; + + /** + * Creates a ToolConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolConfig} ToolConfig + */ + ToolConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolConfig(); + if (object.functionCallingConfig != null) { + if (typeof object.functionCallingConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolConfig.functionCallingConfig: object expected"); + message.functionCallingConfig = $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.fromObject(object.functionCallingConfig); + } + return message; + }; + + /** + * Creates a plain object from a ToolConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolConfig} message ToolConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.functionCallingConfig = null; + if (message.functionCallingConfig != null && message.hasOwnProperty("functionCallingConfig")) + object.functionCallingConfig = $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.toObject(message.functionCallingConfig, options); + return object; + }; + + /** + * Converts this ToolConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @instance + * @returns {Object.} JSON object + */ + ToolConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolConfig"; + }; + + return ToolConfig; + })(); + + v1beta1.FunctionCallingConfig = (function() { + + /** + * Properties of a FunctionCallingConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFunctionCallingConfig + * @property {google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode|null} [mode] FunctionCallingConfig mode + * @property {Array.|null} [allowedFunctionNames] FunctionCallingConfig allowedFunctionNames + */ + + /** + * Constructs a new FunctionCallingConfig. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FunctionCallingConfig. + * @implements IFunctionCallingConfig + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig=} [properties] Properties to set + */ + function FunctionCallingConfig(properties) { + this.allowedFunctionNames = []; + 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]]; + } + + /** + * FunctionCallingConfig mode. + * @member {google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode} mode + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @instance + */ + FunctionCallingConfig.prototype.mode = 0; + + /** + * FunctionCallingConfig allowedFunctionNames. + * @member {Array.} allowedFunctionNames + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @instance + */ + FunctionCallingConfig.prototype.allowedFunctionNames = $util.emptyArray; + + /** + * Creates a new FunctionCallingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FunctionCallingConfig} FunctionCallingConfig instance + */ + FunctionCallingConfig.create = function create(properties) { + return new FunctionCallingConfig(properties); + }; + + /** + * Encodes the specified FunctionCallingConfig message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionCallingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig} message FunctionCallingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionCallingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.allowedFunctionNames != null && message.allowedFunctionNames.length) + for (var i = 0; i < message.allowedFunctionNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.allowedFunctionNames[i]); + return writer; + }; + + /** + * Encodes the specified FunctionCallingConfig message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FunctionCallingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.IFunctionCallingConfig} message FunctionCallingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FunctionCallingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FunctionCallingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FunctionCallingConfig} FunctionCallingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionCallingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + if (!(message.allowedFunctionNames && message.allowedFunctionNames.length)) + message.allowedFunctionNames = []; + message.allowedFunctionNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FunctionCallingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FunctionCallingConfig} FunctionCallingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FunctionCallingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FunctionCallingConfig message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FunctionCallingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.allowedFunctionNames != null && message.hasOwnProperty("allowedFunctionNames")) { + if (!Array.isArray(message.allowedFunctionNames)) + return "allowedFunctionNames: array expected"; + for (var i = 0; i < message.allowedFunctionNames.length; ++i) + if (!$util.isString(message.allowedFunctionNames[i])) + return "allowedFunctionNames: string[] expected"; + } + return null; + }; + + /** + * Creates a FunctionCallingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FunctionCallingConfig} FunctionCallingConfig + */ + FunctionCallingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "AUTO": + case 1: + message.mode = 1; + break; + case "ANY": + case 2: + message.mode = 2; + break; + case "NONE": + case 3: + message.mode = 3; + break; + } + if (object.allowedFunctionNames) { + if (!Array.isArray(object.allowedFunctionNames)) + throw TypeError(".google.cloud.aiplatform.v1beta1.FunctionCallingConfig.allowedFunctionNames: array expected"); + message.allowedFunctionNames = []; + for (var i = 0; i < object.allowedFunctionNames.length; ++i) + message.allowedFunctionNames[i] = String(object.allowedFunctionNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a FunctionCallingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {google.cloud.aiplatform.v1beta1.FunctionCallingConfig} message FunctionCallingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FunctionCallingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedFunctionNames = []; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode[message.mode] : message.mode; + if (message.allowedFunctionNames && message.allowedFunctionNames.length) { + object.allowedFunctionNames = []; + for (var j = 0; j < message.allowedFunctionNames.length; ++j) + object.allowedFunctionNames[j] = message.allowedFunctionNames[j]; + } + return object; + }; + + /** + * Converts this FunctionCallingConfig to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @instance + * @returns {Object.} JSON object + */ + FunctionCallingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FunctionCallingConfig + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FunctionCallingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FunctionCallingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FunctionCallingConfig"; + }; + + /** + * Mode enum. + * @name google.cloud.aiplatform.v1beta1.FunctionCallingConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} AUTO=1 AUTO value + * @property {number} ANY=2 ANY value + * @property {number} NONE=3 NONE value + */ + FunctionCallingConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO"] = 1; + values[valuesById[2] = "ANY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + return FunctionCallingConfig; + })(); + /** * Type enum. * @name google.cloud.aiplatform.v1beta1.Type @@ -432209,6 +434069,7 @@ * @property {string|null} [model] GenerateContentRequest model * @property {Array.|null} [contents] GenerateContentRequest contents * @property {Array.|null} [tools] GenerateContentRequest tools + * @property {google.cloud.aiplatform.v1beta1.IToolConfig|null} [toolConfig] GenerateContentRequest toolConfig * @property {Array.|null} [safetySettings] GenerateContentRequest safetySettings * @property {google.cloud.aiplatform.v1beta1.IGenerationConfig|null} [generationConfig] GenerateContentRequest generationConfig */ @@ -432255,6 +434116,14 @@ */ GenerateContentRequest.prototype.tools = $util.emptyArray; + /** + * GenerateContentRequest toolConfig. + * @member {google.cloud.aiplatform.v1beta1.IToolConfig|null|undefined} toolConfig + * @memberof google.cloud.aiplatform.v1beta1.GenerateContentRequest + * @instance + */ + GenerateContentRequest.prototype.toolConfig = null; + /** * GenerateContentRequest safetySettings. * @member {Array.} safetySettings @@ -432308,6 +434177,8 @@ if (message.tools != null && message.tools.length) for (var i = 0; i < message.tools.length; ++i) $root.google.cloud.aiplatform.v1beta1.Tool.encode(message.tools[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.toolConfig != null && Object.hasOwnProperty.call(message, "toolConfig")) + $root.google.cloud.aiplatform.v1beta1.ToolConfig.encode(message.toolConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -432358,6 +434229,10 @@ message.tools.push($root.google.cloud.aiplatform.v1beta1.Tool.decode(reader, reader.uint32())); break; } + case 7: { + message.toolConfig = $root.google.cloud.aiplatform.v1beta1.ToolConfig.decode(reader, reader.uint32()); + break; + } case 3: { if (!(message.safetySettings && message.safetySettings.length)) message.safetySettings = []; @@ -432424,6 +434299,11 @@ return "tools." + error; } } + if (message.toolConfig != null && message.hasOwnProperty("toolConfig")) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolConfig.verify(message.toolConfig); + if (error) + return "toolConfig." + error; + } if (message.safetySettings != null && message.hasOwnProperty("safetySettings")) { if (!Array.isArray(message.safetySettings)) return "safetySettings: array expected"; @@ -432475,6 +434355,11 @@ message.tools[i] = $root.google.cloud.aiplatform.v1beta1.Tool.fromObject(object.tools[i]); } } + if (object.toolConfig != null) { + if (typeof object.toolConfig !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.GenerateContentRequest.toolConfig: object expected"); + message.toolConfig = $root.google.cloud.aiplatform.v1beta1.ToolConfig.fromObject(object.toolConfig); + } if (object.safetySettings) { if (!Array.isArray(object.safetySettings)) throw TypeError(".google.cloud.aiplatform.v1beta1.GenerateContentRequest.safetySettings: array expected"); @@ -432514,6 +434399,7 @@ if (options.defaults) { object.generationConfig = null; object.model = ""; + object.toolConfig = null; } if (message.contents && message.contents.length) { object.contents = []; @@ -432534,6 +434420,8 @@ for (var j = 0; j < message.tools.length; ++j) object.tools[j] = $root.google.cloud.aiplatform.v1beta1.Tool.toObject(message.tools[j], options); } + if (message.toolConfig != null && message.hasOwnProperty("toolConfig")) + object.toolConfig = $root.google.cloud.aiplatform.v1beta1.ToolConfig.toObject(message.toolConfig, options); return object; }; @@ -433410,6 +435298,2931 @@ return GenerateContentResponse; })(); + v1beta1.ReasoningEngineSpec = (function() { + + /** + * Properties of a ReasoningEngineSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IReasoningEngineSpec + * @property {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec|null} [packageSpec] ReasoningEngineSpec packageSpec + * @property {Array.|null} [classMethods] ReasoningEngineSpec classMethods + */ + + /** + * Constructs a new ReasoningEngineSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReasoningEngineSpec. + * @implements IReasoningEngineSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec=} [properties] Properties to set + */ + function ReasoningEngineSpec(properties) { + this.classMethods = []; + 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]]; + } + + /** + * ReasoningEngineSpec packageSpec. + * @member {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec|null|undefined} packageSpec + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @instance + */ + ReasoningEngineSpec.prototype.packageSpec = null; + + /** + * ReasoningEngineSpec classMethods. + * @member {Array.} classMethods + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @instance + */ + ReasoningEngineSpec.prototype.classMethods = $util.emptyArray; + + /** + * Creates a new ReasoningEngineSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec} ReasoningEngineSpec instance + */ + ReasoningEngineSpec.create = function create(properties) { + return new ReasoningEngineSpec(properties); + }; + + /** + * Encodes the specified ReasoningEngineSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec} message ReasoningEngineSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReasoningEngineSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packageSpec != null && Object.hasOwnProperty.call(message, "packageSpec")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.encode(message.packageSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.classMethods != null && message.classMethods.length) + for (var i = 0; i < message.classMethods.length; ++i) + $root.google.protobuf.Struct.encode(message.classMethods[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReasoningEngineSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec} message ReasoningEngineSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReasoningEngineSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReasoningEngineSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec} ReasoningEngineSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReasoningEngineSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.packageSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.classMethods && message.classMethods.length)) + message.classMethods = []; + message.classMethods.push($root.google.protobuf.Struct.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReasoningEngineSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec} ReasoningEngineSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReasoningEngineSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReasoningEngineSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReasoningEngineSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packageSpec != null && message.hasOwnProperty("packageSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.verify(message.packageSpec); + if (error) + return "packageSpec." + error; + } + if (message.classMethods != null && message.hasOwnProperty("classMethods")) { + if (!Array.isArray(message.classMethods)) + return "classMethods: array expected"; + for (var i = 0; i < message.classMethods.length; ++i) { + var error = $root.google.protobuf.Struct.verify(message.classMethods[i]); + if (error) + return "classMethods." + error; + } + } + return null; + }; + + /** + * Creates a ReasoningEngineSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec} ReasoningEngineSpec + */ + ReasoningEngineSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec(); + if (object.packageSpec != null) { + if (typeof object.packageSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.packageSpec: object expected"); + message.packageSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.fromObject(object.packageSpec); + } + if (object.classMethods) { + if (!Array.isArray(object.classMethods)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.classMethods: array expected"); + message.classMethods = []; + for (var i = 0; i < object.classMethods.length; ++i) { + if (typeof object.classMethods[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.classMethods: object expected"); + message.classMethods[i] = $root.google.protobuf.Struct.fromObject(object.classMethods[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReasoningEngineSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec} message ReasoningEngineSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReasoningEngineSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.classMethods = []; + if (options.defaults) + object.packageSpec = null; + if (message.packageSpec != null && message.hasOwnProperty("packageSpec")) + object.packageSpec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.toObject(message.packageSpec, options); + if (message.classMethods && message.classMethods.length) { + object.classMethods = []; + for (var j = 0; j < message.classMethods.length; ++j) + object.classMethods[j] = $root.google.protobuf.Struct.toObject(message.classMethods[j], options); + } + return object; + }; + + /** + * Converts this ReasoningEngineSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @instance + * @returns {Object.} JSON object + */ + ReasoningEngineSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReasoningEngineSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReasoningEngineSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec"; + }; + + ReasoningEngineSpec.PackageSpec = (function() { + + /** + * Properties of a PackageSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @interface IPackageSpec + * @property {string|null} [pickleObjectGcsUri] PackageSpec pickleObjectGcsUri + * @property {string|null} [dependencyFilesGcsUri] PackageSpec dependencyFilesGcsUri + * @property {string|null} [requirementsGcsUri] PackageSpec requirementsGcsUri + * @property {string|null} [pythonVersion] PackageSpec pythonVersion + */ + + /** + * Constructs a new PackageSpec. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec + * @classdesc Represents a PackageSpec. + * @implements IPackageSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec=} [properties] Properties to set + */ + function PackageSpec(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]]; + } + + /** + * PackageSpec pickleObjectGcsUri. + * @member {string} pickleObjectGcsUri + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @instance + */ + PackageSpec.prototype.pickleObjectGcsUri = ""; + + /** + * PackageSpec dependencyFilesGcsUri. + * @member {string} dependencyFilesGcsUri + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @instance + */ + PackageSpec.prototype.dependencyFilesGcsUri = ""; + + /** + * PackageSpec requirementsGcsUri. + * @member {string} requirementsGcsUri + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @instance + */ + PackageSpec.prototype.requirementsGcsUri = ""; + + /** + * PackageSpec pythonVersion. + * @member {string} pythonVersion + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @instance + */ + PackageSpec.prototype.pythonVersion = ""; + + /** + * Creates a new PackageSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec} PackageSpec instance + */ + PackageSpec.create = function create(properties) { + return new PackageSpec(properties); + }; + + /** + * Encodes the specified PackageSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec} message PackageSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pickleObjectGcsUri != null && Object.hasOwnProperty.call(message, "pickleObjectGcsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pickleObjectGcsUri); + if (message.dependencyFilesGcsUri != null && Object.hasOwnProperty.call(message, "dependencyFilesGcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dependencyFilesGcsUri); + if (message.requirementsGcsUri != null && Object.hasOwnProperty.call(message, "requirementsGcsUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requirementsGcsUri); + if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pythonVersion); + return writer; + }; + + /** + * Encodes the specified PackageSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.IPackageSpec} message PackageSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PackageSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PackageSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec} PackageSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pickleObjectGcsUri = reader.string(); + break; + } + case 2: { + message.dependencyFilesGcsUri = reader.string(); + break; + } + case 3: { + message.requirementsGcsUri = reader.string(); + break; + } + case 4: { + message.pythonVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PackageSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec} PackageSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PackageSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PackageSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PackageSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pickleObjectGcsUri != null && message.hasOwnProperty("pickleObjectGcsUri")) + if (!$util.isString(message.pickleObjectGcsUri)) + return "pickleObjectGcsUri: string expected"; + if (message.dependencyFilesGcsUri != null && message.hasOwnProperty("dependencyFilesGcsUri")) + if (!$util.isString(message.dependencyFilesGcsUri)) + return "dependencyFilesGcsUri: string expected"; + if (message.requirementsGcsUri != null && message.hasOwnProperty("requirementsGcsUri")) + if (!$util.isString(message.requirementsGcsUri)) + return "requirementsGcsUri: string expected"; + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + if (!$util.isString(message.pythonVersion)) + return "pythonVersion: string expected"; + return null; + }; + + /** + * Creates a PackageSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec} PackageSpec + */ + PackageSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec(); + if (object.pickleObjectGcsUri != null) + message.pickleObjectGcsUri = String(object.pickleObjectGcsUri); + if (object.dependencyFilesGcsUri != null) + message.dependencyFilesGcsUri = String(object.dependencyFilesGcsUri); + if (object.requirementsGcsUri != null) + message.requirementsGcsUri = String(object.requirementsGcsUri); + if (object.pythonVersion != null) + message.pythonVersion = String(object.pythonVersion); + return message; + }; + + /** + * Creates a plain object from a PackageSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec} message PackageSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PackageSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pickleObjectGcsUri = ""; + object.dependencyFilesGcsUri = ""; + object.requirementsGcsUri = ""; + object.pythonVersion = ""; + } + if (message.pickleObjectGcsUri != null && message.hasOwnProperty("pickleObjectGcsUri")) + object.pickleObjectGcsUri = message.pickleObjectGcsUri; + if (message.dependencyFilesGcsUri != null && message.hasOwnProperty("dependencyFilesGcsUri")) + object.dependencyFilesGcsUri = message.dependencyFilesGcsUri; + if (message.requirementsGcsUri != null && message.hasOwnProperty("requirementsGcsUri")) + object.requirementsGcsUri = message.requirementsGcsUri; + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + object.pythonVersion = message.pythonVersion; + return object; + }; + + /** + * Converts this PackageSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @instance + * @returns {Object.} JSON object + */ + PackageSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PackageSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PackageSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.PackageSpec"; + }; + + return PackageSpec; + })(); + + return ReasoningEngineSpec; + })(); + + v1beta1.ReasoningEngine = (function() { + + /** + * Properties of a ReasoningEngine. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IReasoningEngine + * @property {string|null} [name] ReasoningEngine name + * @property {string|null} [displayName] ReasoningEngine displayName + * @property {string|null} [description] ReasoningEngine description + * @property {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec|null} [spec] ReasoningEngine spec + * @property {google.protobuf.ITimestamp|null} [createTime] ReasoningEngine createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ReasoningEngine updateTime + * @property {string|null} [etag] ReasoningEngine etag + */ + + /** + * Constructs a new ReasoningEngine. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReasoningEngine. + * @implements IReasoningEngine + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngine=} [properties] Properties to set + */ + function ReasoningEngine(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]]; + } + + /** + * ReasoningEngine name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.name = ""; + + /** + * ReasoningEngine displayName. + * @member {string} displayName + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.displayName = ""; + + /** + * ReasoningEngine description. + * @member {string} description + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.description = ""; + + /** + * ReasoningEngine spec. + * @member {google.cloud.aiplatform.v1beta1.IReasoningEngineSpec|null|undefined} spec + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.spec = null; + + /** + * ReasoningEngine createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.createTime = null; + + /** + * ReasoningEngine updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.updateTime = null; + + /** + * ReasoningEngine etag. + * @member {string} etag + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + */ + ReasoningEngine.prototype.etag = ""; + + /** + * Creates a new ReasoningEngine instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngine=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngine} ReasoningEngine instance + */ + ReasoningEngine.create = function create(properties) { + return new ReasoningEngine(properties); + }; + + /** + * Encodes the specified ReasoningEngine message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngine.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngine} message ReasoningEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReasoningEngine.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.spec != null && Object.hasOwnProperty.call(message, "spec")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.encode(message.spec, 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.etag); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.description); + return writer; + }; + + /** + * Encodes the specified ReasoningEngine message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ReasoningEngine.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {google.cloud.aiplatform.v1beta1.IReasoningEngine} message ReasoningEngine message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReasoningEngine.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReasoningEngine message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngine} ReasoningEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReasoningEngine.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngine(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 7: { + message.description = reader.string(); + break; + } + case 3: { + message.spec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.decode(reader, reader.uint32()); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReasoningEngine message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngine} ReasoningEngine + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReasoningEngine.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReasoningEngine message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReasoningEngine.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.spec != null && message.hasOwnProperty("spec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.verify(message.spec); + if (error) + return "spec." + error; + } + 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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates a ReasoningEngine message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ReasoningEngine} ReasoningEngine + */ + ReasoningEngine.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ReasoningEngine) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ReasoningEngine(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.spec != null) { + if (typeof object.spec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngine.spec: object expected"); + message.spec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.fromObject(object.spec); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ReasoningEngine.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.v1beta1.ReasoningEngine.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a ReasoningEngine message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngine} message ReasoningEngine + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReasoningEngine.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.spec = null; + object.createTime = null; + object.updateTime = null; + object.etag = ""; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.spec != null && message.hasOwnProperty("spec")) + object.spec = $root.google.cloud.aiplatform.v1beta1.ReasoningEngineSpec.toObject(message.spec, options); + 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.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ReasoningEngine to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @instance + * @returns {Object.} JSON object + */ + ReasoningEngine.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReasoningEngine + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngine + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReasoningEngine.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ReasoningEngine"; + }; + + return ReasoningEngine; + })(); + + v1beta1.ReasoningEngineExecutionService = (function() { + + /** + * Constructs a new ReasoningEngineExecutionService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReasoningEngineExecutionService + * @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 ReasoningEngineExecutionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReasoningEngineExecutionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReasoningEngineExecutionService; + + /** + * Creates new ReasoningEngineExecutionService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService + * @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 {ReasoningEngineExecutionService} RPC service. Useful where requests and/or responses are streamed. + */ + ReasoningEngineExecutionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService|queryReasoningEngine}. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService + * @typedef QueryReasoningEngineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} [response] QueryReasoningEngineResponse + */ + + /** + * Calls QueryReasoningEngine. + * @function queryReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest} request QueryReasoningEngineRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngineCallback} callback Node-style callback called with the error, if any, and QueryReasoningEngineResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReasoningEngineExecutionService.prototype.queryReasoningEngine = function queryReasoningEngine(request, callback) { + return this.rpcCall(queryReasoningEngine, $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest, $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse, request, callback); + }, "name", { value: "QueryReasoningEngine" }); + + /** + * Calls QueryReasoningEngine. + * @function queryReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest} request QueryReasoningEngineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReasoningEngineExecutionService; + })(); + + v1beta1.QueryReasoningEngineRequest = (function() { + + /** + * Properties of a QueryReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQueryReasoningEngineRequest + * @property {string|null} [name] QueryReasoningEngineRequest name + * @property {google.protobuf.IStruct|null} [input] QueryReasoningEngineRequest input + */ + + /** + * Constructs a new QueryReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QueryReasoningEngineRequest. + * @implements IQueryReasoningEngineRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest=} [properties] Properties to set + */ + function QueryReasoningEngineRequest(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]]; + } + + /** + * QueryReasoningEngineRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @instance + */ + QueryReasoningEngineRequest.prototype.name = ""; + + /** + * QueryReasoningEngineRequest input. + * @member {google.protobuf.IStruct|null|undefined} input + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @instance + */ + QueryReasoningEngineRequest.prototype.input = null; + + /** + * Creates a new QueryReasoningEngineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest} QueryReasoningEngineRequest instance + */ + QueryReasoningEngineRequest.create = function create(properties) { + return new QueryReasoningEngineRequest(properties); + }; + + /** + * Encodes the specified QueryReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest} message QueryReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReasoningEngineRequest.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.input != null && Object.hasOwnProperty.call(message, "input")) + $root.google.protobuf.Struct.encode(message.input, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest} message QueryReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReasoningEngineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReasoningEngineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest} QueryReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReasoningEngineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.input = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest} QueryReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReasoningEngineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReasoningEngineRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReasoningEngineRequest.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.input != null && message.hasOwnProperty("input")) { + var error = $root.google.protobuf.Struct.verify(message.input); + if (error) + return "input." + error; + } + return null; + }; + + /** + * Creates a QueryReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest} QueryReasoningEngineRequest + */ + QueryReasoningEngineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.input != null) { + if (typeof object.input !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest.input: object expected"); + message.input = $root.google.protobuf.Struct.fromObject(object.input); + } + return message; + }; + + /** + * Creates a plain object from a QueryReasoningEngineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest} message QueryReasoningEngineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReasoningEngineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.input = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.input != null && message.hasOwnProperty("input")) + object.input = $root.google.protobuf.Struct.toObject(message.input, options); + return object; + }; + + /** + * Converts this QueryReasoningEngineRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @instance + * @returns {Object.} JSON object + */ + QueryReasoningEngineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReasoningEngineRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReasoningEngineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest"; + }; + + return QueryReasoningEngineRequest; + })(); + + v1beta1.QueryReasoningEngineResponse = (function() { + + /** + * Properties of a QueryReasoningEngineResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQueryReasoningEngineResponse + * @property {google.protobuf.IValue|null} [output] QueryReasoningEngineResponse output + */ + + /** + * Constructs a new QueryReasoningEngineResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QueryReasoningEngineResponse. + * @implements IQueryReasoningEngineResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse=} [properties] Properties to set + */ + function QueryReasoningEngineResponse(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]]; + } + + /** + * QueryReasoningEngineResponse output. + * @member {google.protobuf.IValue|null|undefined} output + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @instance + */ + QueryReasoningEngineResponse.prototype.output = null; + + /** + * Creates a new QueryReasoningEngineResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} QueryReasoningEngineResponse instance + */ + QueryReasoningEngineResponse.create = function create(properties) { + return new QueryReasoningEngineResponse(properties); + }; + + /** + * Encodes the specified QueryReasoningEngineResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse} message QueryReasoningEngineResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReasoningEngineResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + $root.google.protobuf.Value.encode(message.output, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryReasoningEngineResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse} message QueryReasoningEngineResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryReasoningEngineResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryReasoningEngineResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} QueryReasoningEngineResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReasoningEngineResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.output = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryReasoningEngineResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} QueryReasoningEngineResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryReasoningEngineResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryReasoningEngineResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryReasoningEngineResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.output != null && message.hasOwnProperty("output")) { + var error = $root.google.protobuf.Value.verify(message.output); + if (error) + return "output." + error; + } + return null; + }; + + /** + * Creates a QueryReasoningEngineResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} QueryReasoningEngineResponse + */ + QueryReasoningEngineResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse(); + if (object.output != null) { + if (typeof object.output !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse.output: object expected"); + message.output = $root.google.protobuf.Value.fromObject(object.output); + } + return message; + }; + + /** + * Creates a plain object from a QueryReasoningEngineResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse} message QueryReasoningEngineResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryReasoningEngineResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.output = null; + if (message.output != null && message.hasOwnProperty("output")) + object.output = $root.google.protobuf.Value.toObject(message.output, options); + return object; + }; + + /** + * Converts this QueryReasoningEngineResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @instance + * @returns {Object.} JSON object + */ + QueryReasoningEngineResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryReasoningEngineResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryReasoningEngineResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse"; + }; + + return QueryReasoningEngineResponse; + })(); + + v1beta1.ReasoningEngineService = (function() { + + /** + * Constructs a new ReasoningEngineService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ReasoningEngineService + * @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 ReasoningEngineService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReasoningEngineService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReasoningEngineService; + + /** + * Creates new ReasoningEngineService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @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 {ReasoningEngineService} RPC service. Useful where requests and/or responses are streamed. + */ + ReasoningEngineService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|createReasoningEngine}. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @typedef CreateReasoningEngineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReasoningEngine. + * @function createReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest} request CreateReasoningEngineRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReasoningEngineService.prototype.createReasoningEngine = function createReasoningEngine(request, callback) { + return this.rpcCall(createReasoningEngine, $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReasoningEngine" }); + + /** + * Calls CreateReasoningEngine. + * @function createReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest} request CreateReasoningEngineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|getReasoningEngine}. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @typedef GetReasoningEngineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngine} [response] ReasoningEngine + */ + + /** + * Calls GetReasoningEngine. + * @function getReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest} request GetReasoningEngineRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngineCallback} callback Node-style callback called with the error, if any, and ReasoningEngine + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReasoningEngineService.prototype.getReasoningEngine = function getReasoningEngine(request, callback) { + return this.rpcCall(getReasoningEngine, $root.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest, $root.google.cloud.aiplatform.v1beta1.ReasoningEngine, request, callback); + }, "name", { value: "GetReasoningEngine" }); + + /** + * Calls GetReasoningEngine. + * @function getReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest} request GetReasoningEngineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|listReasoningEngines}. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @typedef ListReasoningEnginesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} [response] ListReasoningEnginesResponse + */ + + /** + * Calls ListReasoningEngines. + * @function listReasoningEngines + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest} request ListReasoningEnginesRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEnginesCallback} callback Node-style callback called with the error, if any, and ListReasoningEnginesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReasoningEngineService.prototype.listReasoningEngines = function listReasoningEngines(request, callback) { + return this.rpcCall(listReasoningEngines, $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest, $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse, request, callback); + }, "name", { value: "ListReasoningEngines" }); + + /** + * Calls ListReasoningEngines. + * @function listReasoningEngines + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest} request ListReasoningEnginesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.ReasoningEngineService|deleteReasoningEngine}. + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @typedef DeleteReasoningEngineCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteReasoningEngine. + * @function deleteReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest} request DeleteReasoningEngineRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngineCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReasoningEngineService.prototype.deleteReasoningEngine = function deleteReasoningEngine(request, callback) { + return this.rpcCall(deleteReasoningEngine, $root.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteReasoningEngine" }); + + /** + * Calls DeleteReasoningEngine. + * @function deleteReasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.ReasoningEngineService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest} request DeleteReasoningEngineRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReasoningEngineService; + })(); + + v1beta1.CreateReasoningEngineRequest = (function() { + + /** + * Properties of a CreateReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICreateReasoningEngineRequest + * @property {string|null} [parent] CreateReasoningEngineRequest parent + * @property {google.cloud.aiplatform.v1beta1.IReasoningEngine|null} [reasoningEngine] CreateReasoningEngineRequest reasoningEngine + */ + + /** + * Constructs a new CreateReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CreateReasoningEngineRequest. + * @implements ICreateReasoningEngineRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest=} [properties] Properties to set + */ + function CreateReasoningEngineRequest(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]]; + } + + /** + * CreateReasoningEngineRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @instance + */ + CreateReasoningEngineRequest.prototype.parent = ""; + + /** + * CreateReasoningEngineRequest reasoningEngine. + * @member {google.cloud.aiplatform.v1beta1.IReasoningEngine|null|undefined} reasoningEngine + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @instance + */ + CreateReasoningEngineRequest.prototype.reasoningEngine = null; + + /** + * Creates a new CreateReasoningEngineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest} CreateReasoningEngineRequest instance + */ + CreateReasoningEngineRequest.create = function create(properties) { + return new CreateReasoningEngineRequest(properties); + }; + + /** + * Encodes the specified CreateReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest} message CreateReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReasoningEngineRequest.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.reasoningEngine != null && Object.hasOwnProperty.call(message, "reasoningEngine")) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.encode(message.reasoningEngine, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest} message CreateReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReasoningEngineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReasoningEngineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest} CreateReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReasoningEngineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.reasoningEngine = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest} CreateReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReasoningEngineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReasoningEngineRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReasoningEngineRequest.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.reasoningEngine != null && message.hasOwnProperty("reasoningEngine")) { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.verify(message.reasoningEngine); + if (error) + return "reasoningEngine." + error; + } + return null; + }; + + /** + * Creates a CreateReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest} CreateReasoningEngineRequest + */ + CreateReasoningEngineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reasoningEngine != null) { + if (typeof object.reasoningEngine !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest.reasoningEngine: object expected"); + message.reasoningEngine = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.fromObject(object.reasoningEngine); + } + return message; + }; + + /** + * Creates a plain object from a CreateReasoningEngineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest} message CreateReasoningEngineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReasoningEngineRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reasoningEngine = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reasoningEngine != null && message.hasOwnProperty("reasoningEngine")) + object.reasoningEngine = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.toObject(message.reasoningEngine, options); + return object; + }; + + /** + * Converts this CreateReasoningEngineRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReasoningEngineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReasoningEngineRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReasoningEngineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest"; + }; + + return CreateReasoningEngineRequest; + })(); + + v1beta1.CreateReasoningEngineOperationMetadata = (function() { + + /** + * Properties of a CreateReasoningEngineOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICreateReasoningEngineOperationMetadata + * @property {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null} [genericMetadata] CreateReasoningEngineOperationMetadata genericMetadata + */ + + /** + * Constructs a new CreateReasoningEngineOperationMetadata. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CreateReasoningEngineOperationMetadata. + * @implements ICreateReasoningEngineOperationMetadata + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata=} [properties] Properties to set + */ + function CreateReasoningEngineOperationMetadata(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]]; + } + + /** + * CreateReasoningEngineOperationMetadata genericMetadata. + * @member {google.cloud.aiplatform.v1beta1.IGenericOperationMetadata|null|undefined} genericMetadata + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @instance + */ + CreateReasoningEngineOperationMetadata.prototype.genericMetadata = null; + + /** + * Creates a new CreateReasoningEngineOperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata} CreateReasoningEngineOperationMetadata instance + */ + CreateReasoningEngineOperationMetadata.create = function create(properties) { + return new CreateReasoningEngineOperationMetadata(properties); + }; + + /** + * Encodes the specified CreateReasoningEngineOperationMetadata message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata} message CreateReasoningEngineOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReasoningEngineOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genericMetadata != null && Object.hasOwnProperty.call(message, "genericMetadata")) + $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.encode(message.genericMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateReasoningEngineOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata} message CreateReasoningEngineOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReasoningEngineOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReasoningEngineOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata} CreateReasoningEngineOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReasoningEngineOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReasoningEngineOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata} CreateReasoningEngineOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReasoningEngineOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReasoningEngineOperationMetadata message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReasoningEngineOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) { + var error = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.verify(message.genericMetadata); + if (error) + return "genericMetadata." + error; + } + return null; + }; + + /** + * Creates a CreateReasoningEngineOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata} CreateReasoningEngineOperationMetadata + */ + CreateReasoningEngineOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata(); + if (object.genericMetadata != null) { + if (typeof object.genericMetadata !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata.genericMetadata: object expected"); + message.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.fromObject(object.genericMetadata); + } + return message; + }; + + /** + * Creates a plain object from a CreateReasoningEngineOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata} message CreateReasoningEngineOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReasoningEngineOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.genericMetadata = null; + if (message.genericMetadata != null && message.hasOwnProperty("genericMetadata")) + object.genericMetadata = $root.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.toObject(message.genericMetadata, options); + return object; + }; + + /** + * Converts this CreateReasoningEngineOperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + CreateReasoningEngineOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateReasoningEngineOperationMetadata + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateReasoningEngineOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata"; + }; + + return CreateReasoningEngineOperationMetadata; + })(); + + v1beta1.GetReasoningEngineRequest = (function() { + + /** + * Properties of a GetReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGetReasoningEngineRequest + * @property {string|null} [name] GetReasoningEngineRequest name + */ + + /** + * Constructs a new GetReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GetReasoningEngineRequest. + * @implements IGetReasoningEngineRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest=} [properties] Properties to set + */ + function GetReasoningEngineRequest(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]]; + } + + /** + * GetReasoningEngineRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @instance + */ + GetReasoningEngineRequest.prototype.name = ""; + + /** + * Creates a new GetReasoningEngineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest} GetReasoningEngineRequest instance + */ + GetReasoningEngineRequest.create = function create(properties) { + return new GetReasoningEngineRequest(properties); + }; + + /** + * Encodes the specified GetReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest} message GetReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReasoningEngineRequest.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 GetReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest} message GetReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReasoningEngineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReasoningEngineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest} GetReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReasoningEngineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest(); + 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 GetReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest} GetReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReasoningEngineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReasoningEngineRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReasoningEngineRequest.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 GetReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest} GetReasoningEngineRequest + */ + GetReasoningEngineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReasoningEngineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest} message GetReasoningEngineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReasoningEngineRequest.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 GetReasoningEngineRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @instance + * @returns {Object.} JSON object + */ + GetReasoningEngineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetReasoningEngineRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReasoningEngineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest"; + }; + + return GetReasoningEngineRequest; + })(); + + v1beta1.ListReasoningEnginesRequest = (function() { + + /** + * Properties of a ListReasoningEnginesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListReasoningEnginesRequest + * @property {string|null} [parent] ListReasoningEnginesRequest parent + * @property {string|null} [filter] ListReasoningEnginesRequest filter + * @property {number|null} [pageSize] ListReasoningEnginesRequest pageSize + * @property {string|null} [pageToken] ListReasoningEnginesRequest pageToken + */ + + /** + * Constructs a new ListReasoningEnginesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListReasoningEnginesRequest. + * @implements IListReasoningEnginesRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest=} [properties] Properties to set + */ + function ListReasoningEnginesRequest(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]]; + } + + /** + * ListReasoningEnginesRequest parent. + * @member {string} parent + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @instance + */ + ListReasoningEnginesRequest.prototype.parent = ""; + + /** + * ListReasoningEnginesRequest filter. + * @member {string} filter + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @instance + */ + ListReasoningEnginesRequest.prototype.filter = ""; + + /** + * ListReasoningEnginesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @instance + */ + ListReasoningEnginesRequest.prototype.pageSize = 0; + + /** + * ListReasoningEnginesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @instance + */ + ListReasoningEnginesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListReasoningEnginesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest} ListReasoningEnginesRequest instance + */ + ListReasoningEnginesRequest.create = function create(properties) { + return new ListReasoningEnginesRequest(properties); + }; + + /** + * Encodes the specified ListReasoningEnginesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest} message ListReasoningEnginesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReasoningEnginesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListReasoningEnginesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest} message ListReasoningEnginesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReasoningEnginesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReasoningEnginesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest} ListReasoningEnginesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReasoningEnginesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReasoningEnginesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest} ListReasoningEnginesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReasoningEnginesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReasoningEnginesRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReasoningEnginesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListReasoningEnginesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest} ListReasoningEnginesRequest + */ + ListReasoningEnginesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListReasoningEnginesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest} message ListReasoningEnginesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReasoningEnginesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListReasoningEnginesRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @instance + * @returns {Object.} JSON object + */ + ListReasoningEnginesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReasoningEnginesRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReasoningEnginesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest"; + }; + + return ListReasoningEnginesRequest; + })(); + + v1beta1.ListReasoningEnginesResponse = (function() { + + /** + * Properties of a ListReasoningEnginesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IListReasoningEnginesResponse + * @property {Array.|null} [reasoningEngines] ListReasoningEnginesResponse reasoningEngines + * @property {string|null} [nextPageToken] ListReasoningEnginesResponse nextPageToken + */ + + /** + * Constructs a new ListReasoningEnginesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ListReasoningEnginesResponse. + * @implements IListReasoningEnginesResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse=} [properties] Properties to set + */ + function ListReasoningEnginesResponse(properties) { + this.reasoningEngines = []; + 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]]; + } + + /** + * ListReasoningEnginesResponse reasoningEngines. + * @member {Array.} reasoningEngines + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @instance + */ + ListReasoningEnginesResponse.prototype.reasoningEngines = $util.emptyArray; + + /** + * ListReasoningEnginesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @instance + */ + ListReasoningEnginesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListReasoningEnginesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} ListReasoningEnginesResponse instance + */ + ListReasoningEnginesResponse.create = function create(properties) { + return new ListReasoningEnginesResponse(properties); + }; + + /** + * Encodes the specified ListReasoningEnginesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse} message ListReasoningEnginesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReasoningEnginesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reasoningEngines != null && message.reasoningEngines.length) + for (var i = 0; i < message.reasoningEngines.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.encode(message.reasoningEngines[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 ListReasoningEnginesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse} message ListReasoningEnginesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReasoningEnginesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReasoningEnginesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} ListReasoningEnginesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReasoningEnginesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.reasoningEngines && message.reasoningEngines.length)) + message.reasoningEngines = []; + message.reasoningEngines.push($root.google.cloud.aiplatform.v1beta1.ReasoningEngine.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReasoningEnginesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} ListReasoningEnginesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReasoningEnginesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReasoningEnginesResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReasoningEnginesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reasoningEngines != null && message.hasOwnProperty("reasoningEngines")) { + if (!Array.isArray(message.reasoningEngines)) + return "reasoningEngines: array expected"; + for (var i = 0; i < message.reasoningEngines.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.verify(message.reasoningEngines[i]); + if (error) + return "reasoningEngines." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListReasoningEnginesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} ListReasoningEnginesResponse + */ + ListReasoningEnginesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse(); + if (object.reasoningEngines) { + if (!Array.isArray(object.reasoningEngines)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.reasoningEngines: array expected"); + message.reasoningEngines = []; + for (var i = 0; i < object.reasoningEngines.length; ++i) { + if (typeof object.reasoningEngines[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse.reasoningEngines: object expected"); + message.reasoningEngines[i] = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.fromObject(object.reasoningEngines[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListReasoningEnginesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse} message ListReasoningEnginesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReasoningEnginesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.reasoningEngines = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.reasoningEngines && message.reasoningEngines.length) { + object.reasoningEngines = []; + for (var j = 0; j < message.reasoningEngines.length; ++j) + object.reasoningEngines[j] = $root.google.cloud.aiplatform.v1beta1.ReasoningEngine.toObject(message.reasoningEngines[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListReasoningEnginesResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @instance + * @returns {Object.} JSON object + */ + ListReasoningEnginesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReasoningEnginesResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReasoningEnginesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse"; + }; + + return ListReasoningEnginesResponse; + })(); + + v1beta1.DeleteReasoningEngineRequest = (function() { + + /** + * Properties of a DeleteReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IDeleteReasoningEngineRequest + * @property {string|null} [name] DeleteReasoningEngineRequest name + */ + + /** + * Constructs a new DeleteReasoningEngineRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a DeleteReasoningEngineRequest. + * @implements IDeleteReasoningEngineRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest=} [properties] Properties to set + */ + function DeleteReasoningEngineRequest(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]]; + } + + /** + * DeleteReasoningEngineRequest name. + * @member {string} name + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @instance + */ + DeleteReasoningEngineRequest.prototype.name = ""; + + /** + * Creates a new DeleteReasoningEngineRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest} DeleteReasoningEngineRequest instance + */ + DeleteReasoningEngineRequest.create = function create(properties) { + return new DeleteReasoningEngineRequest(properties); + }; + + /** + * Encodes the specified DeleteReasoningEngineRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest} message DeleteReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReasoningEngineRequest.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 DeleteReasoningEngineRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest} message DeleteReasoningEngineRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReasoningEngineRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteReasoningEngineRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest} DeleteReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReasoningEngineRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest(); + 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 DeleteReasoningEngineRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest} DeleteReasoningEngineRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReasoningEngineRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteReasoningEngineRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteReasoningEngineRequest.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 DeleteReasoningEngineRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest} DeleteReasoningEngineRequest + */ + DeleteReasoningEngineRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteReasoningEngineRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest} message DeleteReasoningEngineRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteReasoningEngineRequest.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 DeleteReasoningEngineRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteReasoningEngineRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteReasoningEngineRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteReasoningEngineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest"; + }; + + return DeleteReasoningEngineRequest; + })(); + v1beta1.Schedule = (function() { /** diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 0118b041b61..1c43b250712 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -6511,7 +6511,8 @@ "oneofs": { "storageType": { "oneof": [ - "bigtable" + "bigtable", + "optimized" ] } }, @@ -6520,6 +6521,10 @@ "type": "Bigtable", "id": 8 }, + "optimized": { + "type": "Optimized", + "id": 12 + }, "name": { "type": "string", "id": 1, @@ -6562,6 +6567,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "dedicatedServingEndpoint": { + "type": "DedicatedServingEndpoint", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -6603,6 +6615,20 @@ } } }, + "Optimized": { + "fields": {} + }, + "DedicatedServingEndpoint": { + "fields": { + "publicEndpointDomainName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "State": { "values": { "STATE_UNSPECIFIED": 0, @@ -7307,6 +7333,13 @@ "syncConfig": { "type": "SyncConfig", "id": 7 + }, + "indexConfig": { + "type": "IndexConfig", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -7337,6 +7370,106 @@ } } }, + "IndexConfig": { + "oneofs": { + "algorithmConfig": { + "oneof": [ + "treeAhConfig", + "bruteForceConfig" + ] + }, + "_embeddingDimension": { + "oneof": [ + "embeddingDimension" + ] + } + }, + "fields": { + "treeAhConfig": { + "type": "TreeAHConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "bruteForceConfig": { + "type": "BruteForceConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "embeddingColumn": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterColumns": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "crowdingColumn": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "embeddingDimension": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "distanceMeasureType": { + "type": "DistanceMeasureType", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BruteForceConfig": { + "fields": {} + }, + "TreeAHConfig": { + "oneofs": { + "_leafNodeEmbeddingCount": { + "oneof": [ + "leafNodeEmbeddingCount" + ] + } + }, + "fields": { + "leafNodeEmbeddingCount": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DistanceMeasureType": { + "values": { + "DISTANCE_MEASURE_TYPE_UNSPECIFIED": 0, + "SQUARED_L2_DISTANCE": 1, + "COSINE_DISTANCE": 2, + "DOT_PRODUCT_DISTANCE": 3 + } + } + } + }, "FeatureRegistrySource": { "oneofs": { "_projectNumber": { @@ -7575,6 +7708,10 @@ "protoStruct": { "type": "google.protobuf.Struct", "id": 2 + }, + "dataKey": { + "type": "FeatureViewDataKey", + "id": 4 } }, "nested": { @@ -28430,6 +28567,46 @@ } } }, + "ToolConfig": { + "fields": { + "functionCallingConfig": { + "type": "FunctionCallingConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FunctionCallingConfig": { + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedFunctionNames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "AUTO": 1, + "ANY": 2, + "NONE": 3 + } + } + } + }, "Type": { "values": { "TYPE_UNSPECIFIED": 0, @@ -46872,6 +47049,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "toolConfig": { + "type": "ToolConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "safetySettings": { "rule": "repeated", "type": "SafetySetting", @@ -46965,6 +47149,364 @@ } } }, + "ReasoningEngineSpec": { + "fields": { + "packageSpec": { + "type": "PackageSpec", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "classMethods": { + "rule": "repeated", + "type": "google.protobuf.Struct", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PackageSpec": { + "fields": { + "pickleObjectGcsUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dependencyFilesGcsUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requirementsGcsUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ReasoningEngine": { + "options": { + "(google.api.resource).type": "aiplatform.googleapis.com/ReasoningEngine", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}", + "(google.api.resource).plural": "reasoningEngines", + "(google.api.resource).singular": "reasoningEngine" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "spec": { + "type": "ReasoningEngineSpec", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ReasoningEngineExecutionService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "QueryReasoningEngine": { + "requestType": "QueryReasoningEngineRequest", + "responseType": "QueryReasoningEngineResponse", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}:query", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}:query", + "body": "*" + } + } + ] + } + } + }, + "QueryReasoningEngineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/ReasoningEngine" + } + }, + "input": { + "type": "google.protobuf.Struct", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QueryReasoningEngineResponse": { + "fields": { + "output": { + "type": "google.protobuf.Value", + "id": 1 + } + } + }, + "ReasoningEngineService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateReasoningEngine": { + "requestType": "CreateReasoningEngineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines", + "(google.api.http).body": "reasoning_engine", + "(google.api.method_signature)": "parent,reasoning_engine", + "(google.longrunning.operation_info).response_type": "ReasoningEngine", + "(google.longrunning.operation_info).metadata_type": "CreateReasoningEngineOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines", + "body": "reasoning_engine" + } + }, + { + "(google.api.method_signature)": "parent,reasoning_engine" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ReasoningEngine", + "metadata_type": "CreateReasoningEngineOperationMetadata" + } + } + ] + }, + "GetReasoningEngine": { + "requestType": "GetReasoningEngineRequest", + "responseType": "ReasoningEngine", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReasoningEngines": { + "requestType": "ListReasoningEnginesRequest", + "responseType": "ListReasoningEnginesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/reasoningEngines" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteReasoningEngine": { + "requestType": "DeleteReasoningEngineRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteOperationMetadata" + } + } + ] + } + } + }, + "CreateReasoningEngineRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "reasoningEngine": { + "type": "ReasoningEngine", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateReasoningEngineOperationMetadata": { + "fields": { + "genericMetadata": { + "type": "GenericOperationMetadata", + "id": 1 + } + } + }, + "GetReasoningEngineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/ReasoningEngine" + } + } + } + }, + "ListReasoningEnginesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReasoningEnginesResponse": { + "fields": { + "reasoningEngines": { + "rule": "repeated", + "type": "ReasoningEngine", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteReasoningEngineRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "aiplatform.googleapis.com/ReasoningEngine" + } + } + } + }, "Schedule": { "options": { "(google.api.resource).type": "aiplatform.googleapis.com/Schedule", diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 3a3c5757852..4c498daab02 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -500,6 +500,11 @@ * [Prediction_service.stream_generate_content](#prediction_service.stream_generate_content) * [Prediction_service.streaming_predict](#prediction_service.streaming_predict) * [Prediction_service.streaming_raw_predict](#prediction_service.streaming_raw_predict) + * [Reasoning_engine_execution_service.query_reasoning_engine](#reasoning_engine_execution_service.query_reasoning_engine) + * [Reasoning_engine_service.create_reasoning_engine](#reasoning_engine_service.create_reasoning_engine) + * [Reasoning_engine_service.delete_reasoning_engine](#reasoning_engine_service.delete_reasoning_engine) + * [Reasoning_engine_service.get_reasoning_engine](#reasoning_engine_service.get_reasoning_engine) + * [Reasoning_engine_service.list_reasoning_engines](#reasoning_engine_service.list_reasoning_engines) * [Schedule_service.create_schedule](#schedule_service.create_schedule) * [Schedule_service.delete_schedule](#schedule_service.delete_schedule) * [Schedule_service.get_schedule](#schedule_service.get_schedule) @@ -8870,6 +8875,91 @@ __Usage:__ +### Reasoning_engine_execution_service.query_reasoning_engine + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js` + + +----- + + + + +### Reasoning_engine_service.create_reasoning_engine + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js` + + +----- + + + + +### Reasoning_engine_service.delete_reasoning_engine + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js` + + +----- + + + + +### Reasoning_engine_service.get_reasoning_engine + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js` + + +----- + + + + +### Reasoning_engine_service.list_reasoning_engines + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js` + + +----- + + + + ### Schedule_service.create_schedule View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.create_schedule.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.generate_content.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.generate_content.js index 0bc7e86ac47..c38b08f318d 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.generate_content.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.generate_content.js @@ -49,6 +49,10 @@ function main(model, contents) { * knowledge and scope of the model. */ // const tools = [1,2,3,4] + /** + * Tool config. This config is shared for all tools provided in the request. + */ + // const toolConfig = {} /** * Optional. Per request settings for blocking unsafe content. * Enforced on GenerateContentResponse.candidates. diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js index 3eff2d37bda..9ecfcab8631 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/prediction_service.stream_generate_content.js @@ -49,6 +49,10 @@ function main(model, contents) { * knowledge and scope of the model. */ // const tools = [1,2,3,4] + /** + * Tool config. This config is shared for all tools provided in the request. + */ + // const toolConfig = {} /** * Optional. Per request settings for blocking unsafe content. * Enforced on GenerateContentResponse.candidates. diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js new file mode 100644 index 00000000000..d3edad2aaee --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 ReasoningEngine resource to use. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + */ + // const name = 'abc123' + /** + * Optional. Input content provided by users in JSON object format. Examples + * include text query, function calling parameters, media bytes, etc. + */ + // const input = {} + + // Imports the Aiplatform library + const {ReasoningEngineExecutionServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ReasoningEngineExecutionServiceClient(); + + async function callQueryReasoningEngine() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await aiplatformClient.queryReasoningEngine(request); + console.log(response); + } + + callQueryReasoningEngine(); + // [END aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js new file mode 100644 index 00000000000..678dc61aee4 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, reasoningEngine) { + // [START aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Location to create the ReasoningEngine + * in. Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The ReasoningEngine to create. + */ + // const reasoningEngine = {} + + // Imports the Aiplatform library + const {ReasoningEngineServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ReasoningEngineServiceClient(); + + async function callCreateReasoningEngine() { + // Construct request + const request = { + parent, + reasoningEngine, + }; + + // Run request + const [operation] = await aiplatformClient.createReasoningEngine(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateReasoningEngine(); + // [END aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js new file mode 100644 index 00000000000..79488327745 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js @@ -0,0 +1,64 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 ReasoningEngine resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {ReasoningEngineServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ReasoningEngineServiceClient(); + + async function callDeleteReasoningEngine() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await aiplatformClient.deleteReasoningEngine(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteReasoningEngine(); + // [END aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js new file mode 100644 index 00000000000..c8782d47a75 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START aiplatform_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require 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 ReasoningEngine resource. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + */ + // const name = 'abc123' + + // Imports the Aiplatform library + const {ReasoningEngineServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ReasoningEngineServiceClient(); + + async function callGetReasoningEngine() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await aiplatformClient.getReasoningEngine(request); + console.log(response); + } + + callGetReasoningEngine(); + // [END aiplatform_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js new file mode 100644 index 00000000000..5defe2818d8 --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the Location to list the ReasoningEngines + * from. Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Optional. The standard list filter. + * More detail in AIP-160 (https://google.aip.dev/160). + */ + // const filter = 'abc123' + /** + * Optional. The standard list page size. + */ + // const pageSize = 1234 + /** + * Optional. The standard list page token. + */ + // const pageToken = 'abc123' + + // Imports the Aiplatform library + const {ReasoningEngineServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new ReasoningEngineServiceClient(); + + async function callListReasoningEngines() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = aiplatformClient.listReasoningEnginesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListReasoningEngines(); + // [END aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 39091a0deec..91f730064f9 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 @@ -10150,7 +10150,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 84, "type": "FULL" } ], @@ -10171,6 +10171,10 @@ "name": "tools", "type": "TYPE_MESSAGE[]" }, + { + "name": "tool_config", + "type": ".google.cloud.aiplatform.v1beta1.ToolConfig" + }, { "name": "safety_settings", "type": "TYPE_MESSAGE[]" @@ -10206,7 +10210,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 86, "type": "FULL" } ], @@ -10227,6 +10231,10 @@ "name": "tools", "type": "TYPE_MESSAGE[]" }, + { + "name": "tool_config", + "type": ".google.cloud.aiplatform.v1beta1.ToolConfig" + }, { "name": "safety_settings", "type": "TYPE_MESSAGE[]" @@ -10251,6 +10259,226 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async", + "title": "DatasetService queryReasoningEngine Sample", + "origin": "API_DEFINITION", + "description": " Queries using a reasoning engine.", + "canonical": true, + "file": "reasoning_engine_execution_service.query_reasoning_engine.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "input", + "type": ".google.protobuf.Struct" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse", + "client": { + "shortName": "ReasoningEngineExecutionServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionServiceClient" + }, + "method": { + "shortName": "QueryReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService.QueryReasoningEngine", + "service": { + "shortName": "ReasoningEngineExecutionService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_async", + "title": "DatasetService createReasoningEngine Sample", + "origin": "API_DEFINITION", + "description": " Creates a reasoning engine.", + "canonical": true, + "file": "reasoning_engine_service.create_reasoning_engine.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "reasoning_engine", + "type": ".google.cloud.aiplatform.v1beta1.ReasoningEngine" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReasoningEngineServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineServiceClient" + }, + "method": { + "shortName": "CreateReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.CreateReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_async", + "title": "DatasetService getReasoningEngine Sample", + "origin": "API_DEFINITION", + "description": " Gets a reasoning engine.", + "canonical": true, + "file": "reasoning_engine_service.get_reasoning_engine.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.ReasoningEngine", + "client": { + "shortName": "ReasoningEngineServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineServiceClient" + }, + "method": { + "shortName": "GetReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.GetReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_async", + "title": "DatasetService listReasoningEngines Sample", + "origin": "API_DEFINITION", + "description": " Lists reasoning engines in a location.", + "canonical": true, + "file": "reasoning_engine_service.list_reasoning_engines.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReasoningEngines", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.ListReasoningEnginesResponse", + "client": { + "shortName": "ReasoningEngineServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineServiceClient" + }, + "method": { + "shortName": "ListReasoningEngines", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.ListReasoningEngines", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + } + }, + { + "regionTag": "aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_async", + "title": "DatasetService deleteReasoningEngine Sample", + "origin": "API_DEFINITION", + "description": " Deletes a reasoning engine.", + "canonical": true, + "file": "reasoning_engine_service.delete_reasoning_engine.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReasoningEngineServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineServiceClient" + }, + "method": { + "shortName": "DeleteReasoningEngine", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService.DeleteReasoningEngine", + "service": { + "shortName": "ReasoningEngineService", + "fullName": "google.cloud.aiplatform.v1beta1.ReasoningEngineService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_ScheduleService_CreateSchedule_async", "title": "DatasetService createSchedule Sample", 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 5d7cc96b545..6023224c99e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_client.ts @@ -319,6 +319,9 @@ export class DatasetServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -8050,6 +8053,65 @@ export class DatasetServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/dataset_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_client.ts index 02f579c4f76..10159f5ef0d 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 @@ -323,6 +323,9 @@ export class DeploymentResourcePoolServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5823,6 +5826,65 @@ export class DeploymentResourcePoolServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/deployment_resource_pool_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts index cdcd59cb985..16d8d69eecf 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_client.ts @@ -319,6 +319,9 @@ export class EndpointServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -6214,6 +6217,65 @@ export class EndpointServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/endpoint_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts index 07252bc97e3..074a9d30be6 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_client.ts @@ -324,6 +324,9 @@ export class FeatureOnlineStoreAdminServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -7225,6 +7228,65 @@ export class FeatureOnlineStoreAdminServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts index 27bd237321a..6d1e3030f1a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_client.ts @@ -312,6 +312,9 @@ export class FeatureOnlineStoreServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -3359,6 +3362,65 @@ export class FeatureOnlineStoreServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts index 57f566d4593..293720d214c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_client.ts @@ -324,6 +324,9 @@ export class FeatureRegistryServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -6774,6 +6777,65 @@ export class FeatureRegistryServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/feature_registry_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts index 5429e0d4fe2..e72655d3c10 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_client.ts @@ -312,6 +312,9 @@ export class FeaturestoreOnlineServingServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -3384,6 +3387,65 @@ export class FeaturestoreOnlineServingServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_online_serving_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts index 2f8b7b43359..c6ed1523ae1 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_client.ts @@ -322,6 +322,9 @@ export class FeaturestoreServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -8871,6 +8874,65 @@ export class FeaturestoreServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/featurestore_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index ba5edf035c5..36fc8e1984f 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -2593,6 +2593,88 @@ } } }, + "ReasoningEngineExecutionService": { + "clients": { + "grpc": { + "libraryClient": "ReasoningEngineExecutionServiceClient", + "rpcs": { + "QueryReasoningEngine": { + "methods": [ + "queryReasoningEngine" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReasoningEngineExecutionServiceClient", + "rpcs": { + "QueryReasoningEngine": { + "methods": [ + "queryReasoningEngine" + ] + } + } + } + } + }, + "ReasoningEngineService": { + "clients": { + "grpc": { + "libraryClient": "ReasoningEngineServiceClient", + "rpcs": { + "GetReasoningEngine": { + "methods": [ + "getReasoningEngine" + ] + }, + "CreateReasoningEngine": { + "methods": [ + "createReasoningEngine" + ] + }, + "DeleteReasoningEngine": { + "methods": [ + "deleteReasoningEngine" + ] + }, + "ListReasoningEngines": { + "methods": [ + "listReasoningEngines", + "listReasoningEnginesStream", + "listReasoningEnginesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReasoningEngineServiceClient", + "rpcs": { + "GetReasoningEngine": { + "methods": [ + "getReasoningEngine" + ] + }, + "CreateReasoningEngine": { + "methods": [ + "createReasoningEngine" + ] + }, + "DeleteReasoningEngine": { + "methods": [ + "deleteReasoningEngine" + ] + }, + "ListReasoningEngines": { + "methods": [ + "listReasoningEngines", + "listReasoningEnginesStream", + "listReasoningEnginesAsync" + ] + } + } + } + } + }, "ScheduleService": { "clients": { "grpc": { diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index.ts b/packages/google-cloud-aiplatform/src/v1beta1/index.ts index 5745070fbc0..3cd47e7b1a0 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index.ts @@ -36,6 +36,8 @@ export {ModelServiceClient} from './model_service_client'; export {PersistentResourceServiceClient} from './persistent_resource_service_client'; export {PipelineServiceClient} from './pipeline_service_client'; export {PredictionServiceClient} from './prediction_service_client'; +export {ReasoningEngineExecutionServiceClient} from './reasoning_engine_execution_service_client'; +export {ReasoningEngineServiceClient} from './reasoning_engine_service_client'; export {ScheduleServiceClient} from './schedule_service_client'; export {SpecialistPoolServiceClient} from './specialist_pool_service_client'; export {TensorboardServiceClient} from './tensorboard_service_client'; diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_client.ts index 2e15eda4156..2862065f546 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 @@ -319,6 +319,9 @@ export class IndexEndpointServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -6171,6 +6174,65 @@ export class IndexEndpointServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_endpoint_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts index 673360a8240..8f5de6fcc7e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_client.ts @@ -319,6 +319,9 @@ export class IndexServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5916,6 +5919,65 @@ export class IndexServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/index_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts index 28d9a07834e..5c2a11a57d9 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_client.ts @@ -319,6 +319,9 @@ export class JobServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -10270,6 +10273,65 @@ export class JobServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/job_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts index 82ff0a5ca2b..9bbbc91f8d8 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_client.ts @@ -311,6 +311,9 @@ export class LlmUtilityServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -3190,6 +3193,65 @@ export class LlmUtilityServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/llm_utility_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts index 88fea5c10bd..11299aa8cec 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_client.ts @@ -312,6 +312,9 @@ export class MatchServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -3304,6 +3307,65 @@ export class MatchServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/match_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts index 8d546934916..d279036723c 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_client.ts @@ -322,6 +322,9 @@ export class MetadataServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -9679,6 +9682,65 @@ export class MetadataServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/metadata_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts index 770fc915c6c..b731a9c0e3e 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_client.ts @@ -320,6 +320,9 @@ export class MigrationServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5345,6 +5348,65 @@ export class MigrationServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/migration_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts index be735a64d2c..24d742994dc 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts @@ -313,6 +313,9 @@ export class ModelGardenServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -3451,6 +3454,65 @@ export class ModelGardenServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts index d18c38d86ac..4016b04800d 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_client.ts @@ -319,6 +319,9 @@ export class ModelServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -7749,6 +7752,65 @@ export class ModelServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts index aa5c3247ee0..b224289e58b 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_client.ts @@ -320,6 +320,9 @@ export class PersistentResourceServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5730,6 +5733,65 @@ export class PersistentResourceServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/persistent_resource_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts index c4476a154a5..8c7890eedbf 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_client.ts @@ -324,6 +324,9 @@ export class PipelineServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -6876,6 +6879,65 @@ export class PipelineServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/pipeline_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts index db0b6f83a96..99f9c19fafa 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_client.ts @@ -311,6 +311,9 @@ export class PredictionServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -1252,6 +1255,8 @@ export class PredictionServiceClient { * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of * knowledge and scope of the model. + * @param {google.cloud.aiplatform.v1beta1.ToolConfig} [request.toolConfig] + * Tool config. This config is shared for all tools provided in the request. * @param {number[]} [request.safetySettings] * Optional. Per request settings for blocking unsafe content. * Enforced on GenerateContentResponse.candidates. @@ -1487,6 +1492,8 @@ export class PredictionServiceClient { * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of * knowledge and scope of the model. + * @param {google.cloud.aiplatform.v1beta1.ToolConfig} [request.toolConfig] + * Tool config. This config is shared for all tools provided in the request. * @param {number[]} [request.safetySettings] * Optional. Per request settings for blocking unsafe content. * Enforced on GenerateContentResponse.candidates. @@ -4104,6 +4111,65 @@ export class PredictionServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/prediction_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts new file mode 100644 index 00000000000..02e10249bb7 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client.ts @@ -0,0 +1,3967 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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/v1beta1/reasoning_engine_execution_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reasoning_engine_execution_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * A service for executing queries on Reasoning Engine. + * @class + * @memberof v1beta1 + */ +export class ReasoningEngineExecutionServiceClient { + 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}; + private _universeDomain: string; + private _servicePath: string; + 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}; + reasoningEngineExecutionServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReasoningEngineExecutionServiceClient. + * + * @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} [options.fallback] - Use HTTP/1.1 REST mode. + * 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 ReasoningEngineExecutionServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof ReasoningEngineExecutionServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'aiplatform.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._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 !== this._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 = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._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 { + 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}' + ), + datasetVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}' + ), + deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' + ), + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}' + ), + featureGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureGroups/{feature_group}' + ), + featureOnlineStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}' + ), + featureViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}' + ), + featureViewSyncPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync' + ), + 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}' + ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), + pipelineJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' + ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationFeatureGroupFeaturePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}' + ), + projectLocationFeaturestoreEntityTypeFeaturePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), + savedQueryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' + ), + schedulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schedules/{schedule}' + ), + specialistPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/specialistPools/{specialist_pool}' + ), + studyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}' + ), + tensorboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' + ), + tensorboardExperimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' + ), + tensorboardRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' + ), + tensorboardTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' + ), + trainingPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}' + ), + trialPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService', + 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.reasoningEngineExecutionServiceStub) { + return this.reasoningEngineExecutionServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService. + this.reasoningEngineExecutionServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1 + .ReasoningEngineExecutionService, + 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 reasoningEngineExecutionServiceStubMethods = ['queryReasoningEngine']; + for (const methodName of reasoningEngineExecutionServiceStubMethods) { + const callPromise = this.reasoningEngineExecutionServiceStub.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.reasoningEngineExecutionServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 -- + // ------------------- + /** + * Queries using a reasoning engine. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the ReasoningEngine resource to use. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + * @param {google.protobuf.Struct} [request.input] + * Optional. Input content provided by users in JSON object format. Examples + * include text query, function calling parameters, media bytes, etc. + * @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 protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse|QueryReasoningEngineResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_execution_service.query_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineExecutionService_QueryReasoningEngine_async + */ + queryReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | undefined + ), + {} | undefined, + ] + >; + queryReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + queryReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + queryReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineRequest + | 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.queryReasoningEngine(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<[IamProtos.google.iam.v1.Policy]> { + 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 {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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<[IamProtos.google.iam.v1.Policy]> { + 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 {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * 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 datasetVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} dataset_version + * @returns {string} Resource name string. + */ + datasetVersionPath( + project: string, + location: string, + dataset: string, + datasetVersion: string + ) { + return this.pathTemplates.datasetVersionPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + dataset_version: datasetVersion, + }); + } + + /** + * Parse the project from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).project; + } + + /** + * Parse the location from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).location; + } + + /** + * Parse the dataset from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).dataset; + } + + /** + * Parse the dataset_version from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the dataset_version. + */ + matchDatasetVersionFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).dataset_version; + } + + /** + * Return a fully-qualified deploymentResourcePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment_resource_pool + * @returns {string} Resource name string. + */ + deploymentResourcePoolPath( + project: string, + location: string, + deploymentResourcePool: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.render({ + project: project, + location: location, + deployment_resource_pool: deploymentResourcePool, + }); + } + + /** + * Parse the project from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).project; + } + + /** + * Parse the location from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).location; + } + + /** + * Parse the deployment_resource_pool from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the deployment_resource_pool. + */ + matchDeploymentResourcePoolFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).deployment_resource_pool; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + featurestore: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the featurestore from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .featurestore; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + metadataStore: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + execution: execution, + }); + } + + /** + * Parse the project from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .project; + } + + /** + * Parse the location from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .location; + } + + /** + * Parse the metadata_store from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .metadata_store; + } + + /** + * Parse the execution from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the execution. + */ + matchExecutionFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .execution; + } + + /** + * Return a fully-qualified featureGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_group + * @returns {string} Resource name string. + */ + featureGroupPath(project: string, location: string, featureGroup: string) { + return this.pathTemplates.featureGroupPathTemplate.render({ + project: project, + location: location, + feature_group: featureGroup, + }); + } + + /** + * Parse the project from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .project; + } + + /** + * Parse the location from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .location; + } + + /** + * Parse the feature_group from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the feature_group. + */ + matchFeatureGroupFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .feature_group; + } + + /** + * Return a fully-qualified featureOnlineStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @returns {string} Resource name string. + */ + featureOnlineStorePath( + project: string, + location: string, + featureOnlineStore: string + ) { + return this.pathTemplates.featureOnlineStorePathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + }); + } + + /** + * Parse the project from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureOnlineStoreName(featureOnlineStoreName: string) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).project; + } + + /** + * Parse the location from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureOnlineStoreName(featureOnlineStoreName: string) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).location; + } + + /** + * Parse the feature_online_store from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureOnlineStoreName( + featureOnlineStoreName: string + ) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).feature_online_store; + } + + /** + * Return a fully-qualified featureView resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @param {string} feature_view + * @returns {string} Resource name string. + */ + featureViewPath( + project: string, + location: string, + featureOnlineStore: string, + featureView: string + ) { + return this.pathTemplates.featureViewPathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + feature_view: featureView, + }); + } + + /** + * Parse the project from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .project; + } + + /** + * Parse the location from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .location; + } + + /** + * Parse the feature_online_store from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .feature_online_store; + } + + /** + * Parse the feature_view from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the feature_view. + */ + matchFeatureViewFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .feature_view; + } + + /** + * Return a fully-qualified featureViewSync resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @param {string} feature_view + * @returns {string} Resource name string. + */ + featureViewSyncPath( + project: string, + location: string, + featureOnlineStore: string, + featureView: string + ) { + return this.pathTemplates.featureViewSyncPathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + feature_view: featureView, + }); + } + + /** + * Parse the project from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).project; + } + + /** + * Parse the location from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).location; + } + + /** + * Parse the feature_online_store from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).feature_online_store; + } + + /** + * Parse the feature_view from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the feature_view. + */ + matchFeatureViewFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).feature_view; + } + + /** + * 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 persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + + /** + * Return a fully-qualified pipelineJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline_job + * @returns {string} Resource name string. + */ + pipelineJobPath(project: string, location: string, pipelineJob: string) { + return this.pathTemplates.pipelineJobPathTemplate.render({ + project: project, + location: location, + pipeline_job: pipelineJob, + }); + } + + /** + * Parse the project from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .project; + } + + /** + * Parse the location from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .location; + } + + /** + * Parse the pipeline_job from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the pipeline_job. + */ + matchPipelineJobFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .pipeline_job; + } + + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationFeatureGroupFeature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_group + * @param {string} feature + * @returns {string} Resource name string. + */ + projectLocationFeatureGroupFeaturePath( + project: string, + location: string, + featureGroup: string, + feature: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.render( + { + project: project, + location: location, + feature_group: featureGroup, + feature: feature, + } + ); + } + + /** + * Parse the project from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).project; + } + + /** + * Parse the location from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).location; + } + + /** + * Parse the feature_group from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the feature_group. + */ + matchFeatureGroupFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).feature_group; + } + + /** + * Parse the feature from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).feature; + } + + /** + * Return a fully-qualified projectLocationFeaturestoreEntityTypeFeature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @param {string} feature + * @returns {string} Resource name string. + */ + projectLocationFeaturestoreEntityTypeFeaturePath( + project: string, + location: string, + featurestore: string, + entityType: string, + feature: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.render( + { + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + feature: feature, + } + ); + } + + /** + * Parse the project from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).project; + } + + /** + * Parse the location from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).location; + } + + /** + * Parse the featurestore from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).featurestore; + } + + /** + * Parse the entity_type from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).entity_type; + } + + /** + * Parse the feature from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).feature; + } + + /** + * 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 reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + + /** + * Return a fully-qualified savedQuery resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} saved_query + * @returns {string} Resource name string. + */ + savedQueryPath( + project: string, + location: string, + dataset: string, + savedQuery: string + ) { + return this.pathTemplates.savedQueryPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + saved_query: savedQuery, + }); + } + + /** + * Parse the project from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .project; + } + + /** + * Parse the location from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .location; + } + + /** + * Parse the dataset from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .dataset; + } + + /** + * Parse the saved_query from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the saved_query. + */ + matchSavedQueryFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .saved_query; + } + + /** + * Return a fully-qualified schedule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schedule + * @returns {string} Resource name string. + */ + schedulePath(project: string, location: string, schedule: string) { + return this.pathTemplates.schedulePathTemplate.render({ + project: project, + location: location, + schedule: schedule, + }); + } + + /** + * Parse the project from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).project; + } + + /** + * Parse the location from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).location; + } + + /** + * Parse the schedule from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the schedule. + */ + matchScheduleFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).schedule; + } + + /** + * Return a fully-qualified specialistPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} specialist_pool + * @returns {string} Resource name string. + */ + specialistPoolPath( + project: string, + location: string, + specialistPool: string + ) { + return this.pathTemplates.specialistPoolPathTemplate.render({ + project: project, + location: location, + specialist_pool: specialistPool, + }); + } + + /** + * Parse the project from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).project; + } + + /** + * Parse the location from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).location; + } + + /** + * Parse the specialist_pool from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the specialist_pool. + */ + matchSpecialistPoolFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).specialist_pool; + } + + /** + * Return a fully-qualified study resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @returns {string} Resource name string. + */ + studyPath(project: string, location: string, study: string) { + return this.pathTemplates.studyPathTemplate.render({ + project: project, + location: location, + study: study, + }); + } + + /** + * Parse the project from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).project; + } + + /** + * Parse the location from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).location; + } + + /** + * Parse the study from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the study. + */ + matchStudyFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).study; + } + + /** + * Return a fully-qualified tensorboard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @returns {string} Resource name string. + */ + tensorboardPath(project: string, location: string, tensorboard: string) { + return this.pathTemplates.tensorboardPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + }); + } + + /** + * Parse the project from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .project; + } + + /** + * Parse the location from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .location; + } + + /** + * Parse the tensorboard from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .tensorboard; + } + + /** + * Return a fully-qualified tensorboardExperiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @returns {string} Resource name string. + */ + tensorboardExperimentPath( + project: string, + location: string, + tensorboard: string, + experiment: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + }); + } + + /** + * Parse the project from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardExperimentName(tensorboardExperimentName: string) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).project; + } + + /** + * Parse the location from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).location; + } + + /** + * Parse the tensorboard from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).experiment; + } + + /** + * Return a fully-qualified tensorboardRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @returns {string} Resource name string. + */ + tensorboardRunPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string + ) { + return this.pathTemplates.tensorboardRunPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + }); + } + + /** + * Parse the project from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).project; + } + + /** + * Parse the location from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).location; + } + + /** + * Parse the tensorboard from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).experiment; + } + + /** + * Parse the run from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).run; + } + + /** + * Return a fully-qualified tensorboardTimeSeries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @param {string} time_series + * @returns {string} Resource name string. + */ + tensorboardTimeSeriesPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string, + timeSeries: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + time_series: timeSeries, + }); + } + + /** + * Parse the project from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).project; + } + + /** + * Parse the location from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).location; + } + + /** + * Parse the tensorboard from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).experiment; + } + + /** + * Parse the run from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).run; + } + + /** + * Parse the time_series from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).time_series; + } + + /** + * Return a fully-qualified trainingPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} training_pipeline + * @returns {string} Resource name string. + */ + trainingPipelinePath( + project: string, + location: string, + trainingPipeline: string + ) { + return this.pathTemplates.trainingPipelinePathTemplate.render({ + project: project, + location: location, + training_pipeline: trainingPipeline, + }); + } + + /** + * Parse the project from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).project; + } + + /** + * Parse the location from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).location; + } + + /** + * Parse the training_pipeline from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the training_pipeline. + */ + matchTrainingPipelineFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).training_pipeline; + } + + /** + * Return a fully-qualified trial resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @param {string} trial + * @returns {string} Resource name string. + */ + trialPath(project: string, location: string, study: string, trial: string) { + return this.pathTemplates.trialPathTemplate.render({ + project: project, + location: location, + study: study, + trial: trial, + }); + } + + /** + * Parse the project from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).project; + } + + /** + * Parse the location from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).location; + } + + /** + * Parse the study from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the study. + */ + matchStudyFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).study; + } + + /** + * Parse the trial from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the trial. + */ + matchTrialFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).trial; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.reasoningEngineExecutionServiceStub && !this._terminated) { + return this.reasoningEngineExecutionServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client_config.json new file mode 100644 index 00000000000..f1dc90e9a4e --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.ReasoningEngineExecutionService": { + "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": { + "QueryReasoningEngine": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json new file mode 100644 index 00000000000..a27a1ab44c2 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_execution_service_proto_list.json @@ -0,0 +1,146 @@ +[ + "../../protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/content.proto", + "../../protos/google/cloud/aiplatform/v1beta1/context.proto", + "../../protos/google/cloud/aiplatform/v1beta1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_version.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/event.proto", + "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_group.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store_admin_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_registry_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_view.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_view_sync.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/io.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/openapi.proto", + "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1beta1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/study.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1beta1/types.proto", + "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1beta1/value.proto", + "../../protos/google/cloud/aiplatform/v1beta1/vizier_service.proto" +] diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts new file mode 100644 index 00000000000..0511eb875bf --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client.ts @@ -0,0 +1,6316 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + GrpcClientOptions, + LROperation, + PaginationCallback, + GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/reasoning_engine_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reasoning_engine_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * A service for managing Vertex AI's Reasoning Engines. + * @class + * @memberof v1beta1 + */ +export class ReasoningEngineServiceClient { + 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}; + private _universeDomain: string; + private _servicePath: string; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + reasoningEngineServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReasoningEngineServiceClient. + * + * @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} [options.fallback] - Use HTTP/1.1 REST mode. + * 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 ReasoningEngineServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof ReasoningEngineServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.' + ); + } + this._universeDomain = + opts?.universeDomain ?? opts?.universe_domain ?? 'googleapis.com'; + this._servicePath = 'aiplatform.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._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 !== this._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 = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._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 { + 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}' + ), + datasetVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}' + ), + deploymentResourcePoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}' + ), + entityTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}' + ), + executionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}' + ), + featureGroupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureGroups/{feature_group}' + ), + featureOnlineStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}' + ), + featureViewPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}' + ), + featureViewSyncPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}/featureViewSyncs/feature_view_sync' + ), + featurestorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}' + ), + hyperparameterTuningJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}' + ), + indexPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexes/{index}' + ), + indexEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + metadataSchemaPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/metadataSchemas/{metadata_schema}' + ), + metadataStorePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}' + ), + modelPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ), + modelDeploymentMonitoringJobPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}' + ), + modelEvaluationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}' + ), + modelEvaluationSlicePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}' + ), + nasJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}' + ), + nasTrialDetailPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}' + ), + persistentResourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ), + pipelineJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}' + ), + projectLocationEndpointPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ), + projectLocationFeatureGroupFeaturePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}' + ), + projectLocationFeaturestoreEntityTypeFeaturePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}' + ), + projectLocationPublisherModelPathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ), + publisherModelPathTemplate: new this._gaxModule.PathTemplate( + 'publishers/{publisher}/models/{model}' + ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), + savedQueryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' + ), + schedulePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schedules/{schedule}' + ), + specialistPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/specialistPools/{specialist_pool}' + ), + studyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}' + ), + tensorboardPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}' + ), + tensorboardExperimentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}' + ), + tensorboardRunPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}' + ), + tensorboardTimeSeriesPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}' + ), + trainingPipelinePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}' + ), + trialPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listReasoningEngines: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'reasoningEngines' + ), + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/ui/{name=projects/*/locations/*}', + additional_bindings: [ + {get: '/v1beta1/{name=projects/*/locations/*}'}, + ], + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/ui/{name=projects/*}/locations', + additional_bindings: [{get: '/v1beta1/{name=projects/*}/locations'}], + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + body: '*', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1beta1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + }, + { + post: '/v1beta1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + }, + { + post: '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/ui/{name=projects/*/locations/*/operations/*}:cancel', + additional_bindings: [ + { + post: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/exampleStores/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensions/*/deployments/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + }, + ], + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/ui/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + }, + { + delete: + '/ui/{name=projects/*/locations/*/extensions/*}/operations', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + {delete: '/ui/{name=projects/*/locations/*/models/*/operations/*}'}, + { + delete: + '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + }, + { + delete: + '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + {delete: '/v1beta1/{name=projects/*/locations/*/operations/*}'}, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/evaluationTasks/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/exampleStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/extensions/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/extensions/*/deployments/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + }, + { + delete: + '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + ], + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/ui/{name=projects/*/locations/*/operations/*}', + additional_bindings: [ + {get: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/extensions/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/models/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/studies/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + {get: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}'}, + { + get: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + }, + { + get: '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + }, + {get: '/v1beta1/{name=projects/*/locations/*/operations/*}'}, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/evaluationTasks/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/exampleStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensions/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensions/*/deployments/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + }, + ], + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/ui/{name=projects/*/locations/*}/operations', + additional_bindings: [ + {get: '/ui/{name=projects/*/locations/*/datasets/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations'}, + {get: '/ui/{name=projects/*/locations/*/endpoints/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/extensions/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/customJobs/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations'}, + {get: '/ui/{name=projects/*/locations/*/indexes/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/models/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/studies/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/schedules/*}/operations'}, + { + get: '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + }, + { + get: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + get: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, + { + get: '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + }, + { + get: '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + }, + {get: '/v1beta1/{name=projects/*/locations/*}/operations'}, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/endpoints/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/evaluationTasks/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/exampleStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensionControllers/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensions/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/extensions/*/deployments/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/customJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexes/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/migratableResources/*}/operations', + }, + {get: '/v1beta1/{name=projects/*/locations/*/models/*}/operations'}, + { + get: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/persistentResources/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/reasoningEngines/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/solvers/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/schedules/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/specialistPools/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureGroups/*}/operations', + }, + { + get: '/v1beta1/{name=projects/*/locations/*/featureGroups/*/features/*}/operations', + }, + {get: '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations'}, + ], + }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/ui/{name=projects/*/locations/*/operations/*}:wait', + additional_bindings: [ + { + post: '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + }, + { + post: '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + }, + {post: '/v1beta1/{name=projects/*/locations/*/operations/*}:wait'}, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/evaluationTasks/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/exampleStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/extensions/*/deployments/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/reasoningEngines/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + }, + { + post: '/v1beta1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + }, + ], + }, + ]; + } + this.operationsClient = this._gaxModule + .lro(lroOptions) + .operationsClient(opts); + const createReasoningEngineResponse = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.ReasoningEngine' + ) as gax.protobuf.Type; + const createReasoningEngineMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata' + ) as gax.protobuf.Type; + const deleteReasoningEngineResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteReasoningEngineMetadata = protoFilesRoot.lookup( + '.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + createReasoningEngine: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReasoningEngineResponse.decode.bind( + createReasoningEngineResponse + ), + createReasoningEngineMetadata.decode.bind(createReasoningEngineMetadata) + ), + deleteReasoningEngine: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteReasoningEngineResponse.decode.bind( + deleteReasoningEngineResponse + ), + deleteReasoningEngineMetadata.decode.bind(deleteReasoningEngineMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.ReasoningEngineService', + 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.reasoningEngineServiceStub) { + return this.reasoningEngineServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.ReasoningEngineService. + this.reasoningEngineServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.ReasoningEngineService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1 + .ReasoningEngineService, + 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 reasoningEngineServiceStubMethods = [ + 'createReasoningEngine', + 'getReasoningEngine', + 'listReasoningEngines', + 'deleteReasoningEngine', + ]; + for (const methodName of reasoningEngineServiceStubMethods) { + const callPromise = this.reasoningEngineServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.reasoningEngineServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process !== undefined && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning' + ); + } + return 'aiplatform.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * 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 reasoning engine. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the ReasoningEngine resource. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + * @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 protos.google.cloud.aiplatform.v1beta1.ReasoningEngine|ReasoningEngine}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.get_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_GetReasoningEngine_async + */ + getReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | undefined + ), + {} | undefined, + ] + >; + getReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + ( + | protos.google.cloud.aiplatform.v1beta1.IGetReasoningEngineRequest + | 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.getReasoningEngine(request, options, callback); + } + + /** + * Creates a reasoning engine. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to create the ReasoningEngine + * in. Format: `projects/{project}/locations/{location}` + * @param {google.cloud.aiplatform.v1beta1.ReasoningEngine} request.reasoningEngine + * Required. The ReasoningEngine to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_async + */ + createReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, + callback: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createReasoningEngine(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createReasoningEngine()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.create_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_CreateReasoningEngine_async + */ + async checkCreateReasoningEngineProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.aiplatform.v1beta1.ReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.createReasoningEngine, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.aiplatform.v1beta1.ReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineOperationMetadata + >; + } + /** + * Deletes a reasoning engine. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the ReasoningEngine resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_async + */ + deleteReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteReasoningEngine( + request: protos.google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteReasoningEngine( + request?: protos.google.cloud.aiplatform.v1beta1.IDeleteReasoningEngineRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteReasoningEngine(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteReasoningEngine()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.delete_reasoning_engine.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_DeleteReasoningEngine_async + */ + async checkDeleteReasoningEngineProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.deleteReasoningEngine, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata + >; + } + /** + * Lists reasoning engines in a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the ReasoningEngines + * from. Format: `projects/{project}/locations/{location}` + * @param {string} [request.filter] + * Optional. The standard list filter. + * More detail in [AIP-160](https://google.aip.dev/160). + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. 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 {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.aiplatform.v1beta1.ReasoningEngine|ReasoningEngine}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listReasoningEnginesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReasoningEngines( + request?: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine[], + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest | null, + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse, + ] + >; + listReasoningEngines( + request: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine + > + ): void; + listReasoningEngines( + request: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + callback: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine + > + ): void; + listReasoningEngines( + request?: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine + >, + callback?: PaginationCallback< + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + | protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse + | null + | undefined, + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine[], + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest | null, + protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listReasoningEngines(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the ReasoningEngines + * from. Format: `projects/{project}/locations/{location}` + * @param {string} [request.filter] + * Optional. The standard list filter. + * More detail in [AIP-160](https://google.aip.dev/160). + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. 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 {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.aiplatform.v1beta1.ReasoningEngine|ReasoningEngine} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listReasoningEnginesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listReasoningEnginesStream( + request?: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReasoningEngines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReasoningEngines.createStream( + this.innerApiCalls.listReasoningEngines as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listReasoningEngines`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the Location to list the ReasoningEngines + * from. Format: `projects/{project}/locations/{location}` + * @param {string} [request.filter] + * Optional. The standard list filter. + * More detail in [AIP-160](https://google.aip.dev/160). + * @param {number} [request.pageSize] + * Optional. The standard list page size. + * @param {string} [request.pageToken] + * Optional. 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.aiplatform.v1beta1.ReasoningEngine|ReasoningEngine}. 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/reasoning_engine_service.list_reasoning_engines.js + * region_tag:aiplatform_v1beta1_generated_ReasoningEngineService_ListReasoningEngines_async + */ + listReasoningEnginesAsync( + request?: protos.google.cloud.aiplatform.v1beta1.IListReasoningEnginesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listReasoningEngines']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listReasoningEngines.asyncIterate( + this.innerApiCalls['listReasoningEngines'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise<[IamProtos.google.iam.v1.Policy]> { + 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 {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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<[IamProtos.google.iam.v1.Policy]> { + 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 {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @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<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * 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 {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * 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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified annotation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @param {string} annotation + * @returns {string} Resource name string. + */ + annotationPath( + project: string, + location: string, + dataset: string, + dataItem: string, + annotation: string + ) { + return this.pathTemplates.annotationPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + annotation: annotation, + }); + } + + /** + * Parse the project from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .project; + } + + /** + * Parse the location from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .location; + } + + /** + * Parse the dataset from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .dataset; + } + + /** + * Parse the data_item from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .data_item; + } + + /** + * Parse the annotation from Annotation resource. + * + * @param {string} annotationName + * A fully-qualified path representing Annotation resource. + * @returns {string} A string representing the annotation. + */ + matchAnnotationFromAnnotationName(annotationName: string) { + return this.pathTemplates.annotationPathTemplate.match(annotationName) + .annotation; + } + + /** + * Return a fully-qualified annotationSpec resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} annotation_spec + * @returns {string} Resource name string. + */ + annotationSpecPath( + project: string, + location: string, + dataset: string, + annotationSpec: string + ) { + return this.pathTemplates.annotationSpecPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + annotation_spec: annotationSpec, + }); + } + + /** + * Parse the project from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).project; + } + + /** + * Parse the location from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).location; + } + + /** + * Parse the dataset from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).dataset; + } + + /** + * Parse the annotation_spec from AnnotationSpec resource. + * + * @param {string} annotationSpecName + * A fully-qualified path representing AnnotationSpec resource. + * @returns {string} A string representing the annotation_spec. + */ + matchAnnotationSpecFromAnnotationSpecName(annotationSpecName: string) { + return this.pathTemplates.annotationSpecPathTemplate.match( + annotationSpecName + ).annotation_spec; + } + + /** + * Return a fully-qualified artifact resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} artifact + * @returns {string} Resource name string. + */ + artifactPath( + project: string, + location: string, + metadataStore: string, + artifact: string + ) { + return this.pathTemplates.artifactPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + artifact: artifact, + }); + } + + /** + * Parse the project from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the project. + */ + matchProjectFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).project; + } + + /** + * Parse the location from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the location. + */ + matchLocationFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).location; + } + + /** + * Parse the metadata_store from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName) + .metadata_store; + } + + /** + * Parse the artifact from Artifact resource. + * + * @param {string} artifactName + * A fully-qualified path representing Artifact resource. + * @returns {string} A string representing the artifact. + */ + matchArtifactFromArtifactName(artifactName: string) { + return this.pathTemplates.artifactPathTemplate.match(artifactName).artifact; + } + + /** + * Return a fully-qualified batchPredictionJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} batch_prediction_job + * @returns {string} Resource name string. + */ + batchPredictionJobPath( + project: string, + location: string, + batchPredictionJob: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.render({ + project: project, + location: location, + batch_prediction_job: batchPredictionJob, + }); + } + + /** + * Parse the project from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).project; + } + + /** + * Parse the location from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBatchPredictionJobName(batchPredictionJobName: string) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).location; + } + + /** + * Parse the batch_prediction_job from BatchPredictionJob resource. + * + * @param {string} batchPredictionJobName + * A fully-qualified path representing BatchPredictionJob resource. + * @returns {string} A string representing the batch_prediction_job. + */ + matchBatchPredictionJobFromBatchPredictionJobName( + batchPredictionJobName: string + ) { + return this.pathTemplates.batchPredictionJobPathTemplate.match( + batchPredictionJobName + ).batch_prediction_job; + } + + /** + * Return a fully-qualified context resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} context + * @returns {string} Resource name string. + */ + contextPath( + project: string, + location: string, + metadataStore: string, + context: string + ) { + return this.pathTemplates.contextPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + context: context, + }); + } + + /** + * Parse the project from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the project. + */ + matchProjectFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).project; + } + + /** + * Parse the location from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the location. + */ + matchLocationFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).location; + } + + /** + * Parse the metadata_store from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName) + .metadata_store; + } + + /** + * Parse the context from Context resource. + * + * @param {string} contextName + * A fully-qualified path representing Context resource. + * @returns {string} A string representing the context. + */ + matchContextFromContextName(contextName: string) { + return this.pathTemplates.contextPathTemplate.match(contextName).context; + } + + /** + * Return a fully-qualified customJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} custom_job + * @returns {string} Resource name string. + */ + customJobPath(project: string, location: string, customJob: string) { + return this.pathTemplates.customJobPathTemplate.render({ + project: project, + location: location, + custom_job: customJob, + }); + } + + /** + * Parse the project from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .project; + } + + /** + * Parse the location from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .location; + } + + /** + * Parse the custom_job from CustomJob resource. + * + * @param {string} customJobName + * A fully-qualified path representing CustomJob resource. + * @returns {string} A string representing the custom_job. + */ + matchCustomJobFromCustomJobName(customJobName: string) { + return this.pathTemplates.customJobPathTemplate.match(customJobName) + .custom_job; + } + + /** + * Return a fully-qualified dataItem resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} data_item + * @returns {string} Resource name string. + */ + dataItemPath( + project: string, + location: string, + dataset: string, + dataItem: string + ) { + return this.pathTemplates.dataItemPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + data_item: dataItem, + }); + } + + /** + * Parse the project from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).project; + } + + /** + * Parse the location from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).location; + } + + /** + * Parse the dataset from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName).dataset; + } + + /** + * Parse the data_item from DataItem resource. + * + * @param {string} dataItemName + * A fully-qualified path representing DataItem resource. + * @returns {string} A string representing the data_item. + */ + matchDataItemFromDataItemName(dataItemName: string) { + return this.pathTemplates.dataItemPathTemplate.match(dataItemName) + .data_item; + } + + /** + * Return a fully-qualified dataLabelingJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_labeling_job + * @returns {string} Resource name string. + */ + dataLabelingJobPath( + project: string, + location: string, + dataLabelingJob: string + ) { + return this.pathTemplates.dataLabelingJobPathTemplate.render({ + project: project, + location: location, + data_labeling_job: dataLabelingJob, + }); + } + + /** + * Parse the project from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).project; + } + + /** + * Parse the location from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).location; + } + + /** + * Parse the data_labeling_job from DataLabelingJob resource. + * + * @param {string} dataLabelingJobName + * A fully-qualified path representing DataLabelingJob resource. + * @returns {string} A string representing the data_labeling_job. + */ + matchDataLabelingJobFromDataLabelingJobName(dataLabelingJobName: string) { + return this.pathTemplates.dataLabelingJobPathTemplate.match( + dataLabelingJobName + ).data_labeling_job; + } + + /** + * Return a fully-qualified dataset resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @returns {string} Resource name string. + */ + datasetPath(project: string, location: string, dataset: string) { + return this.pathTemplates.datasetPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + }); + } + + /** + * Parse the project from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).project; + } + + /** + * Parse the location from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).location; + } + + /** + * Parse the dataset from Dataset resource. + * + * @param {string} datasetName + * A fully-qualified path representing Dataset resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetName(datasetName: string) { + return this.pathTemplates.datasetPathTemplate.match(datasetName).dataset; + } + + /** + * Return a fully-qualified datasetVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} dataset_version + * @returns {string} Resource name string. + */ + datasetVersionPath( + project: string, + location: string, + dataset: string, + datasetVersion: string + ) { + return this.pathTemplates.datasetVersionPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + dataset_version: datasetVersion, + }); + } + + /** + * Parse the project from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).project; + } + + /** + * Parse the location from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).location; + } + + /** + * Parse the dataset from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).dataset; + } + + /** + * Parse the dataset_version from DatasetVersion resource. + * + * @param {string} datasetVersionName + * A fully-qualified path representing DatasetVersion resource. + * @returns {string} A string representing the dataset_version. + */ + matchDatasetVersionFromDatasetVersionName(datasetVersionName: string) { + return this.pathTemplates.datasetVersionPathTemplate.match( + datasetVersionName + ).dataset_version; + } + + /** + * Return a fully-qualified deploymentResourcePool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deployment_resource_pool + * @returns {string} Resource name string. + */ + deploymentResourcePoolPath( + project: string, + location: string, + deploymentResourcePool: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.render({ + project: project, + location: location, + deployment_resource_pool: deploymentResourcePool, + }); + } + + /** + * Parse the project from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).project; + } + + /** + * Parse the location from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).location; + } + + /** + * Parse the deployment_resource_pool from DeploymentResourcePool resource. + * + * @param {string} deploymentResourcePoolName + * A fully-qualified path representing DeploymentResourcePool resource. + * @returns {string} A string representing the deployment_resource_pool. + */ + matchDeploymentResourcePoolFromDeploymentResourcePoolName( + deploymentResourcePoolName: string + ) { + return this.pathTemplates.deploymentResourcePoolPathTemplate.match( + deploymentResourcePoolName + ).deployment_resource_pool; + } + + /** + * Return a fully-qualified entityType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @returns {string} Resource name string. + */ + entityTypePath( + project: string, + location: string, + featurestore: string, + entityType: string + ) { + return this.pathTemplates.entityTypePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + }); + } + + /** + * Parse the project from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .project; + } + + /** + * Parse the location from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .location; + } + + /** + * Parse the featurestore from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .featurestore; + } + + /** + * Parse the entity_type from EntityType resource. + * + * @param {string} entityTypeName + * A fully-qualified path representing EntityType resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromEntityTypeName(entityTypeName: string) { + return this.pathTemplates.entityTypePathTemplate.match(entityTypeName) + .entity_type; + } + + /** + * Return a fully-qualified execution resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} execution + * @returns {string} Resource name string. + */ + executionPath( + project: string, + location: string, + metadataStore: string, + execution: string + ) { + return this.pathTemplates.executionPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + execution: execution, + }); + } + + /** + * Parse the project from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the project. + */ + matchProjectFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .project; + } + + /** + * Parse the location from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the location. + */ + matchLocationFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .location; + } + + /** + * Parse the metadata_store from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .metadata_store; + } + + /** + * Parse the execution from Execution resource. + * + * @param {string} executionName + * A fully-qualified path representing Execution resource. + * @returns {string} A string representing the execution. + */ + matchExecutionFromExecutionName(executionName: string) { + return this.pathTemplates.executionPathTemplate.match(executionName) + .execution; + } + + /** + * Return a fully-qualified featureGroup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_group + * @returns {string} Resource name string. + */ + featureGroupPath(project: string, location: string, featureGroup: string) { + return this.pathTemplates.featureGroupPathTemplate.render({ + project: project, + location: location, + feature_group: featureGroup, + }); + } + + /** + * Parse the project from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .project; + } + + /** + * Parse the location from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .location; + } + + /** + * Parse the feature_group from FeatureGroup resource. + * + * @param {string} featureGroupName + * A fully-qualified path representing FeatureGroup resource. + * @returns {string} A string representing the feature_group. + */ + matchFeatureGroupFromFeatureGroupName(featureGroupName: string) { + return this.pathTemplates.featureGroupPathTemplate.match(featureGroupName) + .feature_group; + } + + /** + * Return a fully-qualified featureOnlineStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @returns {string} Resource name string. + */ + featureOnlineStorePath( + project: string, + location: string, + featureOnlineStore: string + ) { + return this.pathTemplates.featureOnlineStorePathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + }); + } + + /** + * Parse the project from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureOnlineStoreName(featureOnlineStoreName: string) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).project; + } + + /** + * Parse the location from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureOnlineStoreName(featureOnlineStoreName: string) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).location; + } + + /** + * Parse the feature_online_store from FeatureOnlineStore resource. + * + * @param {string} featureOnlineStoreName + * A fully-qualified path representing FeatureOnlineStore resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureOnlineStoreName( + featureOnlineStoreName: string + ) { + return this.pathTemplates.featureOnlineStorePathTemplate.match( + featureOnlineStoreName + ).feature_online_store; + } + + /** + * Return a fully-qualified featureView resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @param {string} feature_view + * @returns {string} Resource name string. + */ + featureViewPath( + project: string, + location: string, + featureOnlineStore: string, + featureView: string + ) { + return this.pathTemplates.featureViewPathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + feature_view: featureView, + }); + } + + /** + * Parse the project from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .project; + } + + /** + * Parse the location from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .location; + } + + /** + * Parse the feature_online_store from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .feature_online_store; + } + + /** + * Parse the feature_view from FeatureView resource. + * + * @param {string} featureViewName + * A fully-qualified path representing FeatureView resource. + * @returns {string} A string representing the feature_view. + */ + matchFeatureViewFromFeatureViewName(featureViewName: string) { + return this.pathTemplates.featureViewPathTemplate.match(featureViewName) + .feature_view; + } + + /** + * Return a fully-qualified featureViewSync resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_online_store + * @param {string} feature_view + * @returns {string} Resource name string. + */ + featureViewSyncPath( + project: string, + location: string, + featureOnlineStore: string, + featureView: string + ) { + return this.pathTemplates.featureViewSyncPathTemplate.render({ + project: project, + location: location, + feature_online_store: featureOnlineStore, + feature_view: featureView, + }); + } + + /** + * Parse the project from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).project; + } + + /** + * Parse the location from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).location; + } + + /** + * Parse the feature_online_store from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the feature_online_store. + */ + matchFeatureOnlineStoreFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).feature_online_store; + } + + /** + * Parse the feature_view from FeatureViewSync resource. + * + * @param {string} featureViewSyncName + * A fully-qualified path representing FeatureViewSync resource. + * @returns {string} A string representing the feature_view. + */ + matchFeatureViewFromFeatureViewSyncName(featureViewSyncName: string) { + return this.pathTemplates.featureViewSyncPathTemplate.match( + featureViewSyncName + ).feature_view; + } + + /** + * Return a fully-qualified featurestore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @returns {string} Resource name string. + */ + featurestorePath(project: string, location: string, featurestore: string) { + return this.pathTemplates.featurestorePathTemplate.render({ + project: project, + location: location, + featurestore: featurestore, + }); + } + + /** + * Parse the project from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .project; + } + + /** + * Parse the location from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .location; + } + + /** + * Parse the featurestore from Featurestore resource. + * + * @param {string} featurestoreName + * A fully-qualified path representing Featurestore resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromFeaturestoreName(featurestoreName: string) { + return this.pathTemplates.featurestorePathTemplate.match(featurestoreName) + .featurestore; + } + + /** + * Return a fully-qualified hyperparameterTuningJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} hyperparameter_tuning_job + * @returns {string} Resource name string. + */ + hyperparameterTuningJobPath( + project: string, + location: string, + hyperparameterTuningJob: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.render({ + project: project, + location: location, + hyperparameter_tuning_job: hyperparameterTuningJob, + }); + } + + /** + * Parse the project from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).project; + } + + /** + * Parse the location from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).location; + } + + /** + * Parse the hyperparameter_tuning_job from HyperparameterTuningJob resource. + * + * @param {string} hyperparameterTuningJobName + * A fully-qualified path representing HyperparameterTuningJob resource. + * @returns {string} A string representing the hyperparameter_tuning_job. + */ + matchHyperparameterTuningJobFromHyperparameterTuningJobName( + hyperparameterTuningJobName: string + ) { + return this.pathTemplates.hyperparameterTuningJobPathTemplate.match( + hyperparameterTuningJobName + ).hyperparameter_tuning_job; + } + + /** + * Return a fully-qualified index resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index + * @returns {string} Resource name string. + */ + indexPath(project: string, location: string, index: string) { + return this.pathTemplates.indexPathTemplate.render({ + project: project, + location: location, + index: index, + }); + } + + /** + * Parse the project from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).project; + } + + /** + * Parse the location from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).location; + } + + /** + * Parse the index from Index resource. + * + * @param {string} indexName + * A fully-qualified path representing Index resource. + * @returns {string} A string representing the index. + */ + matchIndexFromIndexName(indexName: string) { + return this.pathTemplates.indexPathTemplate.match(indexName).index; + } + + /** + * Return a fully-qualified indexEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} index_endpoint + * @returns {string} Resource name string. + */ + indexEndpointPath(project: string, location: string, indexEndpoint: string) { + return this.pathTemplates.indexEndpointPathTemplate.render({ + project: project, + location: location, + index_endpoint: indexEndpoint, + }); + } + + /** + * Parse the project from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .project; + } + + /** + * Parse the location from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .location; + } + + /** + * Parse the index_endpoint from IndexEndpoint resource. + * + * @param {string} indexEndpointName + * A fully-qualified path representing IndexEndpoint resource. + * @returns {string} A string representing the index_endpoint. + */ + matchIndexEndpointFromIndexEndpointName(indexEndpointName: string) { + return this.pathTemplates.indexEndpointPathTemplate.match(indexEndpointName) + .index_endpoint; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified metadataSchema resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @param {string} metadata_schema + * @returns {string} Resource name string. + */ + metadataSchemaPath( + project: string, + location: string, + metadataStore: string, + metadataSchema: string + ) { + return this.pathTemplates.metadataSchemaPathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + metadata_schema: metadataSchema, + }); + } + + /** + * Parse the project from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).project; + } + + /** + * Parse the location from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).location; + } + + /** + * Parse the metadata_store from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_store; + } + + /** + * Parse the metadata_schema from MetadataSchema resource. + * + * @param {string} metadataSchemaName + * A fully-qualified path representing MetadataSchema resource. + * @returns {string} A string representing the metadata_schema. + */ + matchMetadataSchemaFromMetadataSchemaName(metadataSchemaName: string) { + return this.pathTemplates.metadataSchemaPathTemplate.match( + metadataSchemaName + ).metadata_schema; + } + + /** + * Return a fully-qualified metadataStore resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} metadata_store + * @returns {string} Resource name string. + */ + metadataStorePath(project: string, location: string, metadataStore: string) { + return this.pathTemplates.metadataStorePathTemplate.render({ + project: project, + location: location, + metadata_store: metadataStore, + }); + } + + /** + * Parse the project from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .project; + } + + /** + * Parse the location from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .location; + } + + /** + * Parse the metadata_store from MetadataStore resource. + * + * @param {string} metadataStoreName + * A fully-qualified path representing MetadataStore resource. + * @returns {string} A string representing the metadata_store. + */ + matchMetadataStoreFromMetadataStoreName(metadataStoreName: string) { + return this.pathTemplates.metadataStorePathTemplate.match(metadataStoreName) + .metadata_store; + } + + /** + * Return a fully-qualified model resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @returns {string} Resource name string. + */ + modelPath(project: string, location: string, model: string) { + return this.pathTemplates.modelPathTemplate.render({ + project: project, + location: location, + model: model, + }); + } + + /** + * Parse the project from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).project; + } + + /** + * Parse the location from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).location; + } + + /** + * Parse the model from Model resource. + * + * @param {string} modelName + * A fully-qualified path representing Model resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelName(modelName: string) { + return this.pathTemplates.modelPathTemplate.match(modelName).model; + } + + /** + * Return a fully-qualified modelDeploymentMonitoringJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model_deployment_monitoring_job + * @returns {string} Resource name string. + */ + modelDeploymentMonitoringJobPath( + project: string, + location: string, + modelDeploymentMonitoringJob: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.render({ + project: project, + location: location, + model_deployment_monitoring_job: modelDeploymentMonitoringJob, + }); + } + + /** + * Parse the project from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).project; + } + + /** + * Parse the location from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).location; + } + + /** + * Parse the model_deployment_monitoring_job from ModelDeploymentMonitoringJob resource. + * + * @param {string} modelDeploymentMonitoringJobName + * A fully-qualified path representing ModelDeploymentMonitoringJob resource. + * @returns {string} A string representing the model_deployment_monitoring_job. + */ + matchModelDeploymentMonitoringJobFromModelDeploymentMonitoringJobName( + modelDeploymentMonitoringJobName: string + ) { + return this.pathTemplates.modelDeploymentMonitoringJobPathTemplate.match( + modelDeploymentMonitoringJobName + ).model_deployment_monitoring_job; + } + + /** + * Return a fully-qualified modelEvaluation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @returns {string} Resource name string. + */ + modelEvaluationPath( + project: string, + location: string, + model: string, + evaluation: string + ) { + return this.pathTemplates.modelEvaluationPathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + }); + } + + /** + * Parse the project from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).project; + } + + /** + * Parse the location from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).location; + } + + /** + * Parse the model from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluation resource. + * + * @param {string} modelEvaluationName + * A fully-qualified path representing ModelEvaluation resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationName(modelEvaluationName: string) { + return this.pathTemplates.modelEvaluationPathTemplate.match( + modelEvaluationName + ).evaluation; + } + + /** + * Return a fully-qualified modelEvaluationSlice resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} model + * @param {string} evaluation + * @param {string} slice + * @returns {string} Resource name string. + */ + modelEvaluationSlicePath( + project: string, + location: string, + model: string, + evaluation: string, + slice: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.render({ + project: project, + location: location, + model: model, + evaluation: evaluation, + slice: slice, + }); + } + + /** + * Parse the project from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the project. + */ + matchProjectFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).project; + } + + /** + * Parse the location from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the location. + */ + matchLocationFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).location; + } + + /** + * Parse the model from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the model. + */ + matchModelFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).model; + } + + /** + * Parse the evaluation from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the evaluation. + */ + matchEvaluationFromModelEvaluationSliceName( + modelEvaluationSliceName: string + ) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).evaluation; + } + + /** + * Parse the slice from ModelEvaluationSlice resource. + * + * @param {string} modelEvaluationSliceName + * A fully-qualified path representing ModelEvaluationSlice resource. + * @returns {string} A string representing the slice. + */ + matchSliceFromModelEvaluationSliceName(modelEvaluationSliceName: string) { + return this.pathTemplates.modelEvaluationSlicePathTemplate.match( + modelEvaluationSliceName + ).slice; + } + + /** + * Return a fully-qualified nasJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @returns {string} Resource name string. + */ + nasJobPath(project: string, location: string, nasJob: string) { + return this.pathTemplates.nasJobPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + }); + } + + /** + * Parse the project from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).project; + } + + /** + * Parse the location from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).location; + } + + /** + * Parse the nas_job from NasJob resource. + * + * @param {string} nasJobName + * A fully-qualified path representing NasJob resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasJobName(nasJobName: string) { + return this.pathTemplates.nasJobPathTemplate.match(nasJobName).nas_job; + } + + /** + * Return a fully-qualified nasTrialDetail resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} nas_job + * @param {string} nas_trial_detail + * @returns {string} Resource name string. + */ + nasTrialDetailPath( + project: string, + location: string, + nasJob: string, + nasTrialDetail: string + ) { + return this.pathTemplates.nasTrialDetailPathTemplate.render({ + project: project, + location: location, + nas_job: nasJob, + nas_trial_detail: nasTrialDetail, + }); + } + + /** + * Parse the project from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).project; + } + + /** + * Parse the location from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).location; + } + + /** + * Parse the nas_job from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_job. + */ + matchNasJobFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_job; + } + + /** + * Parse the nas_trial_detail from NasTrialDetail resource. + * + * @param {string} nasTrialDetailName + * A fully-qualified path representing NasTrialDetail resource. + * @returns {string} A string representing the nas_trial_detail. + */ + matchNasTrialDetailFromNasTrialDetailName(nasTrialDetailName: string) { + return this.pathTemplates.nasTrialDetailPathTemplate.match( + nasTrialDetailName + ).nas_trial_detail; + } + + /** + * Return a fully-qualified persistentResource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} persistent_resource + * @returns {string} Resource name string. + */ + persistentResourcePath( + project: string, + location: string, + persistentResource: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.render({ + project: project, + location: location, + persistent_resource: persistentResource, + }); + } + + /** + * Parse the project from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).project; + } + + /** + * Parse the location from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPersistentResourceName(persistentResourceName: string) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).location; + } + + /** + * Parse the persistent_resource from PersistentResource resource. + * + * @param {string} persistentResourceName + * A fully-qualified path representing PersistentResource resource. + * @returns {string} A string representing the persistent_resource. + */ + matchPersistentResourceFromPersistentResourceName( + persistentResourceName: string + ) { + return this.pathTemplates.persistentResourcePathTemplate.match( + persistentResourceName + ).persistent_resource; + } + + /** + * Return a fully-qualified pipelineJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} pipeline_job + * @returns {string} Resource name string. + */ + pipelineJobPath(project: string, location: string, pipelineJob: string) { + return this.pathTemplates.pipelineJobPathTemplate.render({ + project: project, + location: location, + pipeline_job: pipelineJob, + }); + } + + /** + * Parse the project from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .project; + } + + /** + * Parse the location from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .location; + } + + /** + * Parse the pipeline_job from PipelineJob resource. + * + * @param {string} pipelineJobName + * A fully-qualified path representing PipelineJob resource. + * @returns {string} A string representing the pipeline_job. + */ + matchPipelineJobFromPipelineJobName(pipelineJobName: string) { + return this.pathTemplates.pipelineJobPathTemplate.match(pipelineJobName) + .pipeline_job; + } + + /** + * Return a fully-qualified projectLocationEndpoint resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} endpoint + * @returns {string} Resource name string. + */ + projectLocationEndpointPath( + project: string, + location: string, + endpoint: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.render({ + project: project, + location: location, + endpoint: endpoint, + }); + } + + /** + * Parse the project from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).project; + } + + /** + * Parse the location from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).location; + } + + /** + * Parse the endpoint from ProjectLocationEndpoint resource. + * + * @param {string} projectLocationEndpointName + * A fully-qualified path representing project_location_endpoint resource. + * @returns {string} A string representing the endpoint. + */ + matchEndpointFromProjectLocationEndpointName( + projectLocationEndpointName: string + ) { + return this.pathTemplates.projectLocationEndpointPathTemplate.match( + projectLocationEndpointName + ).endpoint; + } + + /** + * Return a fully-qualified projectLocationFeatureGroupFeature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} feature_group + * @param {string} feature + * @returns {string} Resource name string. + */ + projectLocationFeatureGroupFeaturePath( + project: string, + location: string, + featureGroup: string, + feature: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.render( + { + project: project, + location: location, + feature_group: featureGroup, + feature: feature, + } + ); + } + + /** + * Parse the project from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).project; + } + + /** + * Parse the location from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).location; + } + + /** + * Parse the feature_group from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the feature_group. + */ + matchFeatureGroupFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).feature_group; + } + + /** + * Parse the feature from ProjectLocationFeatureGroupFeature resource. + * + * @param {string} projectLocationFeatureGroupFeatureName + * A fully-qualified path representing project_location_feature_group_feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromProjectLocationFeatureGroupFeatureName( + projectLocationFeatureGroupFeatureName: string + ) { + return this.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match( + projectLocationFeatureGroupFeatureName + ).feature; + } + + /** + * Return a fully-qualified projectLocationFeaturestoreEntityTypeFeature resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} featurestore + * @param {string} entity_type + * @param {string} feature + * @returns {string} Resource name string. + */ + projectLocationFeaturestoreEntityTypeFeaturePath( + project: string, + location: string, + featurestore: string, + entityType: string, + feature: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.render( + { + project: project, + location: location, + featurestore: featurestore, + entity_type: entityType, + feature: feature, + } + ); + } + + /** + * Parse the project from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).project; + } + + /** + * Parse the location from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).location; + } + + /** + * Parse the featurestore from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the featurestore. + */ + matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).featurestore; + } + + /** + * Parse the entity_type from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the entity_type. + */ + matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).entity_type; + } + + /** + * Parse the feature from ProjectLocationFeaturestoreEntityTypeFeature resource. + * + * @param {string} projectLocationFeaturestoreEntityTypeFeatureName + * A fully-qualified path representing project_location_featurestore_entity_type_feature resource. + * @returns {string} A string representing the feature. + */ + matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName( + projectLocationFeaturestoreEntityTypeFeatureName: string + ) { + return this.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match( + projectLocationFeaturestoreEntityTypeFeatureName + ).feature; + } + + /** + * 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 reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + + /** + * Return a fully-qualified savedQuery resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dataset + * @param {string} saved_query + * @returns {string} Resource name string. + */ + savedQueryPath( + project: string, + location: string, + dataset: string, + savedQuery: string + ) { + return this.pathTemplates.savedQueryPathTemplate.render({ + project: project, + location: location, + dataset: dataset, + saved_query: savedQuery, + }); + } + + /** + * Parse the project from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .project; + } + + /** + * Parse the location from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .location; + } + + /** + * Parse the dataset from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the dataset. + */ + matchDatasetFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .dataset; + } + + /** + * Parse the saved_query from SavedQuery resource. + * + * @param {string} savedQueryName + * A fully-qualified path representing SavedQuery resource. + * @returns {string} A string representing the saved_query. + */ + matchSavedQueryFromSavedQueryName(savedQueryName: string) { + return this.pathTemplates.savedQueryPathTemplate.match(savedQueryName) + .saved_query; + } + + /** + * Return a fully-qualified schedule resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schedule + * @returns {string} Resource name string. + */ + schedulePath(project: string, location: string, schedule: string) { + return this.pathTemplates.schedulePathTemplate.render({ + project: project, + location: location, + schedule: schedule, + }); + } + + /** + * Parse the project from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the project. + */ + matchProjectFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).project; + } + + /** + * Parse the location from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the location. + */ + matchLocationFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).location; + } + + /** + * Parse the schedule from Schedule resource. + * + * @param {string} scheduleName + * A fully-qualified path representing Schedule resource. + * @returns {string} A string representing the schedule. + */ + matchScheduleFromScheduleName(scheduleName: string) { + return this.pathTemplates.schedulePathTemplate.match(scheduleName).schedule; + } + + /** + * Return a fully-qualified specialistPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} specialist_pool + * @returns {string} Resource name string. + */ + specialistPoolPath( + project: string, + location: string, + specialistPool: string + ) { + return this.pathTemplates.specialistPoolPathTemplate.render({ + project: project, + location: location, + specialist_pool: specialistPool, + }); + } + + /** + * Parse the project from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).project; + } + + /** + * Parse the location from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).location; + } + + /** + * Parse the specialist_pool from SpecialistPool resource. + * + * @param {string} specialistPoolName + * A fully-qualified path representing SpecialistPool resource. + * @returns {string} A string representing the specialist_pool. + */ + matchSpecialistPoolFromSpecialistPoolName(specialistPoolName: string) { + return this.pathTemplates.specialistPoolPathTemplate.match( + specialistPoolName + ).specialist_pool; + } + + /** + * Return a fully-qualified study resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @returns {string} Resource name string. + */ + studyPath(project: string, location: string, study: string) { + return this.pathTemplates.studyPathTemplate.render({ + project: project, + location: location, + study: study, + }); + } + + /** + * Parse the project from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the project. + */ + matchProjectFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).project; + } + + /** + * Parse the location from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the location. + */ + matchLocationFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).location; + } + + /** + * Parse the study from Study resource. + * + * @param {string} studyName + * A fully-qualified path representing Study resource. + * @returns {string} A string representing the study. + */ + matchStudyFromStudyName(studyName: string) { + return this.pathTemplates.studyPathTemplate.match(studyName).study; + } + + /** + * Return a fully-qualified tensorboard resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @returns {string} Resource name string. + */ + tensorboardPath(project: string, location: string, tensorboard: string) { + return this.pathTemplates.tensorboardPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + }); + } + + /** + * Parse the project from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .project; + } + + /** + * Parse the location from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .location; + } + + /** + * Parse the tensorboard from Tensorboard resource. + * + * @param {string} tensorboardName + * A fully-qualified path representing Tensorboard resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardName(tensorboardName: string) { + return this.pathTemplates.tensorboardPathTemplate.match(tensorboardName) + .tensorboard; + } + + /** + * Return a fully-qualified tensorboardExperiment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @returns {string} Resource name string. + */ + tensorboardExperimentPath( + project: string, + location: string, + tensorboard: string, + experiment: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + }); + } + + /** + * Parse the project from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardExperimentName(tensorboardExperimentName: string) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).project; + } + + /** + * Parse the location from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).location; + } + + /** + * Parse the tensorboard from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardExperiment resource. + * + * @param {string} tensorboardExperimentName + * A fully-qualified path representing TensorboardExperiment resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardExperimentName( + tensorboardExperimentName: string + ) { + return this.pathTemplates.tensorboardExperimentPathTemplate.match( + tensorboardExperimentName + ).experiment; + } + + /** + * Return a fully-qualified tensorboardRun resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @returns {string} Resource name string. + */ + tensorboardRunPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string + ) { + return this.pathTemplates.tensorboardRunPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + }); + } + + /** + * Parse the project from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).project; + } + + /** + * Parse the location from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).location; + } + + /** + * Parse the tensorboard from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).experiment; + } + + /** + * Parse the run from TensorboardRun resource. + * + * @param {string} tensorboardRunName + * A fully-qualified path representing TensorboardRun resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardRunName(tensorboardRunName: string) { + return this.pathTemplates.tensorboardRunPathTemplate.match( + tensorboardRunName + ).run; + } + + /** + * Return a fully-qualified tensorboardTimeSeries resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} tensorboard + * @param {string} experiment + * @param {string} run + * @param {string} time_series + * @returns {string} Resource name string. + */ + tensorboardTimeSeriesPath( + project: string, + location: string, + tensorboard: string, + experiment: string, + run: string, + timeSeries: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.render({ + project: project, + location: location, + tensorboard: tensorboard, + experiment: experiment, + run: run, + time_series: timeSeries, + }); + } + + /** + * Parse the project from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).project; + } + + /** + * Parse the location from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).location; + } + + /** + * Parse the tensorboard from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the tensorboard. + */ + matchTensorboardFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).tensorboard; + } + + /** + * Parse the experiment from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the experiment. + */ + matchExperimentFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).experiment; + } + + /** + * Parse the run from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the run. + */ + matchRunFromTensorboardTimeSeriesName(tensorboardTimeSeriesName: string) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).run; + } + + /** + * Parse the time_series from TensorboardTimeSeries resource. + * + * @param {string} tensorboardTimeSeriesName + * A fully-qualified path representing TensorboardTimeSeries resource. + * @returns {string} A string representing the time_series. + */ + matchTimeSeriesFromTensorboardTimeSeriesName( + tensorboardTimeSeriesName: string + ) { + return this.pathTemplates.tensorboardTimeSeriesPathTemplate.match( + tensorboardTimeSeriesName + ).time_series; + } + + /** + * Return a fully-qualified trainingPipeline resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} training_pipeline + * @returns {string} Resource name string. + */ + trainingPipelinePath( + project: string, + location: string, + trainingPipeline: string + ) { + return this.pathTemplates.trainingPipelinePathTemplate.render({ + project: project, + location: location, + training_pipeline: trainingPipeline, + }); + } + + /** + * Parse the project from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).project; + } + + /** + * Parse the location from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).location; + } + + /** + * Parse the training_pipeline from TrainingPipeline resource. + * + * @param {string} trainingPipelineName + * A fully-qualified path representing TrainingPipeline resource. + * @returns {string} A string representing the training_pipeline. + */ + matchTrainingPipelineFromTrainingPipelineName(trainingPipelineName: string) { + return this.pathTemplates.trainingPipelinePathTemplate.match( + trainingPipelineName + ).training_pipeline; + } + + /** + * Return a fully-qualified trial resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} study + * @param {string} trial + * @returns {string} Resource name string. + */ + trialPath(project: string, location: string, study: string, trial: string) { + return this.pathTemplates.trialPathTemplate.render({ + project: project, + location: location, + study: study, + trial: trial, + }); + } + + /** + * Parse the project from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).project; + } + + /** + * Parse the location from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the location. + */ + matchLocationFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).location; + } + + /** + * Parse the study from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the study. + */ + matchStudyFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).study; + } + + /** + * Parse the trial from Trial resource. + * + * @param {string} trialName + * A fully-qualified path representing Trial resource. + * @returns {string} A string representing the trial. + */ + matchTrialFromTrialName(trialName: string) { + return this.pathTemplates.trialPathTemplate.match(trialName).trial; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.reasoningEngineServiceStub && !this._terminated) { + return this.reasoningEngineServiceStub.then(stub => { + this._terminated = true; + stub.close(); + this.iamClient.close(); + this.locationsClient.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client_config.json new file mode 100644 index 00000000000..df63457ffbd --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.ReasoningEngineService": { + "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": { + "CreateReasoningEngine": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetReasoningEngine": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReasoningEngines": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteReasoningEngine": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json new file mode 100644 index 00000000000..a27a1ab44c2 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/reasoning_engine_service_proto_list.json @@ -0,0 +1,146 @@ +[ + "../../protos/google/cloud/aiplatform/v1beta1/accelerator_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/annotation_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/artifact.proto", + "../../protos/google/cloud/aiplatform/v1beta1/batch_prediction_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/completion_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/content.proto", + "../../protos/google/cloud/aiplatform/v1beta1/context.proto", + "../../protos/google/cloud/aiplatform/v1beta1/custom_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_item.proto", + "../../protos/google/cloud/aiplatform/v1beta1/data_labeling_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/dataset_version.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_index_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployed_model_ref.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/deployment_resource_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/encryption_spec.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/entity_type.proto", + "../../protos/google/cloud/aiplatform/v1beta1/env_var.proto", + "../../protos/google/cloud/aiplatform/v1beta1/evaluated_annotation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/event.proto", + "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/explanation_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_group.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store_admin_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_online_store_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_registry_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_selector.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_view.proto", + "../../protos/google/cloud/aiplatform/v1beta1/feature_view_sync.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_online_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/featurestore_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_endpoint_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/index_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/io.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/job_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/lineage_subgraph.proto", + "../../protos/google/cloud/aiplatform/v1beta1/llm_utility_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/machine_resources.proto", + "../../protos/google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto", + "../../protos/google/cloud/aiplatform/v1beta1/match_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_schema.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/metadata_store.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migratable_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/migration_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_monitoring.proto", + "../../protos/google/cloud/aiplatform/v1beta1/model_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/nas_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/openapi.proto", + "../../protos/google/cloud/aiplatform/v1beta1/operation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource.proto", + "../../protos/google/cloud/aiplatform/v1beta1/persistent_resource_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_failure_policy.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_job.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", + "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/annotation_spec_color.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/data_item_payload.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/dataset_metadata.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/geometry.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/instance/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/params/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/tabular_regression.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/predict/prediction/video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_object_detection.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_image_segmentation.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_tables.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_extraction.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_text_sentiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_time_series_forecasting.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_action_recognition.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_classification.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/automl_video_object_tracking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/export_evaluated_data_items_config.proto", + "../../protos/google/cloud/aiplatform/v1beta1/service_networking.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/specialist_pool_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/study.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_data.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_experiment.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_run.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tensorboard_time_series.proto", + "../../protos/google/cloud/aiplatform/v1beta1/tool.proto", + "../../protos/google/cloud/aiplatform/v1beta1/training_pipeline.proto", + "../../protos/google/cloud/aiplatform/v1beta1/types.proto", + "../../protos/google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/user_action_reference.proto", + "../../protos/google/cloud/aiplatform/v1beta1/value.proto", + "../../protos/google/cloud/aiplatform/v1beta1/vizier_service.proto" +] diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts index 0eb2a74b0a8..9977535d617 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_client.ts @@ -320,6 +320,9 @@ export class ScheduleServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5940,6 +5943,65 @@ export class ScheduleServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/schedule_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_client.ts index 4a1f80a6d52..758a9098c8c 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 @@ -325,6 +325,9 @@ export class SpecialistPoolServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -5711,6 +5714,65 @@ export class SpecialistPoolServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/specialist_pool_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts index 13e0ba72f6f..5def61f907a 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_client.ts @@ -322,6 +322,9 @@ export class TensorboardServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -9092,6 +9095,65 @@ export class TensorboardServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/tensorboard_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts index 9810d3d4a16..d5a0fe61716 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_client.ts @@ -323,6 +323,9 @@ export class VizierServiceClient { publisherModelPathTemplate: new this._gaxModule.PathTemplate( 'publishers/{publisher}/models/{model}' ), + reasoningEnginePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}' + ), savedQueryPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}' ), @@ -6753,6 +6756,65 @@ export class VizierServiceClient { ).model; } + /** + * Return a fully-qualified reasoningEngine resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reasoning_engine + * @returns {string} Resource name string. + */ + reasoningEnginePath( + project: string, + location: string, + reasoningEngine: string + ) { + return this.pathTemplates.reasoningEnginePathTemplate.render({ + project: project, + location: location, + reasoning_engine: reasoningEngine, + }); + } + + /** + * Parse the project from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).project; + } + + /** + * Parse the location from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).location; + } + + /** + * Parse the reasoning_engine from ReasoningEngine resource. + * + * @param {string} reasoningEngineName + * A fully-qualified path representing ReasoningEngine resource. + * @returns {string} A string representing the reasoning_engine. + */ + matchReasoningEngineFromReasoningEngineName(reasoningEngineName: string) { + return this.pathTemplates.reasoningEnginePathTemplate.match( + reasoningEngineName + ).reasoning_engine; + } + /** * Return a fully-qualified savedQuery resource name string. * diff --git a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json index 5dced8c5698..a27a1ab44c2 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/vizier_service_proto_list.json @@ -77,6 +77,9 @@ "../../protos/google/cloud/aiplatform/v1beta1/pipeline_state.proto", "../../protos/google/cloud/aiplatform/v1beta1/prediction_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/publisher_model.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_execution_service.proto", + "../../protos/google/cloud/aiplatform/v1beta1/reasoning_engine_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/saved_query.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule.proto", "../../protos/google/cloud/aiplatform/v1beta1/schedule_service.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts index 5efb6a03b76..35bdee76b07 100644 --- a/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_dataset_service_v1beta1.ts @@ -7977,6 +7977,71 @@ describe('v1beta1.DatasetServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new datasetserviceModule.v1beta1.DatasetServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_deployment_resource_pool_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts index 881323ef4ba..9b45ab42f92 100644 --- a/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_deployment_resource_pool_service_v1beta1.ts @@ -5499,6 +5499,74 @@ describe('v1beta1.DeploymentResourcePoolServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new deploymentresourcepoolserviceModule.v1beta1.DeploymentResourcePoolServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts index c00babedd34..0352a80d55f 100644 --- a/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_endpoint_service_v1beta1.ts @@ -5488,6 +5488,71 @@ describe('v1beta1.EndpointServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new endpointserviceModule.v1beta1.EndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_feature_online_store_admin_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_feature_online_store_admin_service_v1beta1.ts index 0f095d1b357..c82897b638b 100644 --- a/packages/google-cloud-aiplatform/test/gapic_feature_online_store_admin_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_feature_online_store_admin_service_v1beta1.ts @@ -7142,6 +7142,74 @@ describe('v1beta1.FeatureOnlineStoreAdminServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new featureonlinestoreadminserviceModule.v1beta1.FeatureOnlineStoreAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_feature_online_store_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_feature_online_store_service_v1beta1.ts index a085ac98086..4bc5272d58b 100644 --- a/packages/google-cloud-aiplatform/test/gapic_feature_online_store_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_feature_online_store_service_v1beta1.ts @@ -4080,6 +4080,74 @@ describe('v1beta1.FeatureOnlineStoreServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new featureonlinestoreserviceModule.v1beta1.FeatureOnlineStoreServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_feature_registry_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_feature_registry_service_v1beta1.ts index 41ed062a815..d2230954bb5 100644 --- a/packages/google-cloud-aiplatform/test/gapic_feature_registry_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_feature_registry_service_v1beta1.ts @@ -6195,6 +6195,72 @@ describe('v1beta1.FeatureRegistryServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new featureregistryserviceModule.v1beta1.FeatureRegistryServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts index 303ca501dd1..ec045d44630 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_online_serving_service_v1beta1.ts @@ -4127,6 +4127,74 @@ describe('v1beta1.FeaturestoreOnlineServingServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new featurestoreonlineservingserviceModule.v1beta1.FeaturestoreOnlineServingServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts index 4f03d002023..32978d0457a 100644 --- a/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_featurestore_service_v1beta1.ts @@ -8472,6 +8472,72 @@ describe('v1beta1.FeaturestoreServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new featurestoreserviceModule.v1beta1.FeaturestoreServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts index 3f4ef434120..0e4df520709 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_endpoint_service_v1beta1.ts @@ -5616,6 +5616,72 @@ describe('v1beta1.IndexEndpointServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new indexendpointserviceModule.v1beta1.IndexEndpointServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts index c4a5a296d0a..07ac891a514 100644 --- a/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_index_service_v1beta1.ts @@ -5222,6 +5222,71 @@ describe('v1beta1.IndexServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new indexserviceModule.v1beta1.IndexServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts index 2503bbda7c1..ca7e81de3a2 100644 --- a/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_job_service_v1beta1.ts @@ -10777,6 +10777,71 @@ describe('v1beta1.JobServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new jobserviceModule.v1beta1.JobServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_llm_utility_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_llm_utility_service_v1beta1.ts index 5957f44b0de..e63116286ce 100644 --- a/packages/google-cloud-aiplatform/test/gapic_llm_utility_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_llm_utility_service_v1beta1.ts @@ -3695,6 +3695,72 @@ describe('v1beta1.LlmUtilityServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new llmutilityserviceModule.v1beta1.LlmUtilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts index 676db8f0b43..703efb17570 100644 --- a/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_match_service_v1beta1.ts @@ -3761,6 +3761,71 @@ describe('v1beta1.MatchServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new matchserviceModule.v1beta1.MatchServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_metadata_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts index 892e753df62..46c945b8c23 100644 --- a/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_metadata_service_v1beta1.ts @@ -9687,6 +9687,71 @@ describe('v1beta1.MetadataServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new metadataserviceModule.v1beta1.MetadataServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts index f7073127b97..92cfcbcdbf2 100644 --- a/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_migration_service_v1beta1.ts @@ -4491,6 +4491,71 @@ describe('v1beta1.MigrationServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new migrationserviceModule.v1beta1.MigrationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts index d7afa7bc824..948228253da 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_garden_service_v1beta1.ts @@ -4075,6 +4075,72 @@ describe('v1beta1.ModelGardenServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new modelgardenserviceModule.v1beta1.ModelGardenServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts index 46f54ce9d38..5b83f0a7b96 100644 --- a/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_model_service_v1beta1.ts @@ -7504,6 +7504,71 @@ describe('v1beta1.ModelServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new modelserviceModule.v1beta1.ModelServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_persistent_resource_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts index e453774165b..0c91dbcbeb7 100644 --- a/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_persistent_resource_service_v1beta1.ts @@ -5325,6 +5325,74 @@ describe('v1beta1.PersistentResourceServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new persistentresourceserviceModule.v1beta1.PersistentResourceServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts index 3c3b864f0bc..12bfcaf1b28 100644 --- a/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_pipeline_service_v1beta1.ts @@ -6242,6 +6242,71 @@ describe('v1beta1.PipelineServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new pipelineserviceModule.v1beta1.PipelineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts index e832b0b3e73..85e76b38f8c 100644 --- a/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_prediction_service_v1beta1.ts @@ -5157,6 +5157,72 @@ describe('v1beta1.PredictionServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new predictionserviceModule.v1beta1.PredictionServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_reasoning_engine_execution_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_reasoning_engine_execution_service_v1beta1.ts new file mode 100644 index 00000000000..bfaa2699207 --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_reasoning_engine_execution_service_v1beta1.ts @@ -0,0 +1,4706 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 reasoningengineexecutionserviceModule 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('v1beta1.ReasoningEngineExecutionServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + reasoningengineexecutionserviceModule.v1beta1 + .ReasoningEngineExecutionServiceClient.servicePath; + assert.strictEqual(servicePath, 'aiplatform.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + reasoningengineexecutionserviceModule.v1beta1 + .ReasoningEngineExecutionServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + {universeDomain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'aiplatform.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + {universe_domain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'aiplatform.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + {universe_domain: 'example.com', universeDomain: 'example.net'} + ); + }); + }); + + it('has port', () => { + const port = + reasoningengineexecutionserviceModule.v1beta1 + .ReasoningEngineExecutionServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.reasoningEngineExecutionServiceStub, undefined); + await client.initialize(); + assert(client.reasoningEngineExecutionServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.reasoningEngineExecutionServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.reasoningEngineExecutionServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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('queryReasoningEngine', () => { + it('invokes queryReasoningEngine without error', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse() + ); + client.innerApiCalls.queryReasoningEngine = + stubSimpleCall(expectedResponse); + const [response] = await client.queryReasoningEngine(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReasoningEngine without error using callback', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineResponse() + ); + client.innerApiCalls.queryReasoningEngine = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryReasoningEngine( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IQueryReasoningEngineResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReasoningEngine with error', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryReasoningEngine = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.queryReasoningEngine(request), expectedError); + const actualRequest = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.queryReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryReasoningEngine with closed client', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.QueryReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.queryReasoningEngine(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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('datasetVersion', () => { + const fakePath = '/rendered/path/datasetVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + dataset_version: 'datasetVersionValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.datasetVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.datasetVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('datasetVersionPath', () => { + const result = client.datasetVersionPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'datasetVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.datasetVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDatasetVersionName', () => { + const result = client.matchProjectFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDatasetVersionName', () => { + const result = client.matchLocationFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDatasetVersionName', () => { + const result = client.matchDatasetFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetVersionFromDatasetVersionName', () => { + const result = + client.matchDatasetVersionFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'datasetVersionValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deploymentResourcePool', () => { + const fakePath = '/rendered/path/deploymentResourcePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deployment_resource_pool: 'deploymentResourcePoolValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.deploymentResourcePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deploymentResourcePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deploymentResourcePoolPath', () => { + const result = client.deploymentResourcePoolPath( + 'projectValue', + 'locationValue', + 'deploymentResourcePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeploymentResourcePoolName', () => { + const result = + client.matchProjectFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeploymentResourcePoolName', () => { + const result = + client.matchLocationFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentResourcePoolFromDeploymentResourcePoolName', () => { + const result = + client.matchDeploymentResourcePoolFromDeploymentResourcePoolName( + fakePath + ); + assert.strictEqual(result, 'deploymentResourcePoolValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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('featureGroup', () => { + const fakePath = '/rendered/path/featureGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_group: 'featureGroupValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featureGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureGroupPath', () => { + const result = client.featureGroupPath( + 'projectValue', + 'locationValue', + 'featureGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureGroupName', () => { + const result = client.matchProjectFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureGroupName', () => { + const result = client.matchLocationFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureGroupFromFeatureGroupName', () => { + const result = client.matchFeatureGroupFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'featureGroupValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureOnlineStore', () => { + const fakePath = '/rendered/path/featureOnlineStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featureOnlineStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureOnlineStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureOnlineStorePath', () => { + const result = client.featureOnlineStorePath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureOnlineStoreName', () => { + const result = client.matchProjectFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureOnlineStoreName', () => { + const result = client.matchLocationFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureOnlineStoreName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureView', () => { + const fakePath = '/rendered/path/featureView'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + feature_view: 'featureViewValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featureViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureViewPath', () => { + const result = client.featureViewPath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue', + 'featureViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureViewName', () => { + const result = client.matchProjectFromFeatureViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureViewName', () => { + const result = client.matchLocationFromFeatureViewName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureViewName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureViewName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureViewFromFeatureViewName', () => { + const result = client.matchFeatureViewFromFeatureViewName(fakePath); + assert.strictEqual(result, 'featureViewValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureViewSync', () => { + const fakePath = '/rendered/path/featureViewSync'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + feature_view: 'featureViewValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.featureViewSyncPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureViewSyncPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureViewSyncPath', () => { + const result = client.featureViewSyncPath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue', + 'featureViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureViewSyncName', () => { + const result = client.matchProjectFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureViewSyncName', () => { + const result = client.matchLocationFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureViewSyncName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureViewFromFeatureViewSyncName', () => { + const result = client.matchFeatureViewFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'featureViewValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.nasTrialDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasTrialDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasTrialDetailPath', () => { + const result = client.nasTrialDetailPath( + 'projectValue', + 'locationValue', + 'nasJobValue', + 'nasTrialDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasTrialDetailName', () => { + const result = client.matchProjectFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasTrialDetailName', () => { + const result = client.matchLocationFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasTrialDetailName', () => { + const result = client.matchNasJobFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasTrialDetailFromNasTrialDetailName', () => { + const result = + client.matchNasTrialDetailFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasTrialDetailValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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('projectLocationFeatureGroupFeature', () => { + const fakePath = '/rendered/path/projectLocationFeatureGroupFeature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_group: 'featureGroupValue', + feature: 'featureValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFeatureGroupFeaturePath', () => { + const result = client.projectLocationFeatureGroupFeaturePath( + 'projectValue', + 'locationValue', + 'featureGroupValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchProjectFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchLocationFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureGroupFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchFeatureGroupFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureGroupValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchFeatureFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationFeaturestoreEntityTypeFeature', () => { + const fakePath = + '/rendered/path/projectLocationFeaturestoreEntityTypeFeature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + feature: 'featureValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFeaturestoreEntityTypeFeaturePath', () => { + const result = client.projectLocationFeaturestoreEntityTypeFeaturePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'featurestoreValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.savedQueryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.savedQueryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('savedQueryPath', () => { + const result = client.savedQueryPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'savedQueryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.savedQueryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSavedQueryName', () => { + const result = client.matchProjectFromSavedQueryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSavedQueryName', () => { + const result = client.matchLocationFromSavedQueryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromSavedQueryName', () => { + const result = client.matchDatasetFromSavedQueryName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSavedQueryFromSavedQueryName', () => { + const result = client.matchSavedQueryFromSavedQueryName(fakePath); + assert.strictEqual(result, 'savedQueryValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('schedule', () => { + const fakePath = '/rendered/path/schedule'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + schedule: 'scheduleValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.schedulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schedulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schedulePath', () => { + const result = client.schedulePath( + 'projectValue', + 'locationValue', + 'scheduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schedulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromScheduleName', () => { + const result = client.matchProjectFromScheduleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromScheduleName', () => { + const result = client.matchLocationFromScheduleName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchScheduleFromScheduleName', () => { + const result = client.matchScheduleFromScheduleName(fakePath); + assert.strictEqual(result, 'scheduleValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = + new reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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 reasoningengineexecutionserviceModule.v1beta1.ReasoningEngineExecutionServiceClient( + { + 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_reasoning_engine_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_reasoning_engine_service_v1beta1.ts new file mode 100644 index 00000000000..1cb155498a6 --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_reasoning_engine_service_v1beta1.ts @@ -0,0 +1,5757 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 reasoningengineserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.ReasoningEngineServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process !== 'undefined' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient + .servicePath; + assert.strictEqual(servicePath, 'aiplatform.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient + .apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'aiplatform.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'aiplatform.example.com'); + }); + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = + reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reasoningEngineServiceStub, undefined); + await client.initialize(); + assert(client.reasoningEngineServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.reasoningEngineServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reasoningEngineServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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('getReasoningEngine', () => { + it('invokes getReasoningEngine without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ); + client.innerApiCalls.getReasoningEngine = + stubSimpleCall(expectedResponse); + const [response] = await client.getReasoningEngine(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReasoningEngine without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ); + client.innerApiCalls.getReasoningEngine = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getReasoningEngine( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IReasoningEngine | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReasoningEngine with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getReasoningEngine = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getReasoningEngine(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getReasoningEngine with closed client', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.GetReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReasoningEngine(request), expectedError); + }); + }); + + describe('createReasoningEngine', () => { + it('invokes createReasoningEngine without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReasoningEngine = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createReasoningEngine(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReasoningEngine without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReasoningEngine = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createReasoningEngine( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.aiplatform.v1beta1.IReasoningEngine, + protos.google.cloud.aiplatform.v1beta1.ICreateReasoningEngineOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReasoningEngine with call error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReasoningEngine = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createReasoningEngine(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createReasoningEngine with LRO error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.CreateReasoningEngineRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createReasoningEngine = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createReasoningEngine(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateReasoningEngineProgress without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateReasoningEngineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReasoningEngineProgress with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateReasoningEngineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteReasoningEngine', () => { + it('invokes deleteReasoningEngine without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReasoningEngine = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteReasoningEngine(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReasoningEngine without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReasoningEngine = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteReasoningEngine( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.aiplatform.v1beta1.IDeleteOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReasoningEngine with call error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReasoningEngine = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteReasoningEngine(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteReasoningEngine with LRO error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.DeleteReasoningEngineRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReasoningEngine = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteReasoningEngine(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteReasoningEngine as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteReasoningEngineProgress without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteReasoningEngineProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteReasoningEngineProgress with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteReasoningEngineProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listReasoningEngines', () => { + it('invokes listReasoningEngines without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + ]; + client.innerApiCalls.listReasoningEngines = + stubSimpleCall(expectedResponse); + const [response] = await client.listReasoningEngines(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReasoningEngines without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + ]; + client.innerApiCalls.listReasoningEngines = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReasoningEngines( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.aiplatform.v1beta1.IReasoningEngine[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReasoningEngines with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReasoningEngines = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReasoningEngines(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReasoningEngines as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReasoningEnginesStream without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + ]; + client.descriptors.page.listReasoningEngines.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listReasoningEnginesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.aiplatform.v1beta1.ReasoningEngine[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.aiplatform.v1beta1.ReasoningEngine + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listReasoningEngines.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReasoningEngines, request) + ); + assert( + (client.descriptors.page.listReasoningEngines.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listReasoningEnginesStream with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReasoningEngines.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listReasoningEnginesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.aiplatform.v1beta1.ReasoningEngine[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.aiplatform.v1beta1.ReasoningEngine + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReasoningEngines.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReasoningEngines, request) + ); + assert( + (client.descriptors.page.listReasoningEngines.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listReasoningEngines without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ReasoningEngine() + ), + ]; + client.descriptors.page.listReasoningEngines.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.aiplatform.v1beta1.IReasoningEngine[] = + []; + const iterable = client.listReasoningEnginesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listReasoningEngines.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReasoningEngines.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listReasoningEngines with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.ListReasoningEnginesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listReasoningEngines.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listReasoningEnginesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.aiplatform.v1beta1.IReasoningEngine[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listReasoningEngines.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listReasoningEngines.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.getOperation(request); + }, expectedError); + assert( + (client.operationsClient.getOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = + stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.cancelOperation(request); + }, expectedError); + assert( + (client.operationsClient.cancelOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = + stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(async () => { + await client.deleteOperation(request); + }, expectedError); + assert( + (client.operationsClient.deleteOperation as SinonStub) + .getCall(0) + .calledWith(request) + ); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + it('uses async iteration with listOperations with error', async () => { + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.ListOperationsResponse[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.operationsClient.descriptor.listOperations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('Path templates', () => { + describe('annotation', () => { + const fakePath = '/rendered/path/annotation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + data_item: 'dataItemValue', + annotation: 'annotationValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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('datasetVersion', () => { + const fakePath = '/rendered/path/datasetVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dataset: 'datasetValue', + dataset_version: 'datasetVersionValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.datasetVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.datasetVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('datasetVersionPath', () => { + const result = client.datasetVersionPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'datasetVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.datasetVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDatasetVersionName', () => { + const result = client.matchProjectFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDatasetVersionName', () => { + const result = client.matchLocationFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromDatasetVersionName', () => { + const result = client.matchDatasetFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetVersionFromDatasetVersionName', () => { + const result = + client.matchDatasetVersionFromDatasetVersionName(fakePath); + assert.strictEqual(result, 'datasetVersionValue'); + assert( + (client.pathTemplates.datasetVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('deploymentResourcePool', () => { + const fakePath = '/rendered/path/deploymentResourcePool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deployment_resource_pool: 'deploymentResourcePoolValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.deploymentResourcePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.deploymentResourcePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('deploymentResourcePoolPath', () => { + const result = client.deploymentResourcePoolPath( + 'projectValue', + 'locationValue', + 'deploymentResourcePoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDeploymentResourcePoolName', () => { + const result = + client.matchProjectFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDeploymentResourcePoolName', () => { + const result = + client.matchLocationFromDeploymentResourcePoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDeploymentResourcePoolFromDeploymentResourcePoolName', () => { + const result = + client.matchDeploymentResourcePoolFromDeploymentResourcePoolName( + fakePath + ); + assert.strictEqual(result, 'deploymentResourcePoolValue'); + assert( + ( + client.pathTemplates.deploymentResourcePoolPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('entityType', () => { + const fakePath = '/rendered/path/entityType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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('featureGroup', () => { + const fakePath = '/rendered/path/featureGroup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_group: 'featureGroupValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featureGroupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureGroupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureGroupPath', () => { + const result = client.featureGroupPath( + 'projectValue', + 'locationValue', + 'featureGroupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureGroupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureGroupName', () => { + const result = client.matchProjectFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureGroupName', () => { + const result = client.matchLocationFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureGroupFromFeatureGroupName', () => { + const result = client.matchFeatureGroupFromFeatureGroupName(fakePath); + assert.strictEqual(result, 'featureGroupValue'); + assert( + (client.pathTemplates.featureGroupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureOnlineStore', () => { + const fakePath = '/rendered/path/featureOnlineStore'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featureOnlineStorePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureOnlineStorePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureOnlineStorePath', () => { + const result = client.featureOnlineStorePath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureOnlineStoreName', () => { + const result = client.matchProjectFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureOnlineStoreName', () => { + const result = client.matchLocationFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureOnlineStoreName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureOnlineStoreName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + ( + client.pathTemplates.featureOnlineStorePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureView', () => { + const fakePath = '/rendered/path/featureView'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + feature_view: 'featureViewValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featureViewPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureViewPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureViewPath', () => { + const result = client.featureViewPath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue', + 'featureViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureViewPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureViewName', () => { + const result = client.matchProjectFromFeatureViewName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureViewName', () => { + const result = client.matchLocationFromFeatureViewName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureViewName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureViewName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureViewFromFeatureViewName', () => { + const result = client.matchFeatureViewFromFeatureViewName(fakePath); + assert.strictEqual(result, 'featureViewValue'); + assert( + (client.pathTemplates.featureViewPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('featureViewSync', () => { + const fakePath = '/rendered/path/featureViewSync'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_online_store: 'featureOnlineStoreValue', + feature_view: 'featureViewValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.featureViewSyncPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.featureViewSyncPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('featureViewSyncPath', () => { + const result = client.featureViewSyncPath( + 'projectValue', + 'locationValue', + 'featureOnlineStoreValue', + 'featureViewValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromFeatureViewSyncName', () => { + const result = client.matchProjectFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromFeatureViewSyncName', () => { + const result = client.matchLocationFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureOnlineStoreFromFeatureViewSyncName', () => { + const result = + client.matchFeatureOnlineStoreFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'featureOnlineStoreValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureViewFromFeatureViewSyncName', () => { + const result = client.matchFeatureViewFromFeatureViewSyncName(fakePath); + assert.strictEqual(result, 'featureViewValue'); + assert( + (client.pathTemplates.featureViewSyncPathTemplate.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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.indexEndpointPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.indexEndpointPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('indexEndpointPath', () => { + const result = client.indexEndpointPath( + 'projectValue', + 'locationValue', + 'indexEndpointValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.indexEndpointPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromIndexEndpointName', () => { + const result = client.matchProjectFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromIndexEndpointName', () => { + const result = client.matchLocationFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchIndexEndpointFromIndexEndpointName', () => { + const result = client.matchIndexEndpointFromIndexEndpointName(fakePath); + assert.strictEqual(result, 'indexEndpointValue'); + assert( + (client.pathTemplates.indexEndpointPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('metadataSchema', () => { + const fakePath = '/rendered/path/metadataSchema'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + metadata_store: 'metadataStoreValue', + metadata_schema: 'metadataSchemaValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.nasTrialDetailPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.nasTrialDetailPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('nasTrialDetailPath', () => { + const result = client.nasTrialDetailPath( + 'projectValue', + 'locationValue', + 'nasJobValue', + 'nasTrialDetailValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromNasTrialDetailName', () => { + const result = client.matchProjectFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromNasTrialDetailName', () => { + const result = client.matchLocationFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasJobFromNasTrialDetailName', () => { + const result = client.matchNasJobFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasJobValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchNasTrialDetailFromNasTrialDetailName', () => { + const result = + client.matchNasTrialDetailFromNasTrialDetailName(fakePath); + assert.strictEqual(result, 'nasTrialDetailValue'); + assert( + (client.pathTemplates.nasTrialDetailPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('persistentResource', () => { + const fakePath = '/rendered/path/persistentResource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + persistent_resource: 'persistentResourceValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.persistentResourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.persistentResourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('persistentResourcePath', () => { + const result = client.persistentResourcePath( + 'projectValue', + 'locationValue', + 'persistentResourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromPersistentResourceName', () => { + const result = client.matchProjectFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromPersistentResourceName', () => { + const result = client.matchLocationFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchPersistentResourceFromPersistentResourceName', () => { + const result = + client.matchPersistentResourceFromPersistentResourceName(fakePath); + assert.strictEqual(result, 'persistentResourceValue'); + assert( + ( + client.pathTemplates.persistentResourcePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('pipelineJob', () => { + const fakePath = '/rendered/path/pipelineJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + pipeline_job: 'pipelineJobValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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('projectLocationFeatureGroupFeature', () => { + const fakePath = '/rendered/path/projectLocationFeatureGroupFeature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + feature_group: 'featureGroupValue', + feature: 'featureValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFeatureGroupFeaturePath', () => { + const result = client.projectLocationFeatureGroupFeaturePath( + 'projectValue', + 'locationValue', + 'featureGroupValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchProjectFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchLocationFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureGroupFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchFeatureGroupFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureGroupValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromProjectLocationFeatureGroupFeatureName', () => { + const result = + client.matchFeatureFromProjectLocationFeatureGroupFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureValue'); + assert( + ( + client.pathTemplates.projectLocationFeatureGroupFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationFeaturestoreEntityTypeFeature', () => { + const fakePath = + '/rendered/path/projectLocationFeaturestoreEntityTypeFeature'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + featurestore: 'featurestoreValue', + entity_type: 'entityTypeValue', + feature: 'featureValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFeaturestoreEntityTypeFeaturePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFeaturestoreEntityTypeFeaturePath', () => { + const result = client.projectLocationFeaturestoreEntityTypeFeaturePath( + 'projectValue', + 'locationValue', + 'featurestoreValue', + 'entityTypeValue', + 'featureValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchProjectFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchLocationFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchFeaturestoreFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'featurestoreValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchEntityTypeFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'entityTypeValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName', () => { + const result = + client.matchFeatureFromProjectLocationFeaturestoreEntityTypeFeatureName( + fakePath + ); + assert.strictEqual(result, 'featureValue'); + assert( + ( + client.pathTemplates + .projectLocationFeaturestoreEntityTypeFeaturePathTemplate + .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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.savedQueryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.savedQueryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('savedQueryPath', () => { + const result = client.savedQueryPath( + 'projectValue', + 'locationValue', + 'datasetValue', + 'savedQueryValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.savedQueryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSavedQueryName', () => { + const result = client.matchProjectFromSavedQueryName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromSavedQueryName', () => { + const result = client.matchLocationFromSavedQueryName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasetFromSavedQueryName', () => { + const result = client.matchDatasetFromSavedQueryName(fakePath); + assert.strictEqual(result, 'datasetValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSavedQueryFromSavedQueryName', () => { + const result = client.matchSavedQueryFromSavedQueryName(fakePath); + assert.strictEqual(result, 'savedQueryValue'); + assert( + (client.pathTemplates.savedQueryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('schedule', () => { + const fakePath = '/rendered/path/schedule'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + schedule: 'scheduleValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.schedulePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.schedulePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('schedulePath', () => { + const result = client.schedulePath( + 'projectValue', + 'locationValue', + 'scheduleValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.schedulePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromScheduleName', () => { + const result = client.matchProjectFromScheduleName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromScheduleName', () => { + const result = client.matchLocationFromScheduleName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchScheduleFromScheduleName', () => { + const result = client.matchScheduleFromScheduleName(fakePath); + assert.strictEqual(result, 'scheduleValue'); + assert( + (client.pathTemplates.schedulePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('specialistPool', () => { + const fakePath = '/rendered/path/specialistPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + specialist_pool: 'specialistPoolValue', + }; + const client = + new reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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 reasoningengineserviceModule.v1beta1.ReasoningEngineServiceClient({ + 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_schedule_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts index a854b01fb93..2b32f9533b6 100644 --- a/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_schedule_service_v1beta1.ts @@ -5106,6 +5106,71 @@ describe('v1beta1.ScheduleServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new scheduleserviceModule.v1beta1.ScheduleServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts index 6c16f131117..1ac6563a061 100644 --- a/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_specialist_pool_service_v1beta1.ts @@ -5085,6 +5085,72 @@ describe('v1beta1.SpecialistPoolServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new specialistpoolserviceModule.v1beta1.SpecialistPoolServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts index 4de473781cd..4ae990fdc91 100644 --- a/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_tensorboard_service_v1beta1.ts @@ -9703,6 +9703,72 @@ describe('v1beta1.TensorboardServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = + new tensorboardserviceModule.v1beta1.TensorboardServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.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_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts index 4e350eaa4ad..b6c16b786d9 100644 --- a/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts +++ b/packages/google-cloud-aiplatform/test/gapic_vizier_service_v1beta1.ts @@ -6404,6 +6404,71 @@ describe('v1beta1.VizierServiceClient', () => { }); }); + describe('reasoningEngine', () => { + const fakePath = '/rendered/path/reasoningEngine'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reasoning_engine: 'reasoningEngineValue', + }; + const client = new vizierserviceModule.v1beta1.VizierServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.reasoningEnginePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reasoningEnginePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reasoningEnginePath', () => { + const result = client.reasoningEnginePath( + 'projectValue', + 'locationValue', + 'reasoningEngineValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReasoningEngineName', () => { + const result = client.matchProjectFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReasoningEngineName', () => { + const result = client.matchLocationFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReasoningEngineFromReasoningEngineName', () => { + const result = + client.matchReasoningEngineFromReasoningEngineName(fakePath); + assert.strictEqual(result, 'reasoningEngineValue'); + assert( + (client.pathTemplates.reasoningEnginePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('savedQuery', () => { const fakePath = '/rendered/path/savedQuery'; const expectedParameters = {