diff --git a/packages/google-cloud-aiplatform/README.md b/packages/google-cloud-aiplatform/README.md index 5d49a234106..e38f0f74fd4 100644 --- a/packages/google-cloud-aiplatform/README.md +++ b/packages/google-cloud-aiplatform/README.md @@ -402,6 +402,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Endpoint_service.mutate_deployed_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.mutate_deployed_model.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.undeploy_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.undeploy_model.js,packages/google-cloud-aiplatform/samples/README.md) | | Endpoint_service.update_endpoint | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/endpoint_service.update_endpoint.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/endpoint_service.update_endpoint.js,packages/google-cloud-aiplatform/samples/README.md) | +| Evaluation_service.evaluate_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.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/evaluation_service.evaluate_instances.js,packages/google-cloud-aiplatform/samples/README.md) | | Feature_online_store_admin_service.create_feature_online_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.create_feature_online_store.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/feature_online_store_admin_service.create_feature_online_store.js,packages/google-cloud-aiplatform/samples/README.md) | | Feature_online_store_admin_service.create_feature_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.create_feature_view.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/feature_online_store_admin_service.create_feature_view.js,packages/google-cloud-aiplatform/samples/README.md) | | Feature_online_store_admin_service.delete_feature_online_store | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.delete_feature_online_store.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/feature_online_store_admin_service.delete_feature_online_store.js,packages/google-cloud-aiplatform/samples/README.md) | diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto new file mode 100644 index 00000000000..f3603d0153f --- /dev/null +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto @@ -0,0 +1,1188 @@ +// 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"; + +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 = "EvaluationServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Vertex AI Online Evaluation Service. +service EvaluationService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Evaluates instances based on a given metric. + rpc EvaluateInstances(EvaluateInstancesRequest) + returns (EvaluateInstancesResponse) { + option (google.api.http) = { + post: "/v1beta1/{location=projects/*/locations/*}:evaluateInstances" + body: "*" + }; + } +} + +// Pairwise prediction autorater preference. +enum PairwiseChoice { + // Unspecified prediction choice. + PAIRWISE_CHOICE_UNSPECIFIED = 0; + + // Baseline prediction wins + BASELINE = 1; + + // Candidate prediction wins + CANDIDATE = 2; + + // Winner cannot be determined + TIE = 3; +} + +// Request message for EvaluationService.EvaluateInstances. +message EvaluateInstancesRequest { + // Instances and specs for evaluation + oneof metric_inputs { + // Auto metric instances. + // Instances and metric spec for exact match metric. + ExactMatchInput exact_match_input = 2; + + // Instances and metric spec for bleu metric. + BleuInput bleu_input = 3; + + // Instances and metric spec for rouge metric. + RougeInput rouge_input = 4; + + // LLM-based metric instance. + // General text generation metrics, applicable to other categories. + // Input for fluency metric. + FluencyInput fluency_input = 5; + + // Input for coherence metric. + CoherenceInput coherence_input = 6; + + // Input for safety metric. + SafetyInput safety_input = 8; + + // Input for groundedness metric. + GroundednessInput groundedness_input = 9; + + // Input for fulfillment metric. + FulfillmentInput fulfillment_input = 12; + + // Input for response recall metric. + ResponseRecallInput response_recall_input = 13; + + // Input for summarization quality metric. + SummarizationQualityInput summarization_quality_input = 7; + + // Input for pairwise summarization quality metric. + PairwiseSummarizationQualityInput pairwise_summarization_quality_input = 23; + + // Input for summarization helpfulness metric. + SummarizationHelpfulnessInput summarization_helpfulness_input = 14; + + // Input for summarization verbosity metric. + SummarizationVerbosityInput summarization_verbosity_input = 15; + + // Input for question answering quality metric. + QuestionAnsweringQualityInput question_answering_quality_input = 10; + + // Input for pairwise question answering quality metric. + PairwiseQuestionAnsweringQualityInput + pairwise_question_answering_quality_input = 24; + + // Input for question answering relevance metric. + QuestionAnsweringRelevanceInput question_answering_relevance_input = 16; + + // Input for question answering helpfulness + // metric. + QuestionAnsweringHelpfulnessInput question_answering_helpfulness_input = 17; + + // Input for question answering correctness + // metric. + QuestionAnsweringCorrectnessInput question_answering_correctness_input = 18; + + // Input for rag context recall metric. + RagContextRecallInput rag_context_recall_input = 11; + + // Tool call metric instances. + // Input for tool call valid metric. + ToolCallValidInput tool_call_valid_input = 19; + + // Input for tool name match metric. + ToolNameMatchInput tool_name_match_input = 20; + + // Input for tool parameter key match metric. + ToolParameterKeyMatchInput tool_parameter_key_match_input = 21; + + // Input for tool parameter key value match metric. + ToolParameterKVMatchInput tool_parameter_kv_match_input = 22; + } + + // Required. The resource name of the Location to evaluate the instances. + // Format: `projects/{project}/locations/{location}` + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + +// Response message for EvaluationService.EvaluateInstances. +message EvaluateInstancesResponse { + // Evaluation results will be served in the same order as presented in + // EvaluationRequest.instances. + oneof evaluation_results { + // Auto metric evaluation results. + // Results for exact match metric. + ExactMatchResults exact_match_results = 1; + + // Results for bleu metric. + BleuResults bleu_results = 2; + + // Results for rouge metric. + RougeResults rouge_results = 3; + + // LLM-based metric evaluation result. + // General text generation metrics, applicable to other categories. + // Result for fluency metric. + FluencyResult fluency_result = 4; + + // Result for coherence metric. + CoherenceResult coherence_result = 5; + + // Result for safety metric. + SafetyResult safety_result = 7; + + // Result for groundedness metric. + GroundednessResult groundedness_result = 8; + + // Result for fulfillment metric. + FulfillmentResult fulfillment_result = 11; + + // Result for response recall metric. + ResponseRecallResult response_recall_result = 12; + + // Summarization only metrics. + // Result for summarization quality metric. + SummarizationQualityResult summarization_quality_result = 6; + + // Result for pairwise summarization quality metric. + PairwiseSummarizationQualityResult pairwise_summarization_quality_result = + 22; + + // Result for summarization helpfulness metric. + SummarizationHelpfulnessResult summarization_helpfulness_result = 13; + + // Result for summarization verbosity metric. + SummarizationVerbosityResult summarization_verbosity_result = 14; + + // Question answering only metrics. + // Result for question answering quality metric. + QuestionAnsweringQualityResult question_answering_quality_result = 9; + + // Result for pairwise question answering quality metric. + PairwiseQuestionAnsweringQualityResult + pairwise_question_answering_quality_result = 23; + + // Result for question answering relevance metric. + QuestionAnsweringRelevanceResult question_answering_relevance_result = 15; + + // Result for question answering helpfulness metric. + QuestionAnsweringHelpfulnessResult question_answering_helpfulness_result = + 16; + + // Result for question answering correctness metric. + QuestionAnsweringCorrectnessResult question_answering_correctness_result = + 17; + + // RAG only metrics. + // Result for context recall metric. + RagContextRecallResult rag_context_recall_result = 10; + + // Tool call metrics. + // Results for tool call valid metric. + ToolCallValidResults tool_call_valid_results = 18; + + // Results for tool name match metric. + ToolNameMatchResults tool_name_match_results = 19; + + // Results for tool parameter key match metric. + ToolParameterKeyMatchResults tool_parameter_key_match_results = 20; + + // Results for tool parameter key value match metric. + ToolParameterKVMatchResults tool_parameter_kv_match_results = 21; + } +} + +// Input for exact match metric. +message ExactMatchInput { + // Required. Spec for exact match metric. + ExactMatchSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated exact match instances. + repeated ExactMatchInstance instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for exact match instance. +message ExactMatchInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for exact match metric - returns 1 if prediction and reference exactly +// matches, otherwise 0. +message ExactMatchSpec {} + +// Results for exact match metric. +message ExactMatchResults { + // Output only. Exact match metric values. + repeated ExactMatchMetricValue exact_match_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Exact match metric value for an instance. +message ExactMatchMetricValue { + // Output only. Exact match score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for bleu metric. +message BleuInput { + // Required. Spec for bleu score metric. + BleuSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated bleu instances. + repeated BleuInstance instances = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for bleu instance. +message BleuInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for bleu score metric - calculates the precision of n-grams in the +// prediction as compared to reference - returns a score ranging between 0 to 1. +message BleuSpec {} + +// Results for bleu metric. +message BleuResults { + // Output only. Bleu metric values. + repeated BleuMetricValue bleu_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Bleu metric value for an instance. +message BleuMetricValue { + // Output only. Bleu score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for rouge metric. +message RougeInput { + // Required. Spec for rouge score metric. + RougeSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated rouge instances. + repeated RougeInstance instances = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for rouge instance. +message RougeInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for rouge score metric - calculates the recall of n-grams in prediction +// as compared to reference - returns a score ranging between 0 and 1. +message RougeSpec { + // Optional. Supported rouge types are rougen[1-9], rougeL and rougeLsum. + string rouge_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to use stemmer to compute rouge score. + bool use_stemmer = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to split summaries while using rougeLsum. + bool split_summaries = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Results for rouge metric. +message RougeResults { + // Output only. Rouge metric values. + repeated RougeMetricValue rouge_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Rouge metric value for an instance. +message RougeMetricValue { + // Output only. Rouge score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for coherence metric. +message CoherenceInput { + // Required. Spec for coherence score metric. + CoherenceSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Coherence instance. + CoherenceInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for coherence instance. +message CoherenceInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for coherence score metric. +message CoherenceSpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for coherence result. +message CoherenceResult { + // Output only. Coherence score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for coherence score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for coherence score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for fluency metric. +message FluencyInput { + // Required. Spec for fluency score metric. + FluencySpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Fluency instance. + FluencyInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for fluency instance. +message FluencyInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for fluency score metric. +message FluencySpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for fluency result. +message FluencyResult { + // Output only. Fluency score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for fluency score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for fluency score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for safety metric. +message SafetyInput { + // Required. Spec for safety metric. + SafetySpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Safety instance. + SafetyInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for safety instance. +message SafetyInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for safety metric. +message SafetySpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for safety result. +message SafetyResult { + // Output only. Safety score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for safety score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for safety score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for groundedness metric. +message GroundednessInput { + // Required. Spec for groundedness metric. + GroundednessSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Groundedness instance. + GroundednessInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for groundedness instance. +message GroundednessInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Background information provided in context used to compare + // against the prediction. + optional string context = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for groundedness metric. +message GroundednessSpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for groundedness result. +message GroundednessResult { + // Output only. Groundedness score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for groundedness score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for groundedness score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for fulfillment metric. +message FulfillmentInput { + // Required. Spec for fulfillment score metric. + FulfillmentSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Fulfillment instance. + FulfillmentInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for fulfillment instance. +message FulfillmentInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Inference instruction prompt to compare prediction with. + optional string instruction = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for fulfillment metric. +message FulfillmentSpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for fulfillment result. +message FulfillmentResult { + // Output only. Fulfillment score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for fulfillment score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for fulfillment score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for response recall metric. +message ResponseRecallInput { + // Required. Spec for response recall score metric. + ResponseRecallSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Response recall instance. + ResponseRecallInstance instance = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for response recall instance. +message ResponseRecallInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for response recall metric. +message ResponseRecallSpec { + // Optional. Which version to use for evaluation. + int32 version = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for response recall result. +message ResponseRecallResult { + // Output only. ResponseRecall score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for response recall score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for fulfillment score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for summarization quality metric. +message SummarizationQualityInput { + // Required. Spec for summarization quality score metric. + SummarizationQualitySpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Summarization quality instance. + SummarizationQualityInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for summarization quality instance. +message SummarizationQualityInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Text to be summarized. + optional string context = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Summarization prompt for LLM. + optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for summarization quality score metric. +message SummarizationQualitySpec { + // Optional. Whether to use instance.reference to compute summarization + // quality. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for summarization quality result. +message SummarizationQualityResult { + // Output only. Summarization Quality score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for summarization quality score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for summarization quality score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for pairwise summarization quality metric. +message PairwiseSummarizationQualityInput { + // Required. Spec for pairwise summarization quality score metric. + PairwiseSummarizationQualitySpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Pairwise summarization quality instance. + PairwiseSummarizationQualityInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for pairwise summarization quality instance. +message PairwiseSummarizationQualityInstance { + // Required. Output of the candidate model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Output of the baseline model. + optional string baseline_prediction = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Text to be summarized. + optional string context = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Summarization prompt for LLM. + optional string instruction = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for pairwise summarization quality score metric. +message PairwiseSummarizationQualitySpec { + // Optional. Whether to use instance.reference to compute pairwise + // summarization quality. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for pairwise summarization quality result. +message PairwiseSummarizationQualityResult { + // Output only. Pairwise summarization prediction choice. + PairwiseChoice pairwise_choice = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for summarization quality score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for summarization quality score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for summarization helpfulness metric. +message SummarizationHelpfulnessInput { + // Required. Spec for summarization helpfulness score metric. + SummarizationHelpfulnessSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Summarization helpfulness instance. + SummarizationHelpfulnessInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for summarization helpfulness instance. +message SummarizationHelpfulnessInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Text to be summarized. + optional string context = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Summarization prompt for LLM. + optional string instruction = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for summarization helpfulness score metric. +message SummarizationHelpfulnessSpec { + // Optional. Whether to use instance.reference to compute summarization + // helpfulness. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for summarization helpfulness result. +message SummarizationHelpfulnessResult { + // Output only. Summarization Helpfulness score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for summarization helpfulness score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for summarization helpfulness score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for summarization verbosity metric. +message SummarizationVerbosityInput { + // Required. Spec for summarization verbosity score metric. + SummarizationVerbositySpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Summarization verbosity instance. + SummarizationVerbosityInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for summarization verbosity instance. +message SummarizationVerbosityInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Text to be summarized. + optional string context = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Summarization prompt for LLM. + optional string instruction = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for summarization verbosity score metric. +message SummarizationVerbositySpec { + // Optional. Whether to use instance.reference to compute summarization + // verbosity. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for summarization verbosity result. +message SummarizationVerbosityResult { + // Output only. Summarization Verbosity score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for summarization verbosity score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for summarization verbosity score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for question answering quality metric. +message QuestionAnsweringQualityInput { + // Required. Spec for question answering quality score metric. + QuestionAnsweringQualitySpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Question answering quality instance. + QuestionAnsweringQualityInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering quality instance. +message QuestionAnsweringQualityInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text to answer the question. + optional string context = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Question Answering prompt for LLM. + optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering quality score metric. +message QuestionAnsweringQualitySpec { + // Optional. Whether to use instance.reference to compute question answering + // quality. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for question answering quality result. +message QuestionAnsweringQualityResult { + // Output only. Question Answering Quality score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for question answering quality score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for question answering quality score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for pairwise question answering quality metric. +message PairwiseQuestionAnsweringQualityInput { + // Required. Spec for pairwise question answering quality score metric. + PairwiseQuestionAnsweringQualitySpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Pairwise question answering quality instance. + PairwiseQuestionAnsweringQualityInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for pairwise question answering quality instance. +message PairwiseQuestionAnsweringQualityInstance { + // Required. Output of the candidate model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Output of the baseline model. + optional string baseline_prediction = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text to answer the question. + optional string context = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Question Answering prompt for LLM. + optional string instruction = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for pairwise question answering quality score metric. +message PairwiseQuestionAnsweringQualitySpec { + // Optional. Whether to use instance.reference to compute question answering + // quality. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for pairwise question answering quality result. +message PairwiseQuestionAnsweringQualityResult { + // Output only. Pairwise question answering prediction choice. + PairwiseChoice pairwise_choice = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for question answering quality score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for question answering quality score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for question answering relevance metric. +message QuestionAnsweringRelevanceInput { + // Required. Spec for question answering relevance score metric. + QuestionAnsweringRelevanceSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Question answering relevance instance. + QuestionAnsweringRelevanceInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering relevance instance. +message QuestionAnsweringRelevanceInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text provided as context to answer the question. + optional string context = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The question asked and other instruction in the inference prompt. + optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering relevance metric. +message QuestionAnsweringRelevanceSpec { + // Optional. Whether to use instance.reference to compute question answering + // relevance. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for question answering relevance result. +message QuestionAnsweringRelevanceResult { + // Output only. Question Answering Relevance score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for question answering relevance score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for question answering relevance score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for question answering helpfulness metric. +message QuestionAnsweringHelpfulnessInput { + // Required. Spec for question answering helpfulness score metric. + QuestionAnsweringHelpfulnessSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Question answering helpfulness instance. + QuestionAnsweringHelpfulnessInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering helpfulness instance. +message QuestionAnsweringHelpfulnessInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text provided as context to answer the question. + optional string context = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The question asked and other instruction in the inference prompt. + optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering helpfulness metric. +message QuestionAnsweringHelpfulnessSpec { + // Optional. Whether to use instance.reference to compute question answering + // helpfulness. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for question answering helpfulness result. +message QuestionAnsweringHelpfulnessResult { + // Output only. Question Answering Helpfulness score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for question answering helpfulness score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for question answering helpfulness score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for question answering correctness metric. +message QuestionAnsweringCorrectnessInput { + // Required. Spec for question answering correctness score metric. + QuestionAnsweringCorrectnessSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Question answering correctness instance. + QuestionAnsweringCorrectnessInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering correctness instance. +message QuestionAnsweringCorrectnessInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Text provided as context to answer the question. + optional string context = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The question asked and other instruction in the inference prompt. + optional string instruction = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for question answering correctness metric. +message QuestionAnsweringCorrectnessSpec { + // Optional. Whether to use instance.reference to compute question answering + // correctness. + bool use_reference = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for question answering correctness result. +message QuestionAnsweringCorrectnessResult { + // Output only. Question Answering Correctness score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for question answering correctness score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for question answering correctness score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for rag context recall metric. +message RagContextRecallInput { + // Required. Spec for rag context recall metric. + RagContextRecallSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Rag context recall instance. + RagContextRecallInstance instance = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for rag context recall instance. +message RagContextRecallInstance { + // Required. Ground truth used to compare against the context. + optional string reference = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Retrieved facts from RAG pipeline as context to be evaluated. + optional string context = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for rag context recall metric. +message RagContextRecallSpec { + // Optional. Which version to use for evaluation. + int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for rag context recall result. +message RagContextRecallResult { + // Output only. RagContextRecall score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explanation for rag context recall score. + string explanation = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Confidence for rag context recall score. + optional float confidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for tool call valid metric. +message ToolCallValidInput { + // Required. Spec for tool call valid metric. + ToolCallValidSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated tool call valid instances. + repeated ToolCallValidInstance instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for tool call valid metric. +message ToolCallValidSpec {} + +// Spec for tool call valid instance. +message ToolCallValidInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Results for tool call valid metric. +message ToolCallValidResults { + // Output only. Tool call valid metric values. + repeated ToolCallValidMetricValue tool_call_valid_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tool call valid metric value for an instance. +message ToolCallValidMetricValue { + // Output only. Tool call valid score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for tool name match metric. +message ToolNameMatchInput { + // Required. Spec for tool name match metric. + ToolNameMatchSpec metric_spec = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated tool name match instances. + repeated ToolNameMatchInstance instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for tool name match metric. +message ToolNameMatchSpec {} + +// Spec for tool name match instance. +message ToolNameMatchInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Results for tool name match metric. +message ToolNameMatchResults { + // Output only. Tool name match metric values. + repeated ToolNameMatchMetricValue tool_name_match_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tool name match metric value for an instance. +message ToolNameMatchMetricValue { + // Output only. Tool name match score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for tool parameter key match metric. +message ToolParameterKeyMatchInput { + // Required. Spec for tool parameter key match metric. + ToolParameterKeyMatchSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated tool parameter key match instances. + repeated ToolParameterKeyMatchInstance instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for tool parameter key match metric. +message ToolParameterKeyMatchSpec {} + +// Spec for tool parameter key match instance. +message ToolParameterKeyMatchInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Results for tool parameter key match metric. +message ToolParameterKeyMatchResults { + // Output only. Tool parameter key match metric values. + repeated ToolParameterKeyMatchMetricValue + tool_parameter_key_match_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tool parameter key match metric value for an instance. +message ToolParameterKeyMatchMetricValue { + // Output only. Tool parameter key match score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Input for tool parameter key value match metric. +message ToolParameterKVMatchInput { + // Required. Spec for tool parameter key value match metric. + ToolParameterKVMatchSpec metric_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Repeated tool parameter key value match instances. + repeated ToolParameterKVMatchInstance instances = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Spec for tool parameter key value match metric. +message ToolParameterKVMatchSpec { + // Optional. Whether to use STRCIT string match on parameter values. + bool use_strict_string_match = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Spec for tool parameter key value match instance. +message ToolParameterKVMatchInstance { + // Required. Output of the evaluated model. + optional string prediction = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ground truth used to compare against the prediction. + optional string reference = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Results for tool parameter key value match metric. +message ToolParameterKVMatchResults { + // Output only. Tool parameter key value match metric values. + repeated ToolParameterKVMatchMetricValue + tool_parameter_kv_match_metric_values = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tool parameter key value match metric value for an instance. +message ToolParameterKVMatchMetricValue { + // Output only. Tool parameter key value match score. + optional float score = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 26118af3e4e..004172b4731 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -122402,6 +122402,11038 @@ export namespace google { } } + /** Represents an EvaluationService */ + class EvaluationService extends $protobuf.rpc.Service { + + /** + * Constructs a new EvaluationService 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 EvaluationService 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): EvaluationService; + + /** + * Calls EvaluateInstances. + * @param request EvaluateInstancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EvaluateInstancesResponse + */ + public evaluateInstances(request: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, callback: google.cloud.aiplatform.v1beta1.EvaluationService.EvaluateInstancesCallback): void; + + /** + * Calls EvaluateInstances. + * @param request EvaluateInstancesRequest message or plain object + * @returns Promise + */ + public evaluateInstances(request: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest): Promise; + } + + namespace EvaluationService { + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.EvaluationService|evaluateInstances}. + * @param error Error, if any + * @param [response] EvaluateInstancesResponse + */ + type EvaluateInstancesCallback = (error: (Error|null), response?: google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse) => void; + } + + /** PairwiseChoice enum. */ + enum PairwiseChoice { + PAIRWISE_CHOICE_UNSPECIFIED = 0, + BASELINE = 1, + CANDIDATE = 2, + TIE = 3 + } + + /** Properties of an EvaluateInstancesRequest. */ + interface IEvaluateInstancesRequest { + + /** EvaluateInstancesRequest exactMatchInput */ + exactMatchInput?: (google.cloud.aiplatform.v1beta1.IExactMatchInput|null); + + /** EvaluateInstancesRequest bleuInput */ + bleuInput?: (google.cloud.aiplatform.v1beta1.IBleuInput|null); + + /** EvaluateInstancesRequest rougeInput */ + rougeInput?: (google.cloud.aiplatform.v1beta1.IRougeInput|null); + + /** EvaluateInstancesRequest fluencyInput */ + fluencyInput?: (google.cloud.aiplatform.v1beta1.IFluencyInput|null); + + /** EvaluateInstancesRequest coherenceInput */ + coherenceInput?: (google.cloud.aiplatform.v1beta1.ICoherenceInput|null); + + /** EvaluateInstancesRequest safetyInput */ + safetyInput?: (google.cloud.aiplatform.v1beta1.ISafetyInput|null); + + /** EvaluateInstancesRequest groundednessInput */ + groundednessInput?: (google.cloud.aiplatform.v1beta1.IGroundednessInput|null); + + /** EvaluateInstancesRequest fulfillmentInput */ + fulfillmentInput?: (google.cloud.aiplatform.v1beta1.IFulfillmentInput|null); + + /** EvaluateInstancesRequest responseRecallInput */ + responseRecallInput?: (google.cloud.aiplatform.v1beta1.IResponseRecallInput|null); + + /** EvaluateInstancesRequest summarizationQualityInput */ + summarizationQualityInput?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityInput|null); + + /** EvaluateInstancesRequest pairwiseSummarizationQualityInput */ + pairwiseSummarizationQualityInput?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput|null); + + /** EvaluateInstancesRequest summarizationHelpfulnessInput */ + summarizationHelpfulnessInput?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput|null); + + /** EvaluateInstancesRequest summarizationVerbosityInput */ + summarizationVerbosityInput?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput|null); + + /** EvaluateInstancesRequest questionAnsweringQualityInput */ + questionAnsweringQualityInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput|null); + + /** EvaluateInstancesRequest pairwiseQuestionAnsweringQualityInput */ + pairwiseQuestionAnsweringQualityInput?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput|null); + + /** EvaluateInstancesRequest questionAnsweringRelevanceInput */ + questionAnsweringRelevanceInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput|null); + + /** EvaluateInstancesRequest questionAnsweringHelpfulnessInput */ + questionAnsweringHelpfulnessInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput|null); + + /** EvaluateInstancesRequest questionAnsweringCorrectnessInput */ + questionAnsweringCorrectnessInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput|null); + + /** EvaluateInstancesRequest ragContextRecallInput */ + ragContextRecallInput?: (google.cloud.aiplatform.v1beta1.IRagContextRecallInput|null); + + /** EvaluateInstancesRequest toolCallValidInput */ + toolCallValidInput?: (google.cloud.aiplatform.v1beta1.IToolCallValidInput|null); + + /** EvaluateInstancesRequest toolNameMatchInput */ + toolNameMatchInput?: (google.cloud.aiplatform.v1beta1.IToolNameMatchInput|null); + + /** EvaluateInstancesRequest toolParameterKeyMatchInput */ + toolParameterKeyMatchInput?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput|null); + + /** EvaluateInstancesRequest toolParameterKvMatchInput */ + toolParameterKvMatchInput?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput|null); + + /** EvaluateInstancesRequest location */ + location?: (string|null); + } + + /** Represents an EvaluateInstancesRequest. */ + class EvaluateInstancesRequest implements IEvaluateInstancesRequest { + + /** + * Constructs a new EvaluateInstancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest); + + /** EvaluateInstancesRequest exactMatchInput. */ + public exactMatchInput?: (google.cloud.aiplatform.v1beta1.IExactMatchInput|null); + + /** EvaluateInstancesRequest bleuInput. */ + public bleuInput?: (google.cloud.aiplatform.v1beta1.IBleuInput|null); + + /** EvaluateInstancesRequest rougeInput. */ + public rougeInput?: (google.cloud.aiplatform.v1beta1.IRougeInput|null); + + /** EvaluateInstancesRequest fluencyInput. */ + public fluencyInput?: (google.cloud.aiplatform.v1beta1.IFluencyInput|null); + + /** EvaluateInstancesRequest coherenceInput. */ + public coherenceInput?: (google.cloud.aiplatform.v1beta1.ICoherenceInput|null); + + /** EvaluateInstancesRequest safetyInput. */ + public safetyInput?: (google.cloud.aiplatform.v1beta1.ISafetyInput|null); + + /** EvaluateInstancesRequest groundednessInput. */ + public groundednessInput?: (google.cloud.aiplatform.v1beta1.IGroundednessInput|null); + + /** EvaluateInstancesRequest fulfillmentInput. */ + public fulfillmentInput?: (google.cloud.aiplatform.v1beta1.IFulfillmentInput|null); + + /** EvaluateInstancesRequest responseRecallInput. */ + public responseRecallInput?: (google.cloud.aiplatform.v1beta1.IResponseRecallInput|null); + + /** EvaluateInstancesRequest summarizationQualityInput. */ + public summarizationQualityInput?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityInput|null); + + /** EvaluateInstancesRequest pairwiseSummarizationQualityInput. */ + public pairwiseSummarizationQualityInput?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput|null); + + /** EvaluateInstancesRequest summarizationHelpfulnessInput. */ + public summarizationHelpfulnessInput?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput|null); + + /** EvaluateInstancesRequest summarizationVerbosityInput. */ + public summarizationVerbosityInput?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput|null); + + /** EvaluateInstancesRequest questionAnsweringQualityInput. */ + public questionAnsweringQualityInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput|null); + + /** EvaluateInstancesRequest pairwiseQuestionAnsweringQualityInput. */ + public pairwiseQuestionAnsweringQualityInput?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput|null); + + /** EvaluateInstancesRequest questionAnsweringRelevanceInput. */ + public questionAnsweringRelevanceInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput|null); + + /** EvaluateInstancesRequest questionAnsweringHelpfulnessInput. */ + public questionAnsweringHelpfulnessInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput|null); + + /** EvaluateInstancesRequest questionAnsweringCorrectnessInput. */ + public questionAnsweringCorrectnessInput?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput|null); + + /** EvaluateInstancesRequest ragContextRecallInput. */ + public ragContextRecallInput?: (google.cloud.aiplatform.v1beta1.IRagContextRecallInput|null); + + /** EvaluateInstancesRequest toolCallValidInput. */ + public toolCallValidInput?: (google.cloud.aiplatform.v1beta1.IToolCallValidInput|null); + + /** EvaluateInstancesRequest toolNameMatchInput. */ + public toolNameMatchInput?: (google.cloud.aiplatform.v1beta1.IToolNameMatchInput|null); + + /** EvaluateInstancesRequest toolParameterKeyMatchInput. */ + public toolParameterKeyMatchInput?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput|null); + + /** EvaluateInstancesRequest toolParameterKvMatchInput. */ + public toolParameterKvMatchInput?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput|null); + + /** EvaluateInstancesRequest location. */ + public location: string; + + /** EvaluateInstancesRequest metricInputs. */ + public metricInputs?: ("exactMatchInput"|"bleuInput"|"rougeInput"|"fluencyInput"|"coherenceInput"|"safetyInput"|"groundednessInput"|"fulfillmentInput"|"responseRecallInput"|"summarizationQualityInput"|"pairwiseSummarizationQualityInput"|"summarizationHelpfulnessInput"|"summarizationVerbosityInput"|"questionAnsweringQualityInput"|"pairwiseQuestionAnsweringQualityInput"|"questionAnsweringRelevanceInput"|"questionAnsweringHelpfulnessInput"|"questionAnsweringCorrectnessInput"|"ragContextRecallInput"|"toolCallValidInput"|"toolNameMatchInput"|"toolParameterKeyMatchInput"|"toolParameterKvMatchInput"); + + /** + * Creates a new EvaluateInstancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluateInstancesRequest instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest): google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest; + + /** + * Encodes the specified EvaluateInstancesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.verify|verify} messages. + * @param message EvaluateInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluateInstancesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.verify|verify} messages. + * @param message EvaluateInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluateInstancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluateInstancesRequest + * @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.EvaluateInstancesRequest; + + /** + * Decodes an EvaluateInstancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluateInstancesRequest + * @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.EvaluateInstancesRequest; + + /** + * Verifies an EvaluateInstancesRequest 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 EvaluateInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluateInstancesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest; + + /** + * Creates a plain object from an EvaluateInstancesRequest message. Also converts values to other types if specified. + * @param message EvaluateInstancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluateInstancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluateInstancesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvaluateInstancesResponse. */ + interface IEvaluateInstancesResponse { + + /** EvaluateInstancesResponse exactMatchResults */ + exactMatchResults?: (google.cloud.aiplatform.v1beta1.IExactMatchResults|null); + + /** EvaluateInstancesResponse bleuResults */ + bleuResults?: (google.cloud.aiplatform.v1beta1.IBleuResults|null); + + /** EvaluateInstancesResponse rougeResults */ + rougeResults?: (google.cloud.aiplatform.v1beta1.IRougeResults|null); + + /** EvaluateInstancesResponse fluencyResult */ + fluencyResult?: (google.cloud.aiplatform.v1beta1.IFluencyResult|null); + + /** EvaluateInstancesResponse coherenceResult */ + coherenceResult?: (google.cloud.aiplatform.v1beta1.ICoherenceResult|null); + + /** EvaluateInstancesResponse safetyResult */ + safetyResult?: (google.cloud.aiplatform.v1beta1.ISafetyResult|null); + + /** EvaluateInstancesResponse groundednessResult */ + groundednessResult?: (google.cloud.aiplatform.v1beta1.IGroundednessResult|null); + + /** EvaluateInstancesResponse fulfillmentResult */ + fulfillmentResult?: (google.cloud.aiplatform.v1beta1.IFulfillmentResult|null); + + /** EvaluateInstancesResponse responseRecallResult */ + responseRecallResult?: (google.cloud.aiplatform.v1beta1.IResponseRecallResult|null); + + /** EvaluateInstancesResponse summarizationQualityResult */ + summarizationQualityResult?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityResult|null); + + /** EvaluateInstancesResponse pairwiseSummarizationQualityResult */ + pairwiseSummarizationQualityResult?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult|null); + + /** EvaluateInstancesResponse summarizationHelpfulnessResult */ + summarizationHelpfulnessResult?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult|null); + + /** EvaluateInstancesResponse summarizationVerbosityResult */ + summarizationVerbosityResult?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult|null); + + /** EvaluateInstancesResponse questionAnsweringQualityResult */ + questionAnsweringQualityResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult|null); + + /** EvaluateInstancesResponse pairwiseQuestionAnsweringQualityResult */ + pairwiseQuestionAnsweringQualityResult?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult|null); + + /** EvaluateInstancesResponse questionAnsweringRelevanceResult */ + questionAnsweringRelevanceResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult|null); + + /** EvaluateInstancesResponse questionAnsweringHelpfulnessResult */ + questionAnsweringHelpfulnessResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult|null); + + /** EvaluateInstancesResponse questionAnsweringCorrectnessResult */ + questionAnsweringCorrectnessResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult|null); + + /** EvaluateInstancesResponse ragContextRecallResult */ + ragContextRecallResult?: (google.cloud.aiplatform.v1beta1.IRagContextRecallResult|null); + + /** EvaluateInstancesResponse toolCallValidResults */ + toolCallValidResults?: (google.cloud.aiplatform.v1beta1.IToolCallValidResults|null); + + /** EvaluateInstancesResponse toolNameMatchResults */ + toolNameMatchResults?: (google.cloud.aiplatform.v1beta1.IToolNameMatchResults|null); + + /** EvaluateInstancesResponse toolParameterKeyMatchResults */ + toolParameterKeyMatchResults?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults|null); + + /** EvaluateInstancesResponse toolParameterKvMatchResults */ + toolParameterKvMatchResults?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults|null); + } + + /** Represents an EvaluateInstancesResponse. */ + class EvaluateInstancesResponse implements IEvaluateInstancesResponse { + + /** + * Constructs a new EvaluateInstancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse); + + /** EvaluateInstancesResponse exactMatchResults. */ + public exactMatchResults?: (google.cloud.aiplatform.v1beta1.IExactMatchResults|null); + + /** EvaluateInstancesResponse bleuResults. */ + public bleuResults?: (google.cloud.aiplatform.v1beta1.IBleuResults|null); + + /** EvaluateInstancesResponse rougeResults. */ + public rougeResults?: (google.cloud.aiplatform.v1beta1.IRougeResults|null); + + /** EvaluateInstancesResponse fluencyResult. */ + public fluencyResult?: (google.cloud.aiplatform.v1beta1.IFluencyResult|null); + + /** EvaluateInstancesResponse coherenceResult. */ + public coherenceResult?: (google.cloud.aiplatform.v1beta1.ICoherenceResult|null); + + /** EvaluateInstancesResponse safetyResult. */ + public safetyResult?: (google.cloud.aiplatform.v1beta1.ISafetyResult|null); + + /** EvaluateInstancesResponse groundednessResult. */ + public groundednessResult?: (google.cloud.aiplatform.v1beta1.IGroundednessResult|null); + + /** EvaluateInstancesResponse fulfillmentResult. */ + public fulfillmentResult?: (google.cloud.aiplatform.v1beta1.IFulfillmentResult|null); + + /** EvaluateInstancesResponse responseRecallResult. */ + public responseRecallResult?: (google.cloud.aiplatform.v1beta1.IResponseRecallResult|null); + + /** EvaluateInstancesResponse summarizationQualityResult. */ + public summarizationQualityResult?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityResult|null); + + /** EvaluateInstancesResponse pairwiseSummarizationQualityResult. */ + public pairwiseSummarizationQualityResult?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult|null); + + /** EvaluateInstancesResponse summarizationHelpfulnessResult. */ + public summarizationHelpfulnessResult?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult|null); + + /** EvaluateInstancesResponse summarizationVerbosityResult. */ + public summarizationVerbosityResult?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult|null); + + /** EvaluateInstancesResponse questionAnsweringQualityResult. */ + public questionAnsweringQualityResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult|null); + + /** EvaluateInstancesResponse pairwiseQuestionAnsweringQualityResult. */ + public pairwiseQuestionAnsweringQualityResult?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult|null); + + /** EvaluateInstancesResponse questionAnsweringRelevanceResult. */ + public questionAnsweringRelevanceResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult|null); + + /** EvaluateInstancesResponse questionAnsweringHelpfulnessResult. */ + public questionAnsweringHelpfulnessResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult|null); + + /** EvaluateInstancesResponse questionAnsweringCorrectnessResult. */ + public questionAnsweringCorrectnessResult?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult|null); + + /** EvaluateInstancesResponse ragContextRecallResult. */ + public ragContextRecallResult?: (google.cloud.aiplatform.v1beta1.IRagContextRecallResult|null); + + /** EvaluateInstancesResponse toolCallValidResults. */ + public toolCallValidResults?: (google.cloud.aiplatform.v1beta1.IToolCallValidResults|null); + + /** EvaluateInstancesResponse toolNameMatchResults. */ + public toolNameMatchResults?: (google.cloud.aiplatform.v1beta1.IToolNameMatchResults|null); + + /** EvaluateInstancesResponse toolParameterKeyMatchResults. */ + public toolParameterKeyMatchResults?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults|null); + + /** EvaluateInstancesResponse toolParameterKvMatchResults. */ + public toolParameterKvMatchResults?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults|null); + + /** EvaluateInstancesResponse evaluationResults. */ + public evaluationResults?: ("exactMatchResults"|"bleuResults"|"rougeResults"|"fluencyResult"|"coherenceResult"|"safetyResult"|"groundednessResult"|"fulfillmentResult"|"responseRecallResult"|"summarizationQualityResult"|"pairwiseSummarizationQualityResult"|"summarizationHelpfulnessResult"|"summarizationVerbosityResult"|"questionAnsweringQualityResult"|"pairwiseQuestionAnsweringQualityResult"|"questionAnsweringRelevanceResult"|"questionAnsweringHelpfulnessResult"|"questionAnsweringCorrectnessResult"|"ragContextRecallResult"|"toolCallValidResults"|"toolNameMatchResults"|"toolParameterKeyMatchResults"|"toolParameterKvMatchResults"); + + /** + * Creates a new EvaluateInstancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EvaluateInstancesResponse instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse): google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse; + + /** + * Encodes the specified EvaluateInstancesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.verify|verify} messages. + * @param message EvaluateInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvaluateInstancesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.verify|verify} messages. + * @param message EvaluateInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvaluateInstancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvaluateInstancesResponse + * @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.EvaluateInstancesResponse; + + /** + * Decodes an EvaluateInstancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvaluateInstancesResponse + * @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.EvaluateInstancesResponse; + + /** + * Verifies an EvaluateInstancesResponse 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 EvaluateInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvaluateInstancesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse; + + /** + * Creates a plain object from an EvaluateInstancesResponse message. Also converts values to other types if specified. + * @param message EvaluateInstancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvaluateInstancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvaluateInstancesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchInput. */ + interface IExactMatchInput { + + /** ExactMatchInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IExactMatchSpec|null); + + /** ExactMatchInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IExactMatchInstance[]|null); + } + + /** Represents an ExactMatchInput. */ + class ExactMatchInput implements IExactMatchInput { + + /** + * Constructs a new ExactMatchInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExactMatchInput); + + /** ExactMatchInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IExactMatchSpec|null); + + /** ExactMatchInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IExactMatchInstance[]; + + /** + * Creates a new ExactMatchInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExactMatchInput): google.cloud.aiplatform.v1beta1.ExactMatchInput; + + /** + * Encodes the specified ExactMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInput.verify|verify} messages. + * @param message ExactMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExactMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInput.verify|verify} messages. + * @param message ExactMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExactMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchInput + * @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.ExactMatchInput; + + /** + * Decodes an ExactMatchInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchInput + * @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.ExactMatchInput; + + /** + * Verifies an ExactMatchInput 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 ExactMatchInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExactMatchInput; + + /** + * Creates a plain object from an ExactMatchInput message. Also converts values to other types if specified. + * @param message ExactMatchInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExactMatchInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchInstance. */ + interface IExactMatchInstance { + + /** ExactMatchInstance prediction */ + prediction?: (string|null); + + /** ExactMatchInstance reference */ + reference?: (string|null); + } + + /** Represents an ExactMatchInstance. */ + class ExactMatchInstance implements IExactMatchInstance { + + /** + * Constructs a new ExactMatchInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExactMatchInstance); + + /** ExactMatchInstance prediction. */ + public prediction?: (string|null); + + /** ExactMatchInstance reference. */ + public reference?: (string|null); + + /** ExactMatchInstance _prediction. */ + public _prediction?: "prediction"; + + /** ExactMatchInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ExactMatchInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExactMatchInstance): google.cloud.aiplatform.v1beta1.ExactMatchInstance; + + /** + * Encodes the specified ExactMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInstance.verify|verify} messages. + * @param message ExactMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExactMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInstance.verify|verify} messages. + * @param message ExactMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExactMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchInstance + * @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.ExactMatchInstance; + + /** + * Decodes an ExactMatchInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchInstance + * @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.ExactMatchInstance; + + /** + * Verifies an ExactMatchInstance 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 ExactMatchInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExactMatchInstance; + + /** + * Creates a plain object from an ExactMatchInstance message. Also converts values to other types if specified. + * @param message ExactMatchInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExactMatchInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchSpec. */ + interface IExactMatchSpec { + } + + /** Represents an ExactMatchSpec. */ + class ExactMatchSpec implements IExactMatchSpec { + + /** + * Constructs a new ExactMatchSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExactMatchSpec); + + /** + * Creates a new ExactMatchSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExactMatchSpec): google.cloud.aiplatform.v1beta1.ExactMatchSpec; + + /** + * Encodes the specified ExactMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchSpec.verify|verify} messages. + * @param message ExactMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExactMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchSpec.verify|verify} messages. + * @param message ExactMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExactMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchSpec + * @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.ExactMatchSpec; + + /** + * Decodes an ExactMatchSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchSpec + * @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.ExactMatchSpec; + + /** + * Verifies an ExactMatchSpec 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 ExactMatchSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExactMatchSpec; + + /** + * Creates a plain object from an ExactMatchSpec message. Also converts values to other types if specified. + * @param message ExactMatchSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExactMatchSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchResults. */ + interface IExactMatchResults { + + /** ExactMatchResults exactMatchMetricValues */ + exactMatchMetricValues?: (google.cloud.aiplatform.v1beta1.IExactMatchMetricValue[]|null); + } + + /** Represents an ExactMatchResults. */ + class ExactMatchResults implements IExactMatchResults { + + /** + * Constructs a new ExactMatchResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExactMatchResults); + + /** ExactMatchResults exactMatchMetricValues. */ + public exactMatchMetricValues: google.cloud.aiplatform.v1beta1.IExactMatchMetricValue[]; + + /** + * Creates a new ExactMatchResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExactMatchResults): google.cloud.aiplatform.v1beta1.ExactMatchResults; + + /** + * Encodes the specified ExactMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchResults.verify|verify} messages. + * @param message ExactMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExactMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchResults.verify|verify} messages. + * @param message ExactMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExactMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchResults + * @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.ExactMatchResults; + + /** + * Decodes an ExactMatchResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchResults + * @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.ExactMatchResults; + + /** + * Verifies an ExactMatchResults 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 ExactMatchResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExactMatchResults; + + /** + * Creates a plain object from an ExactMatchResults message. Also converts values to other types if specified. + * @param message ExactMatchResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExactMatchResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExactMatchMetricValue. */ + interface IExactMatchMetricValue { + + /** ExactMatchMetricValue score */ + score?: (number|null); + } + + /** Represents an ExactMatchMetricValue. */ + class ExactMatchMetricValue implements IExactMatchMetricValue { + + /** + * Constructs a new ExactMatchMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IExactMatchMetricValue); + + /** ExactMatchMetricValue score. */ + public score?: (number|null); + + /** ExactMatchMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new ExactMatchMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ExactMatchMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IExactMatchMetricValue): google.cloud.aiplatform.v1beta1.ExactMatchMetricValue; + + /** + * Encodes the specified ExactMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify|verify} messages. + * @param message ExactMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IExactMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExactMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify|verify} messages. + * @param message ExactMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IExactMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExactMatchMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExactMatchMetricValue + * @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.ExactMatchMetricValue; + + /** + * Decodes an ExactMatchMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExactMatchMetricValue + * @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.ExactMatchMetricValue; + + /** + * Verifies an ExactMatchMetricValue 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 ExactMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExactMatchMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ExactMatchMetricValue; + + /** + * Creates a plain object from an ExactMatchMetricValue message. Also converts values to other types if specified. + * @param message ExactMatchMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ExactMatchMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExactMatchMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExactMatchMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BleuInput. */ + interface IBleuInput { + + /** BleuInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IBleuSpec|null); + + /** BleuInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IBleuInstance[]|null); + } + + /** Represents a BleuInput. */ + class BleuInput implements IBleuInput { + + /** + * Constructs a new BleuInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuInput); + + /** BleuInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IBleuSpec|null); + + /** BleuInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IBleuInstance[]; + + /** + * Creates a new BleuInput instance using the specified properties. + * @param [properties] Properties to set + * @returns BleuInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBleuInput): google.cloud.aiplatform.v1beta1.BleuInput; + + /** + * Encodes the specified BleuInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInput.verify|verify} messages. + * @param message BleuInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBleuInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BleuInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInput.verify|verify} messages. + * @param message BleuInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBleuInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BleuInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BleuInput + * @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.BleuInput; + + /** + * Decodes a BleuInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BleuInput + * @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.BleuInput; + + /** + * Verifies a BleuInput 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 BleuInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BleuInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BleuInput; + + /** + * Creates a plain object from a BleuInput message. Also converts values to other types if specified. + * @param message BleuInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BleuInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BleuInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BleuInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BleuInstance. */ + interface IBleuInstance { + + /** BleuInstance prediction */ + prediction?: (string|null); + + /** BleuInstance reference */ + reference?: (string|null); + } + + /** Represents a BleuInstance. */ + class BleuInstance implements IBleuInstance { + + /** + * Constructs a new BleuInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuInstance); + + /** BleuInstance prediction. */ + public prediction?: (string|null); + + /** BleuInstance reference. */ + public reference?: (string|null); + + /** BleuInstance _prediction. */ + public _prediction?: "prediction"; + + /** BleuInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new BleuInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns BleuInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBleuInstance): google.cloud.aiplatform.v1beta1.BleuInstance; + + /** + * Encodes the specified BleuInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInstance.verify|verify} messages. + * @param message BleuInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBleuInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BleuInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInstance.verify|verify} messages. + * @param message BleuInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBleuInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BleuInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BleuInstance + * @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.BleuInstance; + + /** + * Decodes a BleuInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BleuInstance + * @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.BleuInstance; + + /** + * Verifies a BleuInstance 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 BleuInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BleuInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BleuInstance; + + /** + * Creates a plain object from a BleuInstance message. Also converts values to other types if specified. + * @param message BleuInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BleuInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BleuInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BleuInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BleuSpec. */ + interface IBleuSpec { + } + + /** Represents a BleuSpec. */ + class BleuSpec implements IBleuSpec { + + /** + * Constructs a new BleuSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuSpec); + + /** + * Creates a new BleuSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns BleuSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBleuSpec): google.cloud.aiplatform.v1beta1.BleuSpec; + + /** + * Encodes the specified BleuSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuSpec.verify|verify} messages. + * @param message BleuSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBleuSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BleuSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuSpec.verify|verify} messages. + * @param message BleuSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBleuSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BleuSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BleuSpec + * @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.BleuSpec; + + /** + * Decodes a BleuSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BleuSpec + * @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.BleuSpec; + + /** + * Verifies a BleuSpec 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 BleuSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BleuSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BleuSpec; + + /** + * Creates a plain object from a BleuSpec message. Also converts values to other types if specified. + * @param message BleuSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BleuSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BleuSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BleuSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BleuResults. */ + interface IBleuResults { + + /** BleuResults bleuMetricValues */ + bleuMetricValues?: (google.cloud.aiplatform.v1beta1.IBleuMetricValue[]|null); + } + + /** Represents a BleuResults. */ + class BleuResults implements IBleuResults { + + /** + * Constructs a new BleuResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuResults); + + /** BleuResults bleuMetricValues. */ + public bleuMetricValues: google.cloud.aiplatform.v1beta1.IBleuMetricValue[]; + + /** + * Creates a new BleuResults instance using the specified properties. + * @param [properties] Properties to set + * @returns BleuResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBleuResults): google.cloud.aiplatform.v1beta1.BleuResults; + + /** + * Encodes the specified BleuResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuResults.verify|verify} messages. + * @param message BleuResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBleuResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BleuResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuResults.verify|verify} messages. + * @param message BleuResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBleuResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BleuResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BleuResults + * @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.BleuResults; + + /** + * Decodes a BleuResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BleuResults + * @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.BleuResults; + + /** + * Verifies a BleuResults 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 BleuResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BleuResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BleuResults; + + /** + * Creates a plain object from a BleuResults message. Also converts values to other types if specified. + * @param message BleuResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BleuResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BleuResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BleuResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BleuMetricValue. */ + interface IBleuMetricValue { + + /** BleuMetricValue score */ + score?: (number|null); + } + + /** Represents a BleuMetricValue. */ + class BleuMetricValue implements IBleuMetricValue { + + /** + * Constructs a new BleuMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IBleuMetricValue); + + /** BleuMetricValue score. */ + public score?: (number|null); + + /** BleuMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new BleuMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BleuMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IBleuMetricValue): google.cloud.aiplatform.v1beta1.BleuMetricValue; + + /** + * Encodes the specified BleuMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuMetricValue.verify|verify} messages. + * @param message BleuMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IBleuMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BleuMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuMetricValue.verify|verify} messages. + * @param message BleuMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IBleuMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BleuMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BleuMetricValue + * @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.BleuMetricValue; + + /** + * Decodes a BleuMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BleuMetricValue + * @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.BleuMetricValue; + + /** + * Verifies a BleuMetricValue 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 BleuMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BleuMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.BleuMetricValue; + + /** + * Creates a plain object from a BleuMetricValue message. Also converts values to other types if specified. + * @param message BleuMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.BleuMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BleuMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BleuMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RougeInput. */ + interface IRougeInput { + + /** RougeInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IRougeSpec|null); + + /** RougeInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IRougeInstance[]|null); + } + + /** Represents a RougeInput. */ + class RougeInput implements IRougeInput { + + /** + * Constructs a new RougeInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRougeInput); + + /** RougeInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IRougeSpec|null); + + /** RougeInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IRougeInstance[]; + + /** + * Creates a new RougeInput instance using the specified properties. + * @param [properties] Properties to set + * @returns RougeInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRougeInput): google.cloud.aiplatform.v1beta1.RougeInput; + + /** + * Encodes the specified RougeInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInput.verify|verify} messages. + * @param message RougeInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRougeInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RougeInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInput.verify|verify} messages. + * @param message RougeInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRougeInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RougeInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RougeInput + * @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.RougeInput; + + /** + * Decodes a RougeInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RougeInput + * @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.RougeInput; + + /** + * Verifies a RougeInput 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 RougeInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RougeInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RougeInput; + + /** + * Creates a plain object from a RougeInput message. Also converts values to other types if specified. + * @param message RougeInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RougeInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RougeInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RougeInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RougeInstance. */ + interface IRougeInstance { + + /** RougeInstance prediction */ + prediction?: (string|null); + + /** RougeInstance reference */ + reference?: (string|null); + } + + /** Represents a RougeInstance. */ + class RougeInstance implements IRougeInstance { + + /** + * Constructs a new RougeInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRougeInstance); + + /** RougeInstance prediction. */ + public prediction?: (string|null); + + /** RougeInstance reference. */ + public reference?: (string|null); + + /** RougeInstance _prediction. */ + public _prediction?: "prediction"; + + /** RougeInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new RougeInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns RougeInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRougeInstance): google.cloud.aiplatform.v1beta1.RougeInstance; + + /** + * Encodes the specified RougeInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInstance.verify|verify} messages. + * @param message RougeInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRougeInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RougeInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInstance.verify|verify} messages. + * @param message RougeInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRougeInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RougeInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RougeInstance + * @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.RougeInstance; + + /** + * Decodes a RougeInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RougeInstance + * @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.RougeInstance; + + /** + * Verifies a RougeInstance 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 RougeInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RougeInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RougeInstance; + + /** + * Creates a plain object from a RougeInstance message. Also converts values to other types if specified. + * @param message RougeInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RougeInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RougeInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RougeInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RougeSpec. */ + interface IRougeSpec { + + /** RougeSpec rougeType */ + rougeType?: (string|null); + + /** RougeSpec useStemmer */ + useStemmer?: (boolean|null); + + /** RougeSpec splitSummaries */ + splitSummaries?: (boolean|null); + } + + /** Represents a RougeSpec. */ + class RougeSpec implements IRougeSpec { + + /** + * Constructs a new RougeSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRougeSpec); + + /** RougeSpec rougeType. */ + public rougeType: string; + + /** RougeSpec useStemmer. */ + public useStemmer: boolean; + + /** RougeSpec splitSummaries. */ + public splitSummaries: boolean; + + /** + * Creates a new RougeSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns RougeSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRougeSpec): google.cloud.aiplatform.v1beta1.RougeSpec; + + /** + * Encodes the specified RougeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeSpec.verify|verify} messages. + * @param message RougeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRougeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RougeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeSpec.verify|verify} messages. + * @param message RougeSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRougeSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RougeSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RougeSpec + * @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.RougeSpec; + + /** + * Decodes a RougeSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RougeSpec + * @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.RougeSpec; + + /** + * Verifies a RougeSpec 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 RougeSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RougeSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RougeSpec; + + /** + * Creates a plain object from a RougeSpec message. Also converts values to other types if specified. + * @param message RougeSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RougeSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RougeSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RougeSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RougeResults. */ + interface IRougeResults { + + /** RougeResults rougeMetricValues */ + rougeMetricValues?: (google.cloud.aiplatform.v1beta1.IRougeMetricValue[]|null); + } + + /** Represents a RougeResults. */ + class RougeResults implements IRougeResults { + + /** + * Constructs a new RougeResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRougeResults); + + /** RougeResults rougeMetricValues. */ + public rougeMetricValues: google.cloud.aiplatform.v1beta1.IRougeMetricValue[]; + + /** + * Creates a new RougeResults instance using the specified properties. + * @param [properties] Properties to set + * @returns RougeResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRougeResults): google.cloud.aiplatform.v1beta1.RougeResults; + + /** + * Encodes the specified RougeResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeResults.verify|verify} messages. + * @param message RougeResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRougeResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RougeResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeResults.verify|verify} messages. + * @param message RougeResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRougeResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RougeResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RougeResults + * @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.RougeResults; + + /** + * Decodes a RougeResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RougeResults + * @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.RougeResults; + + /** + * Verifies a RougeResults 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 RougeResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RougeResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RougeResults; + + /** + * Creates a plain object from a RougeResults message. Also converts values to other types if specified. + * @param message RougeResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RougeResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RougeResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RougeResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RougeMetricValue. */ + interface IRougeMetricValue { + + /** RougeMetricValue score */ + score?: (number|null); + } + + /** Represents a RougeMetricValue. */ + class RougeMetricValue implements IRougeMetricValue { + + /** + * Constructs a new RougeMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRougeMetricValue); + + /** RougeMetricValue score. */ + public score?: (number|null); + + /** RougeMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new RougeMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns RougeMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRougeMetricValue): google.cloud.aiplatform.v1beta1.RougeMetricValue; + + /** + * Encodes the specified RougeMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeMetricValue.verify|verify} messages. + * @param message RougeMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRougeMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RougeMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeMetricValue.verify|verify} messages. + * @param message RougeMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRougeMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RougeMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RougeMetricValue + * @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.RougeMetricValue; + + /** + * Decodes a RougeMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RougeMetricValue + * @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.RougeMetricValue; + + /** + * Verifies a RougeMetricValue 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 RougeMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RougeMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RougeMetricValue; + + /** + * Creates a plain object from a RougeMetricValue message. Also converts values to other types if specified. + * @param message RougeMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RougeMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RougeMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RougeMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CoherenceInput. */ + interface ICoherenceInput { + + /** CoherenceInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.ICoherenceSpec|null); + + /** CoherenceInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.ICoherenceInstance|null); + } + + /** Represents a CoherenceInput. */ + class CoherenceInput implements ICoherenceInput { + + /** + * Constructs a new CoherenceInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICoherenceInput); + + /** CoherenceInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.ICoherenceSpec|null); + + /** CoherenceInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.ICoherenceInstance|null); + + /** + * Creates a new CoherenceInput instance using the specified properties. + * @param [properties] Properties to set + * @returns CoherenceInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICoherenceInput): google.cloud.aiplatform.v1beta1.CoherenceInput; + + /** + * Encodes the specified CoherenceInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInput.verify|verify} messages. + * @param message CoherenceInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICoherenceInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CoherenceInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInput.verify|verify} messages. + * @param message CoherenceInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICoherenceInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CoherenceInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CoherenceInput + * @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.CoherenceInput; + + /** + * Decodes a CoherenceInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CoherenceInput + * @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.CoherenceInput; + + /** + * Verifies a CoherenceInput 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 CoherenceInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CoherenceInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CoherenceInput; + + /** + * Creates a plain object from a CoherenceInput message. Also converts values to other types if specified. + * @param message CoherenceInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CoherenceInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CoherenceInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CoherenceInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CoherenceInstance. */ + interface ICoherenceInstance { + + /** CoherenceInstance prediction */ + prediction?: (string|null); + } + + /** Represents a CoherenceInstance. */ + class CoherenceInstance implements ICoherenceInstance { + + /** + * Constructs a new CoherenceInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICoherenceInstance); + + /** CoherenceInstance prediction. */ + public prediction?: (string|null); + + /** CoherenceInstance _prediction. */ + public _prediction?: "prediction"; + + /** + * Creates a new CoherenceInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns CoherenceInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICoherenceInstance): google.cloud.aiplatform.v1beta1.CoherenceInstance; + + /** + * Encodes the specified CoherenceInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInstance.verify|verify} messages. + * @param message CoherenceInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICoherenceInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CoherenceInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInstance.verify|verify} messages. + * @param message CoherenceInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICoherenceInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CoherenceInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CoherenceInstance + * @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.CoherenceInstance; + + /** + * Decodes a CoherenceInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CoherenceInstance + * @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.CoherenceInstance; + + /** + * Verifies a CoherenceInstance 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 CoherenceInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CoherenceInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CoherenceInstance; + + /** + * Creates a plain object from a CoherenceInstance message. Also converts values to other types if specified. + * @param message CoherenceInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CoherenceInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CoherenceInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CoherenceInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CoherenceSpec. */ + interface ICoherenceSpec { + + /** CoherenceSpec version */ + version?: (number|null); + } + + /** Represents a CoherenceSpec. */ + class CoherenceSpec implements ICoherenceSpec { + + /** + * Constructs a new CoherenceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICoherenceSpec); + + /** CoherenceSpec version. */ + public version: number; + + /** + * Creates a new CoherenceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns CoherenceSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICoherenceSpec): google.cloud.aiplatform.v1beta1.CoherenceSpec; + + /** + * Encodes the specified CoherenceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceSpec.verify|verify} messages. + * @param message CoherenceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICoherenceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CoherenceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceSpec.verify|verify} messages. + * @param message CoherenceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICoherenceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CoherenceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CoherenceSpec + * @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.CoherenceSpec; + + /** + * Decodes a CoherenceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CoherenceSpec + * @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.CoherenceSpec; + + /** + * Verifies a CoherenceSpec 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 CoherenceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CoherenceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CoherenceSpec; + + /** + * Creates a plain object from a CoherenceSpec message. Also converts values to other types if specified. + * @param message CoherenceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CoherenceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CoherenceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CoherenceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CoherenceResult. */ + interface ICoherenceResult { + + /** CoherenceResult score */ + score?: (number|null); + + /** CoherenceResult explanation */ + explanation?: (string|null); + + /** CoherenceResult confidence */ + confidence?: (number|null); + } + + /** Represents a CoherenceResult. */ + class CoherenceResult implements ICoherenceResult { + + /** + * Constructs a new CoherenceResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ICoherenceResult); + + /** CoherenceResult score. */ + public score?: (number|null); + + /** CoherenceResult explanation. */ + public explanation: string; + + /** CoherenceResult confidence. */ + public confidence?: (number|null); + + /** CoherenceResult _score. */ + public _score?: "score"; + + /** CoherenceResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new CoherenceResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CoherenceResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ICoherenceResult): google.cloud.aiplatform.v1beta1.CoherenceResult; + + /** + * Encodes the specified CoherenceResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceResult.verify|verify} messages. + * @param message CoherenceResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ICoherenceResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CoherenceResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceResult.verify|verify} messages. + * @param message CoherenceResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ICoherenceResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CoherenceResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CoherenceResult + * @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.CoherenceResult; + + /** + * Decodes a CoherenceResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CoherenceResult + * @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.CoherenceResult; + + /** + * Verifies a CoherenceResult 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 CoherenceResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CoherenceResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.CoherenceResult; + + /** + * Creates a plain object from a CoherenceResult message. Also converts values to other types if specified. + * @param message CoherenceResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.CoherenceResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CoherenceResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CoherenceResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FluencyInput. */ + interface IFluencyInput { + + /** FluencyInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IFluencySpec|null); + + /** FluencyInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IFluencyInstance|null); + } + + /** Represents a FluencyInput. */ + class FluencyInput implements IFluencyInput { + + /** + * Constructs a new FluencyInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFluencyInput); + + /** FluencyInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IFluencySpec|null); + + /** FluencyInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IFluencyInstance|null); + + /** + * Creates a new FluencyInput instance using the specified properties. + * @param [properties] Properties to set + * @returns FluencyInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFluencyInput): google.cloud.aiplatform.v1beta1.FluencyInput; + + /** + * Encodes the specified FluencyInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInput.verify|verify} messages. + * @param message FluencyInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFluencyInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FluencyInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInput.verify|verify} messages. + * @param message FluencyInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFluencyInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FluencyInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FluencyInput + * @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.FluencyInput; + + /** + * Decodes a FluencyInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FluencyInput + * @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.FluencyInput; + + /** + * Verifies a FluencyInput 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 FluencyInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FluencyInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FluencyInput; + + /** + * Creates a plain object from a FluencyInput message. Also converts values to other types if specified. + * @param message FluencyInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FluencyInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FluencyInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FluencyInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FluencyInstance. */ + interface IFluencyInstance { + + /** FluencyInstance prediction */ + prediction?: (string|null); + } + + /** Represents a FluencyInstance. */ + class FluencyInstance implements IFluencyInstance { + + /** + * Constructs a new FluencyInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFluencyInstance); + + /** FluencyInstance prediction. */ + public prediction?: (string|null); + + /** FluencyInstance _prediction. */ + public _prediction?: "prediction"; + + /** + * Creates a new FluencyInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns FluencyInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFluencyInstance): google.cloud.aiplatform.v1beta1.FluencyInstance; + + /** + * Encodes the specified FluencyInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInstance.verify|verify} messages. + * @param message FluencyInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFluencyInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FluencyInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInstance.verify|verify} messages. + * @param message FluencyInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFluencyInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FluencyInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FluencyInstance + * @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.FluencyInstance; + + /** + * Decodes a FluencyInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FluencyInstance + * @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.FluencyInstance; + + /** + * Verifies a FluencyInstance 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 FluencyInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FluencyInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FluencyInstance; + + /** + * Creates a plain object from a FluencyInstance message. Also converts values to other types if specified. + * @param message FluencyInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FluencyInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FluencyInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FluencyInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FluencySpec. */ + interface IFluencySpec { + + /** FluencySpec version */ + version?: (number|null); + } + + /** Represents a FluencySpec. */ + class FluencySpec implements IFluencySpec { + + /** + * Constructs a new FluencySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFluencySpec); + + /** FluencySpec version. */ + public version: number; + + /** + * Creates a new FluencySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns FluencySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFluencySpec): google.cloud.aiplatform.v1beta1.FluencySpec; + + /** + * Encodes the specified FluencySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencySpec.verify|verify} messages. + * @param message FluencySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFluencySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FluencySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencySpec.verify|verify} messages. + * @param message FluencySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFluencySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FluencySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FluencySpec + * @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.FluencySpec; + + /** + * Decodes a FluencySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FluencySpec + * @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.FluencySpec; + + /** + * Verifies a FluencySpec 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 FluencySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FluencySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FluencySpec; + + /** + * Creates a plain object from a FluencySpec message. Also converts values to other types if specified. + * @param message FluencySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FluencySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FluencySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FluencySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FluencyResult. */ + interface IFluencyResult { + + /** FluencyResult score */ + score?: (number|null); + + /** FluencyResult explanation */ + explanation?: (string|null); + + /** FluencyResult confidence */ + confidence?: (number|null); + } + + /** Represents a FluencyResult. */ + class FluencyResult implements IFluencyResult { + + /** + * Constructs a new FluencyResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFluencyResult); + + /** FluencyResult score. */ + public score?: (number|null); + + /** FluencyResult explanation. */ + public explanation: string; + + /** FluencyResult confidence. */ + public confidence?: (number|null); + + /** FluencyResult _score. */ + public _score?: "score"; + + /** FluencyResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new FluencyResult instance using the specified properties. + * @param [properties] Properties to set + * @returns FluencyResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFluencyResult): google.cloud.aiplatform.v1beta1.FluencyResult; + + /** + * Encodes the specified FluencyResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyResult.verify|verify} messages. + * @param message FluencyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFluencyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FluencyResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyResult.verify|verify} messages. + * @param message FluencyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFluencyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FluencyResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FluencyResult + * @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.FluencyResult; + + /** + * Decodes a FluencyResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FluencyResult + * @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.FluencyResult; + + /** + * Verifies a FluencyResult 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 FluencyResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FluencyResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FluencyResult; + + /** + * Creates a plain object from a FluencyResult message. Also converts values to other types if specified. + * @param message FluencyResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FluencyResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FluencyResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FluencyResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SafetyInput. */ + interface ISafetyInput { + + /** SafetyInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.ISafetySpec|null); + + /** SafetyInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.ISafetyInstance|null); + } + + /** Represents a SafetyInput. */ + class SafetyInput implements ISafetyInput { + + /** + * Constructs a new SafetyInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISafetyInput); + + /** SafetyInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.ISafetySpec|null); + + /** SafetyInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.ISafetyInstance|null); + + /** + * Creates a new SafetyInput instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetyInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISafetyInput): google.cloud.aiplatform.v1beta1.SafetyInput; + + /** + * Encodes the specified SafetyInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInput.verify|verify} messages. + * @param message SafetyInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISafetyInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetyInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInput.verify|verify} messages. + * @param message SafetyInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISafetyInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetyInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetyInput + * @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.SafetyInput; + + /** + * Decodes a SafetyInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetyInput + * @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.SafetyInput; + + /** + * Verifies a SafetyInput 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 SafetyInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetyInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SafetyInput; + + /** + * Creates a plain object from a SafetyInput message. Also converts values to other types if specified. + * @param message SafetyInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SafetyInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetyInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetyInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SafetyInstance. */ + interface ISafetyInstance { + + /** SafetyInstance prediction */ + prediction?: (string|null); + } + + /** Represents a SafetyInstance. */ + class SafetyInstance implements ISafetyInstance { + + /** + * Constructs a new SafetyInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISafetyInstance); + + /** SafetyInstance prediction. */ + public prediction?: (string|null); + + /** SafetyInstance _prediction. */ + public _prediction?: "prediction"; + + /** + * Creates a new SafetyInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetyInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISafetyInstance): google.cloud.aiplatform.v1beta1.SafetyInstance; + + /** + * Encodes the specified SafetyInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInstance.verify|verify} messages. + * @param message SafetyInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISafetyInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetyInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInstance.verify|verify} messages. + * @param message SafetyInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISafetyInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetyInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetyInstance + * @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.SafetyInstance; + + /** + * Decodes a SafetyInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetyInstance + * @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.SafetyInstance; + + /** + * Verifies a SafetyInstance 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 SafetyInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetyInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SafetyInstance; + + /** + * Creates a plain object from a SafetyInstance message. Also converts values to other types if specified. + * @param message SafetyInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SafetyInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetyInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetyInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SafetySpec. */ + interface ISafetySpec { + + /** SafetySpec version */ + version?: (number|null); + } + + /** Represents a SafetySpec. */ + class SafetySpec implements ISafetySpec { + + /** + * Constructs a new SafetySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISafetySpec); + + /** SafetySpec version. */ + public version: number; + + /** + * Creates a new SafetySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISafetySpec): google.cloud.aiplatform.v1beta1.SafetySpec; + + /** + * Encodes the specified SafetySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetySpec.verify|verify} messages. + * @param message SafetySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISafetySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetySpec.verify|verify} messages. + * @param message SafetySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISafetySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetySpec + * @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.SafetySpec; + + /** + * Decodes a SafetySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetySpec + * @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.SafetySpec; + + /** + * Verifies a SafetySpec 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 SafetySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SafetySpec; + + /** + * Creates a plain object from a SafetySpec message. Also converts values to other types if specified. + * @param message SafetySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SafetySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SafetyResult. */ + interface ISafetyResult { + + /** SafetyResult score */ + score?: (number|null); + + /** SafetyResult explanation */ + explanation?: (string|null); + + /** SafetyResult confidence */ + confidence?: (number|null); + } + + /** Represents a SafetyResult. */ + class SafetyResult implements ISafetyResult { + + /** + * Constructs a new SafetyResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISafetyResult); + + /** SafetyResult score. */ + public score?: (number|null); + + /** SafetyResult explanation. */ + public explanation: string; + + /** SafetyResult confidence. */ + public confidence?: (number|null); + + /** SafetyResult _score. */ + public _score?: "score"; + + /** SafetyResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new SafetyResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SafetyResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISafetyResult): google.cloud.aiplatform.v1beta1.SafetyResult; + + /** + * Encodes the specified SafetyResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyResult.verify|verify} messages. + * @param message SafetyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISafetyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SafetyResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyResult.verify|verify} messages. + * @param message SafetyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISafetyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SafetyResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SafetyResult + * @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.SafetyResult; + + /** + * Decodes a SafetyResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SafetyResult + * @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.SafetyResult; + + /** + * Verifies a SafetyResult 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 SafetyResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SafetyResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SafetyResult; + + /** + * Creates a plain object from a SafetyResult message. Also converts values to other types if specified. + * @param message SafetyResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SafetyResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SafetyResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SafetyResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroundednessInput. */ + interface IGroundednessInput { + + /** GroundednessInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IGroundednessSpec|null); + + /** GroundednessInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IGroundednessInstance|null); + } + + /** Represents a GroundednessInput. */ + class GroundednessInput implements IGroundednessInput { + + /** + * Constructs a new GroundednessInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGroundednessInput); + + /** GroundednessInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IGroundednessSpec|null); + + /** GroundednessInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IGroundednessInstance|null); + + /** + * Creates a new GroundednessInput instance using the specified properties. + * @param [properties] Properties to set + * @returns GroundednessInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGroundednessInput): google.cloud.aiplatform.v1beta1.GroundednessInput; + + /** + * Encodes the specified GroundednessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInput.verify|verify} messages. + * @param message GroundednessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGroundednessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroundednessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInput.verify|verify} messages. + * @param message GroundednessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGroundednessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroundednessInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroundednessInput + * @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.GroundednessInput; + + /** + * Decodes a GroundednessInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroundednessInput + * @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.GroundednessInput; + + /** + * Verifies a GroundednessInput 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 GroundednessInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroundednessInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GroundednessInput; + + /** + * Creates a plain object from a GroundednessInput message. Also converts values to other types if specified. + * @param message GroundednessInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GroundednessInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroundednessInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroundednessInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroundednessInstance. */ + interface IGroundednessInstance { + + /** GroundednessInstance prediction */ + prediction?: (string|null); + + /** GroundednessInstance context */ + context?: (string|null); + } + + /** Represents a GroundednessInstance. */ + class GroundednessInstance implements IGroundednessInstance { + + /** + * Constructs a new GroundednessInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGroundednessInstance); + + /** GroundednessInstance prediction. */ + public prediction?: (string|null); + + /** GroundednessInstance context. */ + public context?: (string|null); + + /** GroundednessInstance _prediction. */ + public _prediction?: "prediction"; + + /** GroundednessInstance _context. */ + public _context?: "context"; + + /** + * Creates a new GroundednessInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns GroundednessInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGroundednessInstance): google.cloud.aiplatform.v1beta1.GroundednessInstance; + + /** + * Encodes the specified GroundednessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInstance.verify|verify} messages. + * @param message GroundednessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGroundednessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroundednessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInstance.verify|verify} messages. + * @param message GroundednessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGroundednessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroundednessInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroundednessInstance + * @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.GroundednessInstance; + + /** + * Decodes a GroundednessInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroundednessInstance + * @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.GroundednessInstance; + + /** + * Verifies a GroundednessInstance 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 GroundednessInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroundednessInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GroundednessInstance; + + /** + * Creates a plain object from a GroundednessInstance message. Also converts values to other types if specified. + * @param message GroundednessInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GroundednessInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroundednessInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroundednessInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroundednessSpec. */ + interface IGroundednessSpec { + + /** GroundednessSpec version */ + version?: (number|null); + } + + /** Represents a GroundednessSpec. */ + class GroundednessSpec implements IGroundednessSpec { + + /** + * Constructs a new GroundednessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGroundednessSpec); + + /** GroundednessSpec version. */ + public version: number; + + /** + * Creates a new GroundednessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns GroundednessSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGroundednessSpec): google.cloud.aiplatform.v1beta1.GroundednessSpec; + + /** + * Encodes the specified GroundednessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessSpec.verify|verify} messages. + * @param message GroundednessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGroundednessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroundednessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessSpec.verify|verify} messages. + * @param message GroundednessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGroundednessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroundednessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroundednessSpec + * @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.GroundednessSpec; + + /** + * Decodes a GroundednessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroundednessSpec + * @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.GroundednessSpec; + + /** + * Verifies a GroundednessSpec 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 GroundednessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroundednessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GroundednessSpec; + + /** + * Creates a plain object from a GroundednessSpec message. Also converts values to other types if specified. + * @param message GroundednessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GroundednessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroundednessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroundednessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GroundednessResult. */ + interface IGroundednessResult { + + /** GroundednessResult score */ + score?: (number|null); + + /** GroundednessResult explanation */ + explanation?: (string|null); + + /** GroundednessResult confidence */ + confidence?: (number|null); + } + + /** Represents a GroundednessResult. */ + class GroundednessResult implements IGroundednessResult { + + /** + * Constructs a new GroundednessResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IGroundednessResult); + + /** GroundednessResult score. */ + public score?: (number|null); + + /** GroundednessResult explanation. */ + public explanation: string; + + /** GroundednessResult confidence. */ + public confidence?: (number|null); + + /** GroundednessResult _score. */ + public _score?: "score"; + + /** GroundednessResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new GroundednessResult instance using the specified properties. + * @param [properties] Properties to set + * @returns GroundednessResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IGroundednessResult): google.cloud.aiplatform.v1beta1.GroundednessResult; + + /** + * Encodes the specified GroundednessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessResult.verify|verify} messages. + * @param message GroundednessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IGroundednessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GroundednessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessResult.verify|verify} messages. + * @param message GroundednessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IGroundednessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GroundednessResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GroundednessResult + * @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.GroundednessResult; + + /** + * Decodes a GroundednessResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GroundednessResult + * @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.GroundednessResult; + + /** + * Verifies a GroundednessResult 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 GroundednessResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GroundednessResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.GroundednessResult; + + /** + * Creates a plain object from a GroundednessResult message. Also converts values to other types if specified. + * @param message GroundednessResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.GroundednessResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GroundednessResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GroundednessResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FulfillmentInput. */ + interface IFulfillmentInput { + + /** FulfillmentInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IFulfillmentSpec|null); + + /** FulfillmentInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IFulfillmentInstance|null); + } + + /** Represents a FulfillmentInput. */ + class FulfillmentInput implements IFulfillmentInput { + + /** + * Constructs a new FulfillmentInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentInput); + + /** FulfillmentInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IFulfillmentSpec|null); + + /** FulfillmentInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IFulfillmentInstance|null); + + /** + * Creates a new FulfillmentInput instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentInput): google.cloud.aiplatform.v1beta1.FulfillmentInput; + + /** + * Encodes the specified FulfillmentInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInput.verify|verify} messages. + * @param message FulfillmentInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFulfillmentInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FulfillmentInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInput.verify|verify} messages. + * @param message FulfillmentInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFulfillmentInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FulfillmentInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentInput + * @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.FulfillmentInput; + + /** + * Decodes a FulfillmentInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentInput + * @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.FulfillmentInput; + + /** + * Verifies a FulfillmentInput 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 FulfillmentInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FulfillmentInput; + + /** + * Creates a plain object from a FulfillmentInput message. Also converts values to other types if specified. + * @param message FulfillmentInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FulfillmentInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FulfillmentInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FulfillmentInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FulfillmentInstance. */ + interface IFulfillmentInstance { + + /** FulfillmentInstance prediction */ + prediction?: (string|null); + + /** FulfillmentInstance instruction */ + instruction?: (string|null); + } + + /** Represents a FulfillmentInstance. */ + class FulfillmentInstance implements IFulfillmentInstance { + + /** + * Constructs a new FulfillmentInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentInstance); + + /** FulfillmentInstance prediction. */ + public prediction?: (string|null); + + /** FulfillmentInstance instruction. */ + public instruction?: (string|null); + + /** FulfillmentInstance _prediction. */ + public _prediction?: "prediction"; + + /** FulfillmentInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new FulfillmentInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentInstance): google.cloud.aiplatform.v1beta1.FulfillmentInstance; + + /** + * Encodes the specified FulfillmentInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInstance.verify|verify} messages. + * @param message FulfillmentInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFulfillmentInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FulfillmentInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInstance.verify|verify} messages. + * @param message FulfillmentInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFulfillmentInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FulfillmentInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentInstance + * @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.FulfillmentInstance; + + /** + * Decodes a FulfillmentInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentInstance + * @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.FulfillmentInstance; + + /** + * Verifies a FulfillmentInstance 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 FulfillmentInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FulfillmentInstance; + + /** + * Creates a plain object from a FulfillmentInstance message. Also converts values to other types if specified. + * @param message FulfillmentInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FulfillmentInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FulfillmentInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FulfillmentInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FulfillmentSpec. */ + interface IFulfillmentSpec { + + /** FulfillmentSpec version */ + version?: (number|null); + } + + /** Represents a FulfillmentSpec. */ + class FulfillmentSpec implements IFulfillmentSpec { + + /** + * Constructs a new FulfillmentSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentSpec); + + /** FulfillmentSpec version. */ + public version: number; + + /** + * Creates a new FulfillmentSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentSpec): google.cloud.aiplatform.v1beta1.FulfillmentSpec; + + /** + * Encodes the specified FulfillmentSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentSpec.verify|verify} messages. + * @param message FulfillmentSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFulfillmentSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FulfillmentSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentSpec.verify|verify} messages. + * @param message FulfillmentSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFulfillmentSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FulfillmentSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentSpec + * @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.FulfillmentSpec; + + /** + * Decodes a FulfillmentSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentSpec + * @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.FulfillmentSpec; + + /** + * Verifies a FulfillmentSpec 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 FulfillmentSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FulfillmentSpec; + + /** + * Creates a plain object from a FulfillmentSpec message. Also converts values to other types if specified. + * @param message FulfillmentSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FulfillmentSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FulfillmentSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FulfillmentSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FulfillmentResult. */ + interface IFulfillmentResult { + + /** FulfillmentResult score */ + score?: (number|null); + + /** FulfillmentResult explanation */ + explanation?: (string|null); + + /** FulfillmentResult confidence */ + confidence?: (number|null); + } + + /** Represents a FulfillmentResult. */ + class FulfillmentResult implements IFulfillmentResult { + + /** + * Constructs a new FulfillmentResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentResult); + + /** FulfillmentResult score. */ + public score?: (number|null); + + /** FulfillmentResult explanation. */ + public explanation: string; + + /** FulfillmentResult confidence. */ + public confidence?: (number|null); + + /** FulfillmentResult _score. */ + public _score?: "score"; + + /** FulfillmentResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new FulfillmentResult instance using the specified properties. + * @param [properties] Properties to set + * @returns FulfillmentResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFulfillmentResult): google.cloud.aiplatform.v1beta1.FulfillmentResult; + + /** + * Encodes the specified FulfillmentResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentResult.verify|verify} messages. + * @param message FulfillmentResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFulfillmentResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FulfillmentResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentResult.verify|verify} messages. + * @param message FulfillmentResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFulfillmentResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FulfillmentResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FulfillmentResult + * @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.FulfillmentResult; + + /** + * Decodes a FulfillmentResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FulfillmentResult + * @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.FulfillmentResult; + + /** + * Verifies a FulfillmentResult 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 FulfillmentResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FulfillmentResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FulfillmentResult; + + /** + * Creates a plain object from a FulfillmentResult message. Also converts values to other types if specified. + * @param message FulfillmentResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FulfillmentResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FulfillmentResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FulfillmentResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseRecallInput. */ + interface IResponseRecallInput { + + /** ResponseRecallInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IResponseRecallSpec|null); + + /** ResponseRecallInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IResponseRecallInstance|null); + } + + /** Represents a ResponseRecallInput. */ + class ResponseRecallInput implements IResponseRecallInput { + + /** + * Constructs a new ResponseRecallInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallInput); + + /** ResponseRecallInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IResponseRecallSpec|null); + + /** ResponseRecallInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IResponseRecallInstance|null); + + /** + * Creates a new ResponseRecallInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseRecallInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallInput): google.cloud.aiplatform.v1beta1.ResponseRecallInput; + + /** + * Encodes the specified ResponseRecallInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInput.verify|verify} messages. + * @param message ResponseRecallInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResponseRecallInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseRecallInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInput.verify|verify} messages. + * @param message ResponseRecallInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResponseRecallInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseRecallInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseRecallInput + * @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.ResponseRecallInput; + + /** + * Decodes a ResponseRecallInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseRecallInput + * @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.ResponseRecallInput; + + /** + * Verifies a ResponseRecallInput 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 ResponseRecallInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseRecallInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResponseRecallInput; + + /** + * Creates a plain object from a ResponseRecallInput message. Also converts values to other types if specified. + * @param message ResponseRecallInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResponseRecallInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseRecallInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseRecallInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseRecallInstance. */ + interface IResponseRecallInstance { + + /** ResponseRecallInstance prediction */ + prediction?: (string|null); + + /** ResponseRecallInstance reference */ + reference?: (string|null); + } + + /** Represents a ResponseRecallInstance. */ + class ResponseRecallInstance implements IResponseRecallInstance { + + /** + * Constructs a new ResponseRecallInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallInstance); + + /** ResponseRecallInstance prediction. */ + public prediction?: (string|null); + + /** ResponseRecallInstance reference. */ + public reference?: (string|null); + + /** ResponseRecallInstance _prediction. */ + public _prediction?: "prediction"; + + /** ResponseRecallInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ResponseRecallInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseRecallInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallInstance): google.cloud.aiplatform.v1beta1.ResponseRecallInstance; + + /** + * Encodes the specified ResponseRecallInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInstance.verify|verify} messages. + * @param message ResponseRecallInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResponseRecallInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseRecallInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInstance.verify|verify} messages. + * @param message ResponseRecallInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResponseRecallInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseRecallInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseRecallInstance + * @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.ResponseRecallInstance; + + /** + * Decodes a ResponseRecallInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseRecallInstance + * @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.ResponseRecallInstance; + + /** + * Verifies a ResponseRecallInstance 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 ResponseRecallInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseRecallInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResponseRecallInstance; + + /** + * Creates a plain object from a ResponseRecallInstance message. Also converts values to other types if specified. + * @param message ResponseRecallInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResponseRecallInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseRecallInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseRecallInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseRecallSpec. */ + interface IResponseRecallSpec { + + /** ResponseRecallSpec version */ + version?: (number|null); + } + + /** Represents a ResponseRecallSpec. */ + class ResponseRecallSpec implements IResponseRecallSpec { + + /** + * Constructs a new ResponseRecallSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallSpec); + + /** ResponseRecallSpec version. */ + public version: number; + + /** + * Creates a new ResponseRecallSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseRecallSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallSpec): google.cloud.aiplatform.v1beta1.ResponseRecallSpec; + + /** + * Encodes the specified ResponseRecallSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallSpec.verify|verify} messages. + * @param message ResponseRecallSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResponseRecallSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseRecallSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallSpec.verify|verify} messages. + * @param message ResponseRecallSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResponseRecallSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseRecallSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseRecallSpec + * @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.ResponseRecallSpec; + + /** + * Decodes a ResponseRecallSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseRecallSpec + * @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.ResponseRecallSpec; + + /** + * Verifies a ResponseRecallSpec 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 ResponseRecallSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseRecallSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResponseRecallSpec; + + /** + * Creates a plain object from a ResponseRecallSpec message. Also converts values to other types if specified. + * @param message ResponseRecallSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResponseRecallSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseRecallSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseRecallSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResponseRecallResult. */ + interface IResponseRecallResult { + + /** ResponseRecallResult score */ + score?: (number|null); + + /** ResponseRecallResult explanation */ + explanation?: (string|null); + + /** ResponseRecallResult confidence */ + confidence?: (number|null); + } + + /** Represents a ResponseRecallResult. */ + class ResponseRecallResult implements IResponseRecallResult { + + /** + * Constructs a new ResponseRecallResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallResult); + + /** ResponseRecallResult score. */ + public score?: (number|null); + + /** ResponseRecallResult explanation. */ + public explanation: string; + + /** ResponseRecallResult confidence. */ + public confidence?: (number|null); + + /** ResponseRecallResult _score. */ + public _score?: "score"; + + /** ResponseRecallResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new ResponseRecallResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ResponseRecallResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IResponseRecallResult): google.cloud.aiplatform.v1beta1.ResponseRecallResult; + + /** + * Encodes the specified ResponseRecallResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallResult.verify|verify} messages. + * @param message ResponseRecallResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IResponseRecallResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseRecallResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallResult.verify|verify} messages. + * @param message ResponseRecallResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IResponseRecallResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseRecallResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResponseRecallResult + * @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.ResponseRecallResult; + + /** + * Decodes a ResponseRecallResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResponseRecallResult + * @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.ResponseRecallResult; + + /** + * Verifies a ResponseRecallResult 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 ResponseRecallResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseRecallResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ResponseRecallResult; + + /** + * Creates a plain object from a ResponseRecallResult message. Also converts values to other types if specified. + * @param message ResponseRecallResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ResponseRecallResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseRecallResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResponseRecallResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationQualityInput. */ + interface ISummarizationQualityInput { + + /** SummarizationQualityInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec|null); + + /** SummarizationQualityInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance|null); + } + + /** Represents a SummarizationQualityInput. */ + class SummarizationQualityInput implements ISummarizationQualityInput { + + /** + * Constructs a new SummarizationQualityInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityInput); + + /** SummarizationQualityInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec|null); + + /** SummarizationQualityInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance|null); + + /** + * Creates a new SummarizationQualityInput instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationQualityInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityInput): google.cloud.aiplatform.v1beta1.SummarizationQualityInput; + + /** + * Encodes the specified SummarizationQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInput.verify|verify} messages. + * @param message SummarizationQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInput.verify|verify} messages. + * @param message SummarizationQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationQualityInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationQualityInput + * @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.SummarizationQualityInput; + + /** + * Decodes a SummarizationQualityInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationQualityInput + * @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.SummarizationQualityInput; + + /** + * Verifies a SummarizationQualityInput 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 SummarizationQualityInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationQualityInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationQualityInput; + + /** + * Creates a plain object from a SummarizationQualityInput message. Also converts values to other types if specified. + * @param message SummarizationQualityInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationQualityInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationQualityInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationQualityInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationQualityInstance. */ + interface ISummarizationQualityInstance { + + /** SummarizationQualityInstance prediction */ + prediction?: (string|null); + + /** SummarizationQualityInstance reference */ + reference?: (string|null); + + /** SummarizationQualityInstance context */ + context?: (string|null); + + /** SummarizationQualityInstance instruction */ + instruction?: (string|null); + } + + /** Represents a SummarizationQualityInstance. */ + class SummarizationQualityInstance implements ISummarizationQualityInstance { + + /** + * Constructs a new SummarizationQualityInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance); + + /** SummarizationQualityInstance prediction. */ + public prediction?: (string|null); + + /** SummarizationQualityInstance reference. */ + public reference?: (string|null); + + /** SummarizationQualityInstance context. */ + public context?: (string|null); + + /** SummarizationQualityInstance instruction. */ + public instruction?: (string|null); + + /** SummarizationQualityInstance _prediction. */ + public _prediction?: "prediction"; + + /** SummarizationQualityInstance _reference. */ + public _reference?: "reference"; + + /** SummarizationQualityInstance _context. */ + public _context?: "context"; + + /** SummarizationQualityInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new SummarizationQualityInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationQualityInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance): google.cloud.aiplatform.v1beta1.SummarizationQualityInstance; + + /** + * Encodes the specified SummarizationQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.verify|verify} messages. + * @param message SummarizationQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.verify|verify} messages. + * @param message SummarizationQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationQualityInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationQualityInstance + * @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.SummarizationQualityInstance; + + /** + * Decodes a SummarizationQualityInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationQualityInstance + * @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.SummarizationQualityInstance; + + /** + * Verifies a SummarizationQualityInstance 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 SummarizationQualityInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationQualityInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationQualityInstance; + + /** + * Creates a plain object from a SummarizationQualityInstance message. Also converts values to other types if specified. + * @param message SummarizationQualityInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationQualityInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationQualityInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationQualityInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationQualitySpec. */ + interface ISummarizationQualitySpec { + + /** SummarizationQualitySpec useReference */ + useReference?: (boolean|null); + + /** SummarizationQualitySpec version */ + version?: (number|null); + } + + /** Represents a SummarizationQualitySpec. */ + class SummarizationQualitySpec implements ISummarizationQualitySpec { + + /** + * Constructs a new SummarizationQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec); + + /** SummarizationQualitySpec useReference. */ + public useReference: boolean; + + /** SummarizationQualitySpec version. */ + public version: number; + + /** + * Creates a new SummarizationQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationQualitySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec): google.cloud.aiplatform.v1beta1.SummarizationQualitySpec; + + /** + * Encodes the specified SummarizationQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.verify|verify} messages. + * @param message SummarizationQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.verify|verify} messages. + * @param message SummarizationQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationQualitySpec + * @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.SummarizationQualitySpec; + + /** + * Decodes a SummarizationQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationQualitySpec + * @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.SummarizationQualitySpec; + + /** + * Verifies a SummarizationQualitySpec 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 SummarizationQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationQualitySpec; + + /** + * Creates a plain object from a SummarizationQualitySpec message. Also converts values to other types if specified. + * @param message SummarizationQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationQualityResult. */ + interface ISummarizationQualityResult { + + /** SummarizationQualityResult score */ + score?: (number|null); + + /** SummarizationQualityResult explanation */ + explanation?: (string|null); + + /** SummarizationQualityResult confidence */ + confidence?: (number|null); + } + + /** Represents a SummarizationQualityResult. */ + class SummarizationQualityResult implements ISummarizationQualityResult { + + /** + * Constructs a new SummarizationQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityResult); + + /** SummarizationQualityResult score. */ + public score?: (number|null); + + /** SummarizationQualityResult explanation. */ + public explanation: string; + + /** SummarizationQualityResult confidence. */ + public confidence?: (number|null); + + /** SummarizationQualityResult _score. */ + public _score?: "score"; + + /** SummarizationQualityResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new SummarizationQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationQualityResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationQualityResult): google.cloud.aiplatform.v1beta1.SummarizationQualityResult; + + /** + * Encodes the specified SummarizationQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityResult.verify|verify} messages. + * @param message SummarizationQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityResult.verify|verify} messages. + * @param message SummarizationQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationQualityResult + * @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.SummarizationQualityResult; + + /** + * Decodes a SummarizationQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationQualityResult + * @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.SummarizationQualityResult; + + /** + * Verifies a SummarizationQualityResult 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 SummarizationQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationQualityResult; + + /** + * Creates a plain object from a SummarizationQualityResult message. Also converts values to other types if specified. + * @param message SummarizationQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseSummarizationQualityInput. */ + interface IPairwiseSummarizationQualityInput { + + /** PairwiseSummarizationQualityInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec|null); + + /** PairwiseSummarizationQualityInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance|null); + } + + /** Represents a PairwiseSummarizationQualityInput. */ + class PairwiseSummarizationQualityInput implements IPairwiseSummarizationQualityInput { + + /** + * Constructs a new PairwiseSummarizationQualityInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput); + + /** PairwiseSummarizationQualityInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec|null); + + /** PairwiseSummarizationQualityInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance|null); + + /** + * Creates a new PairwiseSummarizationQualityInput instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseSummarizationQualityInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput; + + /** + * Encodes the specified PairwiseSummarizationQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.verify|verify} messages. + * @param message PairwiseSummarizationQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseSummarizationQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.verify|verify} messages. + * @param message PairwiseSummarizationQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseSummarizationQualityInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseSummarizationQualityInput + * @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.PairwiseSummarizationQualityInput; + + /** + * Decodes a PairwiseSummarizationQualityInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseSummarizationQualityInput + * @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.PairwiseSummarizationQualityInput; + + /** + * Verifies a PairwiseSummarizationQualityInput 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 PairwiseSummarizationQualityInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseSummarizationQualityInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput; + + /** + * Creates a plain object from a PairwiseSummarizationQualityInput message. Also converts values to other types if specified. + * @param message PairwiseSummarizationQualityInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseSummarizationQualityInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseSummarizationQualityInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseSummarizationQualityInstance. */ + interface IPairwiseSummarizationQualityInstance { + + /** PairwiseSummarizationQualityInstance prediction */ + prediction?: (string|null); + + /** PairwiseSummarizationQualityInstance baselinePrediction */ + baselinePrediction?: (string|null); + + /** PairwiseSummarizationQualityInstance reference */ + reference?: (string|null); + + /** PairwiseSummarizationQualityInstance context */ + context?: (string|null); + + /** PairwiseSummarizationQualityInstance instruction */ + instruction?: (string|null); + } + + /** Represents a PairwiseSummarizationQualityInstance. */ + class PairwiseSummarizationQualityInstance implements IPairwiseSummarizationQualityInstance { + + /** + * Constructs a new PairwiseSummarizationQualityInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance); + + /** PairwiseSummarizationQualityInstance prediction. */ + public prediction?: (string|null); + + /** PairwiseSummarizationQualityInstance baselinePrediction. */ + public baselinePrediction?: (string|null); + + /** PairwiseSummarizationQualityInstance reference. */ + public reference?: (string|null); + + /** PairwiseSummarizationQualityInstance context. */ + public context?: (string|null); + + /** PairwiseSummarizationQualityInstance instruction. */ + public instruction?: (string|null); + + /** PairwiseSummarizationQualityInstance _prediction. */ + public _prediction?: "prediction"; + + /** PairwiseSummarizationQualityInstance _baselinePrediction. */ + public _baselinePrediction?: "baselinePrediction"; + + /** PairwiseSummarizationQualityInstance _reference. */ + public _reference?: "reference"; + + /** PairwiseSummarizationQualityInstance _context. */ + public _context?: "context"; + + /** PairwiseSummarizationQualityInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new PairwiseSummarizationQualityInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseSummarizationQualityInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance; + + /** + * Encodes the specified PairwiseSummarizationQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.verify|verify} messages. + * @param message PairwiseSummarizationQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseSummarizationQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.verify|verify} messages. + * @param message PairwiseSummarizationQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseSummarizationQualityInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseSummarizationQualityInstance + * @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.PairwiseSummarizationQualityInstance; + + /** + * Decodes a PairwiseSummarizationQualityInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseSummarizationQualityInstance + * @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.PairwiseSummarizationQualityInstance; + + /** + * Verifies a PairwiseSummarizationQualityInstance 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 PairwiseSummarizationQualityInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseSummarizationQualityInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance; + + /** + * Creates a plain object from a PairwiseSummarizationQualityInstance message. Also converts values to other types if specified. + * @param message PairwiseSummarizationQualityInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseSummarizationQualityInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseSummarizationQualityInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseSummarizationQualitySpec. */ + interface IPairwiseSummarizationQualitySpec { + + /** PairwiseSummarizationQualitySpec useReference */ + useReference?: (boolean|null); + + /** PairwiseSummarizationQualitySpec version */ + version?: (number|null); + } + + /** Represents a PairwiseSummarizationQualitySpec. */ + class PairwiseSummarizationQualitySpec implements IPairwiseSummarizationQualitySpec { + + /** + * Constructs a new PairwiseSummarizationQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec); + + /** PairwiseSummarizationQualitySpec useReference. */ + public useReference: boolean; + + /** PairwiseSummarizationQualitySpec version. */ + public version: number; + + /** + * Creates a new PairwiseSummarizationQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseSummarizationQualitySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec; + + /** + * Encodes the specified PairwiseSummarizationQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.verify|verify} messages. + * @param message PairwiseSummarizationQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseSummarizationQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.verify|verify} messages. + * @param message PairwiseSummarizationQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseSummarizationQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseSummarizationQualitySpec + * @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.PairwiseSummarizationQualitySpec; + + /** + * Decodes a PairwiseSummarizationQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseSummarizationQualitySpec + * @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.PairwiseSummarizationQualitySpec; + + /** + * Verifies a PairwiseSummarizationQualitySpec 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 PairwiseSummarizationQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseSummarizationQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec; + + /** + * Creates a plain object from a PairwiseSummarizationQualitySpec message. Also converts values to other types if specified. + * @param message PairwiseSummarizationQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseSummarizationQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseSummarizationQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseSummarizationQualityResult. */ + interface IPairwiseSummarizationQualityResult { + + /** PairwiseSummarizationQualityResult pairwiseChoice */ + pairwiseChoice?: (google.cloud.aiplatform.v1beta1.PairwiseChoice|keyof typeof google.cloud.aiplatform.v1beta1.PairwiseChoice|null); + + /** PairwiseSummarizationQualityResult explanation */ + explanation?: (string|null); + + /** PairwiseSummarizationQualityResult confidence */ + confidence?: (number|null); + } + + /** Represents a PairwiseSummarizationQualityResult. */ + class PairwiseSummarizationQualityResult implements IPairwiseSummarizationQualityResult { + + /** + * Constructs a new PairwiseSummarizationQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult); + + /** PairwiseSummarizationQualityResult pairwiseChoice. */ + public pairwiseChoice: (google.cloud.aiplatform.v1beta1.PairwiseChoice|keyof typeof google.cloud.aiplatform.v1beta1.PairwiseChoice); + + /** PairwiseSummarizationQualityResult explanation. */ + public explanation: string; + + /** PairwiseSummarizationQualityResult confidence. */ + public confidence?: (number|null); + + /** PairwiseSummarizationQualityResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new PairwiseSummarizationQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseSummarizationQualityResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult; + + /** + * Encodes the specified PairwiseSummarizationQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.verify|verify} messages. + * @param message PairwiseSummarizationQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseSummarizationQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.verify|verify} messages. + * @param message PairwiseSummarizationQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseSummarizationQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseSummarizationQualityResult + * @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.PairwiseSummarizationQualityResult; + + /** + * Decodes a PairwiseSummarizationQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseSummarizationQualityResult + * @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.PairwiseSummarizationQualityResult; + + /** + * Verifies a PairwiseSummarizationQualityResult 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 PairwiseSummarizationQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseSummarizationQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult; + + /** + * Creates a plain object from a PairwiseSummarizationQualityResult message. Also converts values to other types if specified. + * @param message PairwiseSummarizationQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseSummarizationQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseSummarizationQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationHelpfulnessInput. */ + interface ISummarizationHelpfulnessInput { + + /** SummarizationHelpfulnessInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec|null); + + /** SummarizationHelpfulnessInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance|null); + } + + /** Represents a SummarizationHelpfulnessInput. */ + class SummarizationHelpfulnessInput implements ISummarizationHelpfulnessInput { + + /** + * Constructs a new SummarizationHelpfulnessInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput); + + /** SummarizationHelpfulnessInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec|null); + + /** SummarizationHelpfulnessInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance|null); + + /** + * Creates a new SummarizationHelpfulnessInput instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationHelpfulnessInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput; + + /** + * Encodes the specified SummarizationHelpfulnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.verify|verify} messages. + * @param message SummarizationHelpfulnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationHelpfulnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.verify|verify} messages. + * @param message SummarizationHelpfulnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationHelpfulnessInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationHelpfulnessInput + * @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.SummarizationHelpfulnessInput; + + /** + * Decodes a SummarizationHelpfulnessInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationHelpfulnessInput + * @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.SummarizationHelpfulnessInput; + + /** + * Verifies a SummarizationHelpfulnessInput 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 SummarizationHelpfulnessInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationHelpfulnessInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput; + + /** + * Creates a plain object from a SummarizationHelpfulnessInput message. Also converts values to other types if specified. + * @param message SummarizationHelpfulnessInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationHelpfulnessInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationHelpfulnessInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationHelpfulnessInstance. */ + interface ISummarizationHelpfulnessInstance { + + /** SummarizationHelpfulnessInstance prediction */ + prediction?: (string|null); + + /** SummarizationHelpfulnessInstance reference */ + reference?: (string|null); + + /** SummarizationHelpfulnessInstance context */ + context?: (string|null); + + /** SummarizationHelpfulnessInstance instruction */ + instruction?: (string|null); + } + + /** Represents a SummarizationHelpfulnessInstance. */ + class SummarizationHelpfulnessInstance implements ISummarizationHelpfulnessInstance { + + /** + * Constructs a new SummarizationHelpfulnessInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance); + + /** SummarizationHelpfulnessInstance prediction. */ + public prediction?: (string|null); + + /** SummarizationHelpfulnessInstance reference. */ + public reference?: (string|null); + + /** SummarizationHelpfulnessInstance context. */ + public context?: (string|null); + + /** SummarizationHelpfulnessInstance instruction. */ + public instruction?: (string|null); + + /** SummarizationHelpfulnessInstance _prediction. */ + public _prediction?: "prediction"; + + /** SummarizationHelpfulnessInstance _reference. */ + public _reference?: "reference"; + + /** SummarizationHelpfulnessInstance _context. */ + public _context?: "context"; + + /** SummarizationHelpfulnessInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new SummarizationHelpfulnessInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationHelpfulnessInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance; + + /** + * Encodes the specified SummarizationHelpfulnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.verify|verify} messages. + * @param message SummarizationHelpfulnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationHelpfulnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.verify|verify} messages. + * @param message SummarizationHelpfulnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationHelpfulnessInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationHelpfulnessInstance + * @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.SummarizationHelpfulnessInstance; + + /** + * Decodes a SummarizationHelpfulnessInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationHelpfulnessInstance + * @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.SummarizationHelpfulnessInstance; + + /** + * Verifies a SummarizationHelpfulnessInstance 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 SummarizationHelpfulnessInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationHelpfulnessInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance; + + /** + * Creates a plain object from a SummarizationHelpfulnessInstance message. Also converts values to other types if specified. + * @param message SummarizationHelpfulnessInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationHelpfulnessInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationHelpfulnessInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationHelpfulnessSpec. */ + interface ISummarizationHelpfulnessSpec { + + /** SummarizationHelpfulnessSpec useReference */ + useReference?: (boolean|null); + + /** SummarizationHelpfulnessSpec version */ + version?: (number|null); + } + + /** Represents a SummarizationHelpfulnessSpec. */ + class SummarizationHelpfulnessSpec implements ISummarizationHelpfulnessSpec { + + /** + * Constructs a new SummarizationHelpfulnessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec); + + /** SummarizationHelpfulnessSpec useReference. */ + public useReference: boolean; + + /** SummarizationHelpfulnessSpec version. */ + public version: number; + + /** + * Creates a new SummarizationHelpfulnessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationHelpfulnessSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec; + + /** + * Encodes the specified SummarizationHelpfulnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.verify|verify} messages. + * @param message SummarizationHelpfulnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationHelpfulnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.verify|verify} messages. + * @param message SummarizationHelpfulnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationHelpfulnessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationHelpfulnessSpec + * @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.SummarizationHelpfulnessSpec; + + /** + * Decodes a SummarizationHelpfulnessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationHelpfulnessSpec + * @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.SummarizationHelpfulnessSpec; + + /** + * Verifies a SummarizationHelpfulnessSpec 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 SummarizationHelpfulnessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationHelpfulnessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec; + + /** + * Creates a plain object from a SummarizationHelpfulnessSpec message. Also converts values to other types if specified. + * @param message SummarizationHelpfulnessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationHelpfulnessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationHelpfulnessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationHelpfulnessResult. */ + interface ISummarizationHelpfulnessResult { + + /** SummarizationHelpfulnessResult score */ + score?: (number|null); + + /** SummarizationHelpfulnessResult explanation */ + explanation?: (string|null); + + /** SummarizationHelpfulnessResult confidence */ + confidence?: (number|null); + } + + /** Represents a SummarizationHelpfulnessResult. */ + class SummarizationHelpfulnessResult implements ISummarizationHelpfulnessResult { + + /** + * Constructs a new SummarizationHelpfulnessResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult); + + /** SummarizationHelpfulnessResult score. */ + public score?: (number|null); + + /** SummarizationHelpfulnessResult explanation. */ + public explanation: string; + + /** SummarizationHelpfulnessResult confidence. */ + public confidence?: (number|null); + + /** SummarizationHelpfulnessResult _score. */ + public _score?: "score"; + + /** SummarizationHelpfulnessResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new SummarizationHelpfulnessResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationHelpfulnessResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult; + + /** + * Encodes the specified SummarizationHelpfulnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.verify|verify} messages. + * @param message SummarizationHelpfulnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationHelpfulnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.verify|verify} messages. + * @param message SummarizationHelpfulnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationHelpfulnessResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationHelpfulnessResult + * @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.SummarizationHelpfulnessResult; + + /** + * Decodes a SummarizationHelpfulnessResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationHelpfulnessResult + * @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.SummarizationHelpfulnessResult; + + /** + * Verifies a SummarizationHelpfulnessResult 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 SummarizationHelpfulnessResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationHelpfulnessResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult; + + /** + * Creates a plain object from a SummarizationHelpfulnessResult message. Also converts values to other types if specified. + * @param message SummarizationHelpfulnessResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationHelpfulnessResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationHelpfulnessResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationVerbosityInput. */ + interface ISummarizationVerbosityInput { + + /** SummarizationVerbosityInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec|null); + + /** SummarizationVerbosityInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance|null); + } + + /** Represents a SummarizationVerbosityInput. */ + class SummarizationVerbosityInput implements ISummarizationVerbosityInput { + + /** + * Constructs a new SummarizationVerbosityInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput); + + /** SummarizationVerbosityInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec|null); + + /** SummarizationVerbosityInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance|null); + + /** + * Creates a new SummarizationVerbosityInput instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationVerbosityInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput): google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput; + + /** + * Encodes the specified SummarizationVerbosityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.verify|verify} messages. + * @param message SummarizationVerbosityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationVerbosityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.verify|verify} messages. + * @param message SummarizationVerbosityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationVerbosityInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationVerbosityInput + * @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.SummarizationVerbosityInput; + + /** + * Decodes a SummarizationVerbosityInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationVerbosityInput + * @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.SummarizationVerbosityInput; + + /** + * Verifies a SummarizationVerbosityInput 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 SummarizationVerbosityInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationVerbosityInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput; + + /** + * Creates a plain object from a SummarizationVerbosityInput message. Also converts values to other types if specified. + * @param message SummarizationVerbosityInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationVerbosityInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationVerbosityInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationVerbosityInstance. */ + interface ISummarizationVerbosityInstance { + + /** SummarizationVerbosityInstance prediction */ + prediction?: (string|null); + + /** SummarizationVerbosityInstance reference */ + reference?: (string|null); + + /** SummarizationVerbosityInstance context */ + context?: (string|null); + + /** SummarizationVerbosityInstance instruction */ + instruction?: (string|null); + } + + /** Represents a SummarizationVerbosityInstance. */ + class SummarizationVerbosityInstance implements ISummarizationVerbosityInstance { + + /** + * Constructs a new SummarizationVerbosityInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance); + + /** SummarizationVerbosityInstance prediction. */ + public prediction?: (string|null); + + /** SummarizationVerbosityInstance reference. */ + public reference?: (string|null); + + /** SummarizationVerbosityInstance context. */ + public context?: (string|null); + + /** SummarizationVerbosityInstance instruction. */ + public instruction?: (string|null); + + /** SummarizationVerbosityInstance _prediction. */ + public _prediction?: "prediction"; + + /** SummarizationVerbosityInstance _reference. */ + public _reference?: "reference"; + + /** SummarizationVerbosityInstance _context. */ + public _context?: "context"; + + /** SummarizationVerbosityInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new SummarizationVerbosityInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationVerbosityInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance): google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance; + + /** + * Encodes the specified SummarizationVerbosityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.verify|verify} messages. + * @param message SummarizationVerbosityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationVerbosityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.verify|verify} messages. + * @param message SummarizationVerbosityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationVerbosityInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationVerbosityInstance + * @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.SummarizationVerbosityInstance; + + /** + * Decodes a SummarizationVerbosityInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationVerbosityInstance + * @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.SummarizationVerbosityInstance; + + /** + * Verifies a SummarizationVerbosityInstance 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 SummarizationVerbosityInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationVerbosityInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance; + + /** + * Creates a plain object from a SummarizationVerbosityInstance message. Also converts values to other types if specified. + * @param message SummarizationVerbosityInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationVerbosityInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationVerbosityInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationVerbositySpec. */ + interface ISummarizationVerbositySpec { + + /** SummarizationVerbositySpec useReference */ + useReference?: (boolean|null); + + /** SummarizationVerbositySpec version */ + version?: (number|null); + } + + /** Represents a SummarizationVerbositySpec. */ + class SummarizationVerbositySpec implements ISummarizationVerbositySpec { + + /** + * Constructs a new SummarizationVerbositySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec); + + /** SummarizationVerbositySpec useReference. */ + public useReference: boolean; + + /** SummarizationVerbositySpec version. */ + public version: number; + + /** + * Creates a new SummarizationVerbositySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationVerbositySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec): google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec; + + /** + * Encodes the specified SummarizationVerbositySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.verify|verify} messages. + * @param message SummarizationVerbositySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationVerbositySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.verify|verify} messages. + * @param message SummarizationVerbositySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationVerbositySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationVerbositySpec + * @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.SummarizationVerbositySpec; + + /** + * Decodes a SummarizationVerbositySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationVerbositySpec + * @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.SummarizationVerbositySpec; + + /** + * Verifies a SummarizationVerbositySpec 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 SummarizationVerbositySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationVerbositySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec; + + /** + * Creates a plain object from a SummarizationVerbositySpec message. Also converts values to other types if specified. + * @param message SummarizationVerbositySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationVerbositySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationVerbositySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SummarizationVerbosityResult. */ + interface ISummarizationVerbosityResult { + + /** SummarizationVerbosityResult score */ + score?: (number|null); + + /** SummarizationVerbosityResult explanation */ + explanation?: (string|null); + + /** SummarizationVerbosityResult confidence */ + confidence?: (number|null); + } + + /** Represents a SummarizationVerbosityResult. */ + class SummarizationVerbosityResult implements ISummarizationVerbosityResult { + + /** + * Constructs a new SummarizationVerbosityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult); + + /** SummarizationVerbosityResult score. */ + public score?: (number|null); + + /** SummarizationVerbosityResult explanation. */ + public explanation: string; + + /** SummarizationVerbosityResult confidence. */ + public confidence?: (number|null); + + /** SummarizationVerbosityResult _score. */ + public _score?: "score"; + + /** SummarizationVerbosityResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new SummarizationVerbosityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SummarizationVerbosityResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult): google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult; + + /** + * Encodes the specified SummarizationVerbosityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.verify|verify} messages. + * @param message SummarizationVerbosityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummarizationVerbosityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.verify|verify} messages. + * @param message SummarizationVerbosityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummarizationVerbosityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummarizationVerbosityResult + * @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.SummarizationVerbosityResult; + + /** + * Decodes a SummarizationVerbosityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummarizationVerbosityResult + * @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.SummarizationVerbosityResult; + + /** + * Verifies a SummarizationVerbosityResult 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 SummarizationVerbosityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummarizationVerbosityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult; + + /** + * Creates a plain object from a SummarizationVerbosityResult message. Also converts values to other types if specified. + * @param message SummarizationVerbosityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummarizationVerbosityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummarizationVerbosityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringQualityInput. */ + interface IQuestionAnsweringQualityInput { + + /** QuestionAnsweringQualityInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec|null); + + /** QuestionAnsweringQualityInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance|null); + } + + /** Represents a QuestionAnsweringQualityInput. */ + class QuestionAnsweringQualityInput implements IQuestionAnsweringQualityInput { + + /** + * Constructs a new QuestionAnsweringQualityInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput); + + /** QuestionAnsweringQualityInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec|null); + + /** QuestionAnsweringQualityInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance|null); + + /** + * Creates a new QuestionAnsweringQualityInput instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringQualityInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput; + + /** + * Encodes the specified QuestionAnsweringQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.verify|verify} messages. + * @param message QuestionAnsweringQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.verify|verify} messages. + * @param message QuestionAnsweringQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringQualityInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringQualityInput + * @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.QuestionAnsweringQualityInput; + + /** + * Decodes a QuestionAnsweringQualityInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringQualityInput + * @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.QuestionAnsweringQualityInput; + + /** + * Verifies a QuestionAnsweringQualityInput 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 QuestionAnsweringQualityInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringQualityInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput; + + /** + * Creates a plain object from a QuestionAnsweringQualityInput message. Also converts values to other types if specified. + * @param message QuestionAnsweringQualityInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringQualityInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringQualityInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringQualityInstance. */ + interface IQuestionAnsweringQualityInstance { + + /** QuestionAnsweringQualityInstance prediction */ + prediction?: (string|null); + + /** QuestionAnsweringQualityInstance reference */ + reference?: (string|null); + + /** QuestionAnsweringQualityInstance context */ + context?: (string|null); + + /** QuestionAnsweringQualityInstance instruction */ + instruction?: (string|null); + } + + /** Represents a QuestionAnsweringQualityInstance. */ + class QuestionAnsweringQualityInstance implements IQuestionAnsweringQualityInstance { + + /** + * Constructs a new QuestionAnsweringQualityInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance); + + /** QuestionAnsweringQualityInstance prediction. */ + public prediction?: (string|null); + + /** QuestionAnsweringQualityInstance reference. */ + public reference?: (string|null); + + /** QuestionAnsweringQualityInstance context. */ + public context?: (string|null); + + /** QuestionAnsweringQualityInstance instruction. */ + public instruction?: (string|null); + + /** QuestionAnsweringQualityInstance _prediction. */ + public _prediction?: "prediction"; + + /** QuestionAnsweringQualityInstance _reference. */ + public _reference?: "reference"; + + /** QuestionAnsweringQualityInstance _context. */ + public _context?: "context"; + + /** QuestionAnsweringQualityInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new QuestionAnsweringQualityInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringQualityInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance; + + /** + * Encodes the specified QuestionAnsweringQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.verify|verify} messages. + * @param message QuestionAnsweringQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.verify|verify} messages. + * @param message QuestionAnsweringQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringQualityInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringQualityInstance + * @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.QuestionAnsweringQualityInstance; + + /** + * Decodes a QuestionAnsweringQualityInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringQualityInstance + * @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.QuestionAnsweringQualityInstance; + + /** + * Verifies a QuestionAnsweringQualityInstance 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 QuestionAnsweringQualityInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringQualityInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance; + + /** + * Creates a plain object from a QuestionAnsweringQualityInstance message. Also converts values to other types if specified. + * @param message QuestionAnsweringQualityInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringQualityInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringQualityInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringQualitySpec. */ + interface IQuestionAnsweringQualitySpec { + + /** QuestionAnsweringQualitySpec useReference */ + useReference?: (boolean|null); + + /** QuestionAnsweringQualitySpec version */ + version?: (number|null); + } + + /** Represents a QuestionAnsweringQualitySpec. */ + class QuestionAnsweringQualitySpec implements IQuestionAnsweringQualitySpec { + + /** + * Constructs a new QuestionAnsweringQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec); + + /** QuestionAnsweringQualitySpec useReference. */ + public useReference: boolean; + + /** QuestionAnsweringQualitySpec version. */ + public version: number; + + /** + * Creates a new QuestionAnsweringQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringQualitySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec; + + /** + * Encodes the specified QuestionAnsweringQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.verify|verify} messages. + * @param message QuestionAnsweringQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.verify|verify} messages. + * @param message QuestionAnsweringQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringQualitySpec + * @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.QuestionAnsweringQualitySpec; + + /** + * Decodes a QuestionAnsweringQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringQualitySpec + * @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.QuestionAnsweringQualitySpec; + + /** + * Verifies a QuestionAnsweringQualitySpec 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 QuestionAnsweringQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec; + + /** + * Creates a plain object from a QuestionAnsweringQualitySpec message. Also converts values to other types if specified. + * @param message QuestionAnsweringQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringQualityResult. */ + interface IQuestionAnsweringQualityResult { + + /** QuestionAnsweringQualityResult score */ + score?: (number|null); + + /** QuestionAnsweringQualityResult explanation */ + explanation?: (string|null); + + /** QuestionAnsweringQualityResult confidence */ + confidence?: (number|null); + } + + /** Represents a QuestionAnsweringQualityResult. */ + class QuestionAnsweringQualityResult implements IQuestionAnsweringQualityResult { + + /** + * Constructs a new QuestionAnsweringQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult); + + /** QuestionAnsweringQualityResult score. */ + public score?: (number|null); + + /** QuestionAnsweringQualityResult explanation. */ + public explanation: string; + + /** QuestionAnsweringQualityResult confidence. */ + public confidence?: (number|null); + + /** QuestionAnsweringQualityResult _score. */ + public _score?: "score"; + + /** QuestionAnsweringQualityResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new QuestionAnsweringQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringQualityResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult; + + /** + * Encodes the specified QuestionAnsweringQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.verify|verify} messages. + * @param message QuestionAnsweringQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.verify|verify} messages. + * @param message QuestionAnsweringQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringQualityResult + * @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.QuestionAnsweringQualityResult; + + /** + * Decodes a QuestionAnsweringQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringQualityResult + * @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.QuestionAnsweringQualityResult; + + /** + * Verifies a QuestionAnsweringQualityResult 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 QuestionAnsweringQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult; + + /** + * Creates a plain object from a QuestionAnsweringQualityResult message. Also converts values to other types if specified. + * @param message QuestionAnsweringQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseQuestionAnsweringQualityInput. */ + interface IPairwiseQuestionAnsweringQualityInput { + + /** PairwiseQuestionAnsweringQualityInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec|null); + + /** PairwiseQuestionAnsweringQualityInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance|null); + } + + /** Represents a PairwiseQuestionAnsweringQualityInput. */ + class PairwiseQuestionAnsweringQualityInput implements IPairwiseQuestionAnsweringQualityInput { + + /** + * Constructs a new PairwiseQuestionAnsweringQualityInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput); + + /** PairwiseQuestionAnsweringQualityInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec|null); + + /** PairwiseQuestionAnsweringQualityInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance|null); + + /** + * Creates a new PairwiseQuestionAnsweringQualityInput instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseQuestionAnsweringQualityInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseQuestionAnsweringQualityInput + * @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.PairwiseQuestionAnsweringQualityInput; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseQuestionAnsweringQualityInput + * @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.PairwiseQuestionAnsweringQualityInput; + + /** + * Verifies a PairwiseQuestionAnsweringQualityInput 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 PairwiseQuestionAnsweringQualityInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseQuestionAnsweringQualityInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityInput message. Also converts values to other types if specified. + * @param message PairwiseQuestionAnsweringQualityInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseQuestionAnsweringQualityInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseQuestionAnsweringQualityInstance. */ + interface IPairwiseQuestionAnsweringQualityInstance { + + /** PairwiseQuestionAnsweringQualityInstance prediction */ + prediction?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance baselinePrediction */ + baselinePrediction?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance reference */ + reference?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance context */ + context?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance instruction */ + instruction?: (string|null); + } + + /** Represents a PairwiseQuestionAnsweringQualityInstance. */ + class PairwiseQuestionAnsweringQualityInstance implements IPairwiseQuestionAnsweringQualityInstance { + + /** + * Constructs a new PairwiseQuestionAnsweringQualityInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance); + + /** PairwiseQuestionAnsweringQualityInstance prediction. */ + public prediction?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance baselinePrediction. */ + public baselinePrediction?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance reference. */ + public reference?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance context. */ + public context?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance instruction. */ + public instruction?: (string|null); + + /** PairwiseQuestionAnsweringQualityInstance _prediction. */ + public _prediction?: "prediction"; + + /** PairwiseQuestionAnsweringQualityInstance _baselinePrediction. */ + public _baselinePrediction?: "baselinePrediction"; + + /** PairwiseQuestionAnsweringQualityInstance _reference. */ + public _reference?: "reference"; + + /** PairwiseQuestionAnsweringQualityInstance _context. */ + public _context?: "context"; + + /** PairwiseQuestionAnsweringQualityInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new PairwiseQuestionAnsweringQualityInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseQuestionAnsweringQualityInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseQuestionAnsweringQualityInstance + * @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.PairwiseQuestionAnsweringQualityInstance; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseQuestionAnsweringQualityInstance + * @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.PairwiseQuestionAnsweringQualityInstance; + + /** + * Verifies a PairwiseQuestionAnsweringQualityInstance 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 PairwiseQuestionAnsweringQualityInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseQuestionAnsweringQualityInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityInstance message. Also converts values to other types if specified. + * @param message PairwiseQuestionAnsweringQualityInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseQuestionAnsweringQualityInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseQuestionAnsweringQualitySpec. */ + interface IPairwiseQuestionAnsweringQualitySpec { + + /** PairwiseQuestionAnsweringQualitySpec useReference */ + useReference?: (boolean|null); + + /** PairwiseQuestionAnsweringQualitySpec version */ + version?: (number|null); + } + + /** Represents a PairwiseQuestionAnsweringQualitySpec. */ + class PairwiseQuestionAnsweringQualitySpec implements IPairwiseQuestionAnsweringQualitySpec { + + /** + * Constructs a new PairwiseQuestionAnsweringQualitySpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec); + + /** PairwiseQuestionAnsweringQualitySpec useReference. */ + public useReference: boolean; + + /** PairwiseQuestionAnsweringQualitySpec version. */ + public version: number; + + /** + * Creates a new PairwiseQuestionAnsweringQualitySpec instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseQuestionAnsweringQualitySpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualitySpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseQuestionAnsweringQualitySpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseQuestionAnsweringQualitySpec + * @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.PairwiseQuestionAnsweringQualitySpec; + + /** + * Decodes a PairwiseQuestionAnsweringQualitySpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseQuestionAnsweringQualitySpec + * @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.PairwiseQuestionAnsweringQualitySpec; + + /** + * Verifies a PairwiseQuestionAnsweringQualitySpec 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 PairwiseQuestionAnsweringQualitySpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseQuestionAnsweringQualitySpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualitySpec message. Also converts values to other types if specified. + * @param message PairwiseQuestionAnsweringQualitySpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseQuestionAnsweringQualitySpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualitySpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PairwiseQuestionAnsweringQualityResult. */ + interface IPairwiseQuestionAnsweringQualityResult { + + /** PairwiseQuestionAnsweringQualityResult pairwiseChoice */ + pairwiseChoice?: (google.cloud.aiplatform.v1beta1.PairwiseChoice|keyof typeof google.cloud.aiplatform.v1beta1.PairwiseChoice|null); + + /** PairwiseQuestionAnsweringQualityResult explanation */ + explanation?: (string|null); + + /** PairwiseQuestionAnsweringQualityResult confidence */ + confidence?: (number|null); + } + + /** Represents a PairwiseQuestionAnsweringQualityResult. */ + class PairwiseQuestionAnsweringQualityResult implements IPairwiseQuestionAnsweringQualityResult { + + /** + * Constructs a new PairwiseQuestionAnsweringQualityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult); + + /** PairwiseQuestionAnsweringQualityResult pairwiseChoice. */ + public pairwiseChoice: (google.cloud.aiplatform.v1beta1.PairwiseChoice|keyof typeof google.cloud.aiplatform.v1beta1.PairwiseChoice); + + /** PairwiseQuestionAnsweringQualityResult explanation. */ + public explanation: string; + + /** PairwiseQuestionAnsweringQualityResult confidence. */ + public confidence?: (number|null); + + /** PairwiseQuestionAnsweringQualityResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new PairwiseQuestionAnsweringQualityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns PairwiseQuestionAnsweringQualityResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.verify|verify} messages. + * @param message PairwiseQuestionAnsweringQualityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PairwiseQuestionAnsweringQualityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PairwiseQuestionAnsweringQualityResult + * @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.PairwiseQuestionAnsweringQualityResult; + + /** + * Decodes a PairwiseQuestionAnsweringQualityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PairwiseQuestionAnsweringQualityResult + * @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.PairwiseQuestionAnsweringQualityResult; + + /** + * Verifies a PairwiseQuestionAnsweringQualityResult 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 PairwiseQuestionAnsweringQualityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PairwiseQuestionAnsweringQualityResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityResult message. Also converts values to other types if specified. + * @param message PairwiseQuestionAnsweringQualityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PairwiseQuestionAnsweringQualityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringRelevanceInput. */ + interface IQuestionAnsweringRelevanceInput { + + /** QuestionAnsweringRelevanceInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec|null); + + /** QuestionAnsweringRelevanceInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance|null); + } + + /** Represents a QuestionAnsweringRelevanceInput. */ + class QuestionAnsweringRelevanceInput implements IQuestionAnsweringRelevanceInput { + + /** + * Constructs a new QuestionAnsweringRelevanceInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput); + + /** QuestionAnsweringRelevanceInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec|null); + + /** QuestionAnsweringRelevanceInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance|null); + + /** + * Creates a new QuestionAnsweringRelevanceInput instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringRelevanceInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput; + + /** + * Encodes the specified QuestionAnsweringRelevanceInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.verify|verify} messages. + * @param message QuestionAnsweringRelevanceInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringRelevanceInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.verify|verify} messages. + * @param message QuestionAnsweringRelevanceInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringRelevanceInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringRelevanceInput + * @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.QuestionAnsweringRelevanceInput; + + /** + * Decodes a QuestionAnsweringRelevanceInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringRelevanceInput + * @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.QuestionAnsweringRelevanceInput; + + /** + * Verifies a QuestionAnsweringRelevanceInput 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 QuestionAnsweringRelevanceInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringRelevanceInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceInput message. Also converts values to other types if specified. + * @param message QuestionAnsweringRelevanceInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringRelevanceInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringRelevanceInstance. */ + interface IQuestionAnsweringRelevanceInstance { + + /** QuestionAnsweringRelevanceInstance prediction */ + prediction?: (string|null); + + /** QuestionAnsweringRelevanceInstance reference */ + reference?: (string|null); + + /** QuestionAnsweringRelevanceInstance context */ + context?: (string|null); + + /** QuestionAnsweringRelevanceInstance instruction */ + instruction?: (string|null); + } + + /** Represents a QuestionAnsweringRelevanceInstance. */ + class QuestionAnsweringRelevanceInstance implements IQuestionAnsweringRelevanceInstance { + + /** + * Constructs a new QuestionAnsweringRelevanceInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance); + + /** QuestionAnsweringRelevanceInstance prediction. */ + public prediction?: (string|null); + + /** QuestionAnsweringRelevanceInstance reference. */ + public reference?: (string|null); + + /** QuestionAnsweringRelevanceInstance context. */ + public context?: (string|null); + + /** QuestionAnsweringRelevanceInstance instruction. */ + public instruction?: (string|null); + + /** QuestionAnsweringRelevanceInstance _prediction. */ + public _prediction?: "prediction"; + + /** QuestionAnsweringRelevanceInstance _reference. */ + public _reference?: "reference"; + + /** QuestionAnsweringRelevanceInstance _context. */ + public _context?: "context"; + + /** QuestionAnsweringRelevanceInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new QuestionAnsweringRelevanceInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringRelevanceInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance; + + /** + * Encodes the specified QuestionAnsweringRelevanceInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.verify|verify} messages. + * @param message QuestionAnsweringRelevanceInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringRelevanceInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.verify|verify} messages. + * @param message QuestionAnsweringRelevanceInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringRelevanceInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringRelevanceInstance + * @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.QuestionAnsweringRelevanceInstance; + + /** + * Decodes a QuestionAnsweringRelevanceInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringRelevanceInstance + * @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.QuestionAnsweringRelevanceInstance; + + /** + * Verifies a QuestionAnsweringRelevanceInstance 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 QuestionAnsweringRelevanceInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringRelevanceInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceInstance message. Also converts values to other types if specified. + * @param message QuestionAnsweringRelevanceInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringRelevanceInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringRelevanceSpec. */ + interface IQuestionAnsweringRelevanceSpec { + + /** QuestionAnsweringRelevanceSpec useReference */ + useReference?: (boolean|null); + + /** QuestionAnsweringRelevanceSpec version */ + version?: (number|null); + } + + /** Represents a QuestionAnsweringRelevanceSpec. */ + class QuestionAnsweringRelevanceSpec implements IQuestionAnsweringRelevanceSpec { + + /** + * Constructs a new QuestionAnsweringRelevanceSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec); + + /** QuestionAnsweringRelevanceSpec useReference. */ + public useReference: boolean; + + /** QuestionAnsweringRelevanceSpec version. */ + public version: number; + + /** + * Creates a new QuestionAnsweringRelevanceSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringRelevanceSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec; + + /** + * Encodes the specified QuestionAnsweringRelevanceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.verify|verify} messages. + * @param message QuestionAnsweringRelevanceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringRelevanceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.verify|verify} messages. + * @param message QuestionAnsweringRelevanceSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringRelevanceSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringRelevanceSpec + * @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.QuestionAnsweringRelevanceSpec; + + /** + * Decodes a QuestionAnsweringRelevanceSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringRelevanceSpec + * @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.QuestionAnsweringRelevanceSpec; + + /** + * Verifies a QuestionAnsweringRelevanceSpec 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 QuestionAnsweringRelevanceSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringRelevanceSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceSpec message. Also converts values to other types if specified. + * @param message QuestionAnsweringRelevanceSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringRelevanceSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringRelevanceResult. */ + interface IQuestionAnsweringRelevanceResult { + + /** QuestionAnsweringRelevanceResult score */ + score?: (number|null); + + /** QuestionAnsweringRelevanceResult explanation */ + explanation?: (string|null); + + /** QuestionAnsweringRelevanceResult confidence */ + confidence?: (number|null); + } + + /** Represents a QuestionAnsweringRelevanceResult. */ + class QuestionAnsweringRelevanceResult implements IQuestionAnsweringRelevanceResult { + + /** + * Constructs a new QuestionAnsweringRelevanceResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult); + + /** QuestionAnsweringRelevanceResult score. */ + public score?: (number|null); + + /** QuestionAnsweringRelevanceResult explanation. */ + public explanation: string; + + /** QuestionAnsweringRelevanceResult confidence. */ + public confidence?: (number|null); + + /** QuestionAnsweringRelevanceResult _score. */ + public _score?: "score"; + + /** QuestionAnsweringRelevanceResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new QuestionAnsweringRelevanceResult instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringRelevanceResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult; + + /** + * Encodes the specified QuestionAnsweringRelevanceResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.verify|verify} messages. + * @param message QuestionAnsweringRelevanceResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringRelevanceResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.verify|verify} messages. + * @param message QuestionAnsweringRelevanceResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringRelevanceResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringRelevanceResult + * @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.QuestionAnsweringRelevanceResult; + + /** + * Decodes a QuestionAnsweringRelevanceResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringRelevanceResult + * @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.QuestionAnsweringRelevanceResult; + + /** + * Verifies a QuestionAnsweringRelevanceResult 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 QuestionAnsweringRelevanceResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringRelevanceResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceResult message. Also converts values to other types if specified. + * @param message QuestionAnsweringRelevanceResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringRelevanceResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringHelpfulnessInput. */ + interface IQuestionAnsweringHelpfulnessInput { + + /** QuestionAnsweringHelpfulnessInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec|null); + + /** QuestionAnsweringHelpfulnessInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance|null); + } + + /** Represents a QuestionAnsweringHelpfulnessInput. */ + class QuestionAnsweringHelpfulnessInput implements IQuestionAnsweringHelpfulnessInput { + + /** + * Constructs a new QuestionAnsweringHelpfulnessInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput); + + /** QuestionAnsweringHelpfulnessInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec|null); + + /** QuestionAnsweringHelpfulnessInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance|null); + + /** + * Creates a new QuestionAnsweringHelpfulnessInput instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringHelpfulnessInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringHelpfulnessInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringHelpfulnessInput + * @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.QuestionAnsweringHelpfulnessInput; + + /** + * Decodes a QuestionAnsweringHelpfulnessInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringHelpfulnessInput + * @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.QuestionAnsweringHelpfulnessInput; + + /** + * Verifies a QuestionAnsweringHelpfulnessInput 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 QuestionAnsweringHelpfulnessInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringHelpfulnessInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessInput message. Also converts values to other types if specified. + * @param message QuestionAnsweringHelpfulnessInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringHelpfulnessInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringHelpfulnessInstance. */ + interface IQuestionAnsweringHelpfulnessInstance { + + /** QuestionAnsweringHelpfulnessInstance prediction */ + prediction?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance reference */ + reference?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance context */ + context?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance instruction */ + instruction?: (string|null); + } + + /** Represents a QuestionAnsweringHelpfulnessInstance. */ + class QuestionAnsweringHelpfulnessInstance implements IQuestionAnsweringHelpfulnessInstance { + + /** + * Constructs a new QuestionAnsweringHelpfulnessInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance); + + /** QuestionAnsweringHelpfulnessInstance prediction. */ + public prediction?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance reference. */ + public reference?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance context. */ + public context?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance instruction. */ + public instruction?: (string|null); + + /** QuestionAnsweringHelpfulnessInstance _prediction. */ + public _prediction?: "prediction"; + + /** QuestionAnsweringHelpfulnessInstance _reference. */ + public _reference?: "reference"; + + /** QuestionAnsweringHelpfulnessInstance _context. */ + public _context?: "context"; + + /** QuestionAnsweringHelpfulnessInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new QuestionAnsweringHelpfulnessInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringHelpfulnessInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringHelpfulnessInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringHelpfulnessInstance + * @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.QuestionAnsweringHelpfulnessInstance; + + /** + * Decodes a QuestionAnsweringHelpfulnessInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringHelpfulnessInstance + * @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.QuestionAnsweringHelpfulnessInstance; + + /** + * Verifies a QuestionAnsweringHelpfulnessInstance 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 QuestionAnsweringHelpfulnessInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringHelpfulnessInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessInstance message. Also converts values to other types if specified. + * @param message QuestionAnsweringHelpfulnessInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringHelpfulnessInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringHelpfulnessSpec. */ + interface IQuestionAnsweringHelpfulnessSpec { + + /** QuestionAnsweringHelpfulnessSpec useReference */ + useReference?: (boolean|null); + + /** QuestionAnsweringHelpfulnessSpec version */ + version?: (number|null); + } + + /** Represents a QuestionAnsweringHelpfulnessSpec. */ + class QuestionAnsweringHelpfulnessSpec implements IQuestionAnsweringHelpfulnessSpec { + + /** + * Constructs a new QuestionAnsweringHelpfulnessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec); + + /** QuestionAnsweringHelpfulnessSpec useReference. */ + public useReference: boolean; + + /** QuestionAnsweringHelpfulnessSpec version. */ + public version: number; + + /** + * Creates a new QuestionAnsweringHelpfulnessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringHelpfulnessSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringHelpfulnessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringHelpfulnessSpec + * @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.QuestionAnsweringHelpfulnessSpec; + + /** + * Decodes a QuestionAnsweringHelpfulnessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringHelpfulnessSpec + * @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.QuestionAnsweringHelpfulnessSpec; + + /** + * Verifies a QuestionAnsweringHelpfulnessSpec 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 QuestionAnsweringHelpfulnessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringHelpfulnessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessSpec message. Also converts values to other types if specified. + * @param message QuestionAnsweringHelpfulnessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringHelpfulnessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringHelpfulnessResult. */ + interface IQuestionAnsweringHelpfulnessResult { + + /** QuestionAnsweringHelpfulnessResult score */ + score?: (number|null); + + /** QuestionAnsweringHelpfulnessResult explanation */ + explanation?: (string|null); + + /** QuestionAnsweringHelpfulnessResult confidence */ + confidence?: (number|null); + } + + /** Represents a QuestionAnsweringHelpfulnessResult. */ + class QuestionAnsweringHelpfulnessResult implements IQuestionAnsweringHelpfulnessResult { + + /** + * Constructs a new QuestionAnsweringHelpfulnessResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult); + + /** QuestionAnsweringHelpfulnessResult score. */ + public score?: (number|null); + + /** QuestionAnsweringHelpfulnessResult explanation. */ + public explanation: string; + + /** QuestionAnsweringHelpfulnessResult confidence. */ + public confidence?: (number|null); + + /** QuestionAnsweringHelpfulnessResult _score. */ + public _score?: "score"; + + /** QuestionAnsweringHelpfulnessResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new QuestionAnsweringHelpfulnessResult instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringHelpfulnessResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.verify|verify} messages. + * @param message QuestionAnsweringHelpfulnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringHelpfulnessResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringHelpfulnessResult + * @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.QuestionAnsweringHelpfulnessResult; + + /** + * Decodes a QuestionAnsweringHelpfulnessResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringHelpfulnessResult + * @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.QuestionAnsweringHelpfulnessResult; + + /** + * Verifies a QuestionAnsweringHelpfulnessResult 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 QuestionAnsweringHelpfulnessResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringHelpfulnessResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessResult message. Also converts values to other types if specified. + * @param message QuestionAnsweringHelpfulnessResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringHelpfulnessResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringCorrectnessInput. */ + interface IQuestionAnsweringCorrectnessInput { + + /** QuestionAnsweringCorrectnessInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec|null); + + /** QuestionAnsweringCorrectnessInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance|null); + } + + /** Represents a QuestionAnsweringCorrectnessInput. */ + class QuestionAnsweringCorrectnessInput implements IQuestionAnsweringCorrectnessInput { + + /** + * Constructs a new QuestionAnsweringCorrectnessInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput); + + /** QuestionAnsweringCorrectnessInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec|null); + + /** QuestionAnsweringCorrectnessInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance|null); + + /** + * Creates a new QuestionAnsweringCorrectnessInput instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringCorrectnessInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringCorrectnessInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringCorrectnessInput + * @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.QuestionAnsweringCorrectnessInput; + + /** + * Decodes a QuestionAnsweringCorrectnessInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringCorrectnessInput + * @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.QuestionAnsweringCorrectnessInput; + + /** + * Verifies a QuestionAnsweringCorrectnessInput 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 QuestionAnsweringCorrectnessInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringCorrectnessInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessInput message. Also converts values to other types if specified. + * @param message QuestionAnsweringCorrectnessInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringCorrectnessInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringCorrectnessInstance. */ + interface IQuestionAnsweringCorrectnessInstance { + + /** QuestionAnsweringCorrectnessInstance prediction */ + prediction?: (string|null); + + /** QuestionAnsweringCorrectnessInstance reference */ + reference?: (string|null); + + /** QuestionAnsweringCorrectnessInstance context */ + context?: (string|null); + + /** QuestionAnsweringCorrectnessInstance instruction */ + instruction?: (string|null); + } + + /** Represents a QuestionAnsweringCorrectnessInstance. */ + class QuestionAnsweringCorrectnessInstance implements IQuestionAnsweringCorrectnessInstance { + + /** + * Constructs a new QuestionAnsweringCorrectnessInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance); + + /** QuestionAnsweringCorrectnessInstance prediction. */ + public prediction?: (string|null); + + /** QuestionAnsweringCorrectnessInstance reference. */ + public reference?: (string|null); + + /** QuestionAnsweringCorrectnessInstance context. */ + public context?: (string|null); + + /** QuestionAnsweringCorrectnessInstance instruction. */ + public instruction?: (string|null); + + /** QuestionAnsweringCorrectnessInstance _prediction. */ + public _prediction?: "prediction"; + + /** QuestionAnsweringCorrectnessInstance _reference. */ + public _reference?: "reference"; + + /** QuestionAnsweringCorrectnessInstance _context. */ + public _context?: "context"; + + /** QuestionAnsweringCorrectnessInstance _instruction. */ + public _instruction?: "instruction"; + + /** + * Creates a new QuestionAnsweringCorrectnessInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringCorrectnessInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringCorrectnessInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringCorrectnessInstance + * @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.QuestionAnsweringCorrectnessInstance; + + /** + * Decodes a QuestionAnsweringCorrectnessInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringCorrectnessInstance + * @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.QuestionAnsweringCorrectnessInstance; + + /** + * Verifies a QuestionAnsweringCorrectnessInstance 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 QuestionAnsweringCorrectnessInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringCorrectnessInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessInstance message. Also converts values to other types if specified. + * @param message QuestionAnsweringCorrectnessInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringCorrectnessInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringCorrectnessSpec. */ + interface IQuestionAnsweringCorrectnessSpec { + + /** QuestionAnsweringCorrectnessSpec useReference */ + useReference?: (boolean|null); + + /** QuestionAnsweringCorrectnessSpec version */ + version?: (number|null); + } + + /** Represents a QuestionAnsweringCorrectnessSpec. */ + class QuestionAnsweringCorrectnessSpec implements IQuestionAnsweringCorrectnessSpec { + + /** + * Constructs a new QuestionAnsweringCorrectnessSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec); + + /** QuestionAnsweringCorrectnessSpec useReference. */ + public useReference: boolean; + + /** QuestionAnsweringCorrectnessSpec version. */ + public version: number; + + /** + * Creates a new QuestionAnsweringCorrectnessSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringCorrectnessSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec; + + /** + * Encodes the specified QuestionAnsweringCorrectnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringCorrectnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringCorrectnessSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringCorrectnessSpec + * @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.QuestionAnsweringCorrectnessSpec; + + /** + * Decodes a QuestionAnsweringCorrectnessSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringCorrectnessSpec + * @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.QuestionAnsweringCorrectnessSpec; + + /** + * Verifies a QuestionAnsweringCorrectnessSpec 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 QuestionAnsweringCorrectnessSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringCorrectnessSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessSpec message. Also converts values to other types if specified. + * @param message QuestionAnsweringCorrectnessSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringCorrectnessSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuestionAnsweringCorrectnessResult. */ + interface IQuestionAnsweringCorrectnessResult { + + /** QuestionAnsweringCorrectnessResult score */ + score?: (number|null); + + /** QuestionAnsweringCorrectnessResult explanation */ + explanation?: (string|null); + + /** QuestionAnsweringCorrectnessResult confidence */ + confidence?: (number|null); + } + + /** Represents a QuestionAnsweringCorrectnessResult. */ + class QuestionAnsweringCorrectnessResult implements IQuestionAnsweringCorrectnessResult { + + /** + * Constructs a new QuestionAnsweringCorrectnessResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult); + + /** QuestionAnsweringCorrectnessResult score. */ + public score?: (number|null); + + /** QuestionAnsweringCorrectnessResult explanation. */ + public explanation: string; + + /** QuestionAnsweringCorrectnessResult confidence. */ + public confidence?: (number|null); + + /** QuestionAnsweringCorrectnessResult _score. */ + public _score?: "score"; + + /** QuestionAnsweringCorrectnessResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new QuestionAnsweringCorrectnessResult instance using the specified properties. + * @param [properties] Properties to set + * @returns QuestionAnsweringCorrectnessResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult; + + /** + * Encodes the specified QuestionAnsweringCorrectnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuestionAnsweringCorrectnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.verify|verify} messages. + * @param message QuestionAnsweringCorrectnessResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuestionAnsweringCorrectnessResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuestionAnsweringCorrectnessResult + * @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.QuestionAnsweringCorrectnessResult; + + /** + * Decodes a QuestionAnsweringCorrectnessResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuestionAnsweringCorrectnessResult + * @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.QuestionAnsweringCorrectnessResult; + + /** + * Verifies a QuestionAnsweringCorrectnessResult 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 QuestionAnsweringCorrectnessResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuestionAnsweringCorrectnessResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessResult message. Also converts values to other types if specified. + * @param message QuestionAnsweringCorrectnessResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuestionAnsweringCorrectnessResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RagContextRecallInput. */ + interface IRagContextRecallInput { + + /** RagContextRecallInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IRagContextRecallSpec|null); + + /** RagContextRecallInput instance */ + instance?: (google.cloud.aiplatform.v1beta1.IRagContextRecallInstance|null); + } + + /** Represents a RagContextRecallInput. */ + class RagContextRecallInput implements IRagContextRecallInput { + + /** + * Constructs a new RagContextRecallInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallInput); + + /** RagContextRecallInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IRagContextRecallSpec|null); + + /** RagContextRecallInput instance. */ + public instance?: (google.cloud.aiplatform.v1beta1.IRagContextRecallInstance|null); + + /** + * Creates a new RagContextRecallInput instance using the specified properties. + * @param [properties] Properties to set + * @returns RagContextRecallInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallInput): google.cloud.aiplatform.v1beta1.RagContextRecallInput; + + /** + * Encodes the specified RagContextRecallInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInput.verify|verify} messages. + * @param message RagContextRecallInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRagContextRecallInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RagContextRecallInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInput.verify|verify} messages. + * @param message RagContextRecallInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRagContextRecallInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RagContextRecallInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RagContextRecallInput + * @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.RagContextRecallInput; + + /** + * Decodes a RagContextRecallInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RagContextRecallInput + * @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.RagContextRecallInput; + + /** + * Verifies a RagContextRecallInput 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 RagContextRecallInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RagContextRecallInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RagContextRecallInput; + + /** + * Creates a plain object from a RagContextRecallInput message. Also converts values to other types if specified. + * @param message RagContextRecallInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RagContextRecallInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RagContextRecallInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RagContextRecallInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RagContextRecallInstance. */ + interface IRagContextRecallInstance { + + /** RagContextRecallInstance reference */ + reference?: (string|null); + + /** RagContextRecallInstance context */ + context?: (string|null); + } + + /** Represents a RagContextRecallInstance. */ + class RagContextRecallInstance implements IRagContextRecallInstance { + + /** + * Constructs a new RagContextRecallInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallInstance); + + /** RagContextRecallInstance reference. */ + public reference?: (string|null); + + /** RagContextRecallInstance context. */ + public context?: (string|null); + + /** RagContextRecallInstance _reference. */ + public _reference?: "reference"; + + /** RagContextRecallInstance _context. */ + public _context?: "context"; + + /** + * Creates a new RagContextRecallInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns RagContextRecallInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallInstance): google.cloud.aiplatform.v1beta1.RagContextRecallInstance; + + /** + * Encodes the specified RagContextRecallInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInstance.verify|verify} messages. + * @param message RagContextRecallInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRagContextRecallInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RagContextRecallInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInstance.verify|verify} messages. + * @param message RagContextRecallInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRagContextRecallInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RagContextRecallInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RagContextRecallInstance + * @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.RagContextRecallInstance; + + /** + * Decodes a RagContextRecallInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RagContextRecallInstance + * @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.RagContextRecallInstance; + + /** + * Verifies a RagContextRecallInstance 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 RagContextRecallInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RagContextRecallInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RagContextRecallInstance; + + /** + * Creates a plain object from a RagContextRecallInstance message. Also converts values to other types if specified. + * @param message RagContextRecallInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RagContextRecallInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RagContextRecallInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RagContextRecallInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RagContextRecallSpec. */ + interface IRagContextRecallSpec { + + /** RagContextRecallSpec version */ + version?: (number|null); + } + + /** Represents a RagContextRecallSpec. */ + class RagContextRecallSpec implements IRagContextRecallSpec { + + /** + * Constructs a new RagContextRecallSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallSpec); + + /** RagContextRecallSpec version. */ + public version: number; + + /** + * Creates a new RagContextRecallSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns RagContextRecallSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallSpec): google.cloud.aiplatform.v1beta1.RagContextRecallSpec; + + /** + * Encodes the specified RagContextRecallSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallSpec.verify|verify} messages. + * @param message RagContextRecallSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRagContextRecallSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RagContextRecallSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallSpec.verify|verify} messages. + * @param message RagContextRecallSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRagContextRecallSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RagContextRecallSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RagContextRecallSpec + * @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.RagContextRecallSpec; + + /** + * Decodes a RagContextRecallSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RagContextRecallSpec + * @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.RagContextRecallSpec; + + /** + * Verifies a RagContextRecallSpec 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 RagContextRecallSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RagContextRecallSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RagContextRecallSpec; + + /** + * Creates a plain object from a RagContextRecallSpec message. Also converts values to other types if specified. + * @param message RagContextRecallSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RagContextRecallSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RagContextRecallSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RagContextRecallSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RagContextRecallResult. */ + interface IRagContextRecallResult { + + /** RagContextRecallResult score */ + score?: (number|null); + + /** RagContextRecallResult explanation */ + explanation?: (string|null); + + /** RagContextRecallResult confidence */ + confidence?: (number|null); + } + + /** Represents a RagContextRecallResult. */ + class RagContextRecallResult implements IRagContextRecallResult { + + /** + * Constructs a new RagContextRecallResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallResult); + + /** RagContextRecallResult score. */ + public score?: (number|null); + + /** RagContextRecallResult explanation. */ + public explanation: string; + + /** RagContextRecallResult confidence. */ + public confidence?: (number|null); + + /** RagContextRecallResult _score. */ + public _score?: "score"; + + /** RagContextRecallResult _confidence. */ + public _confidence?: "confidence"; + + /** + * Creates a new RagContextRecallResult instance using the specified properties. + * @param [properties] Properties to set + * @returns RagContextRecallResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IRagContextRecallResult): google.cloud.aiplatform.v1beta1.RagContextRecallResult; + + /** + * Encodes the specified RagContextRecallResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallResult.verify|verify} messages. + * @param message RagContextRecallResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IRagContextRecallResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RagContextRecallResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallResult.verify|verify} messages. + * @param message RagContextRecallResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IRagContextRecallResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RagContextRecallResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RagContextRecallResult + * @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.RagContextRecallResult; + + /** + * Decodes a RagContextRecallResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RagContextRecallResult + * @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.RagContextRecallResult; + + /** + * Verifies a RagContextRecallResult 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 RagContextRecallResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RagContextRecallResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.RagContextRecallResult; + + /** + * Creates a plain object from a RagContextRecallResult message. Also converts values to other types if specified. + * @param message RagContextRecallResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.RagContextRecallResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RagContextRecallResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RagContextRecallResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolCallValidInput. */ + interface IToolCallValidInput { + + /** ToolCallValidInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IToolCallValidSpec|null); + + /** ToolCallValidInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IToolCallValidInstance[]|null); + } + + /** Represents a ToolCallValidInput. */ + class ToolCallValidInput implements IToolCallValidInput { + + /** + * Constructs a new ToolCallValidInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidInput); + + /** ToolCallValidInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IToolCallValidSpec|null); + + /** ToolCallValidInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IToolCallValidInstance[]; + + /** + * Creates a new ToolCallValidInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCallValidInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidInput): google.cloud.aiplatform.v1beta1.ToolCallValidInput; + + /** + * Encodes the specified ToolCallValidInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInput.verify|verify} messages. + * @param message ToolCallValidInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolCallValidInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCallValidInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInput.verify|verify} messages. + * @param message ToolCallValidInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolCallValidInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCallValidInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCallValidInput + * @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.ToolCallValidInput; + + /** + * Decodes a ToolCallValidInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCallValidInput + * @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.ToolCallValidInput; + + /** + * Verifies a ToolCallValidInput 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 ToolCallValidInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCallValidInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolCallValidInput; + + /** + * Creates a plain object from a ToolCallValidInput message. Also converts values to other types if specified. + * @param message ToolCallValidInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolCallValidInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCallValidInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCallValidInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolCallValidSpec. */ + interface IToolCallValidSpec { + } + + /** Represents a ToolCallValidSpec. */ + class ToolCallValidSpec implements IToolCallValidSpec { + + /** + * Constructs a new ToolCallValidSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidSpec); + + /** + * Creates a new ToolCallValidSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCallValidSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidSpec): google.cloud.aiplatform.v1beta1.ToolCallValidSpec; + + /** + * Encodes the specified ToolCallValidSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidSpec.verify|verify} messages. + * @param message ToolCallValidSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolCallValidSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCallValidSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidSpec.verify|verify} messages. + * @param message ToolCallValidSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolCallValidSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCallValidSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCallValidSpec + * @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.ToolCallValidSpec; + + /** + * Decodes a ToolCallValidSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCallValidSpec + * @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.ToolCallValidSpec; + + /** + * Verifies a ToolCallValidSpec 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 ToolCallValidSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCallValidSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolCallValidSpec; + + /** + * Creates a plain object from a ToolCallValidSpec message. Also converts values to other types if specified. + * @param message ToolCallValidSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolCallValidSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCallValidSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCallValidSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolCallValidInstance. */ + interface IToolCallValidInstance { + + /** ToolCallValidInstance prediction */ + prediction?: (string|null); + + /** ToolCallValidInstance reference */ + reference?: (string|null); + } + + /** Represents a ToolCallValidInstance. */ + class ToolCallValidInstance implements IToolCallValidInstance { + + /** + * Constructs a new ToolCallValidInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidInstance); + + /** ToolCallValidInstance prediction. */ + public prediction?: (string|null); + + /** ToolCallValidInstance reference. */ + public reference?: (string|null); + + /** ToolCallValidInstance _prediction. */ + public _prediction?: "prediction"; + + /** ToolCallValidInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ToolCallValidInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCallValidInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidInstance): google.cloud.aiplatform.v1beta1.ToolCallValidInstance; + + /** + * Encodes the specified ToolCallValidInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInstance.verify|verify} messages. + * @param message ToolCallValidInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolCallValidInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCallValidInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInstance.verify|verify} messages. + * @param message ToolCallValidInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolCallValidInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCallValidInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCallValidInstance + * @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.ToolCallValidInstance; + + /** + * Decodes a ToolCallValidInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCallValidInstance + * @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.ToolCallValidInstance; + + /** + * Verifies a ToolCallValidInstance 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 ToolCallValidInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCallValidInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolCallValidInstance; + + /** + * Creates a plain object from a ToolCallValidInstance message. Also converts values to other types if specified. + * @param message ToolCallValidInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolCallValidInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCallValidInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCallValidInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolCallValidResults. */ + interface IToolCallValidResults { + + /** ToolCallValidResults toolCallValidMetricValues */ + toolCallValidMetricValues?: (google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue[]|null); + } + + /** Represents a ToolCallValidResults. */ + class ToolCallValidResults implements IToolCallValidResults { + + /** + * Constructs a new ToolCallValidResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidResults); + + /** ToolCallValidResults toolCallValidMetricValues. */ + public toolCallValidMetricValues: google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue[]; + + /** + * Creates a new ToolCallValidResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCallValidResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidResults): google.cloud.aiplatform.v1beta1.ToolCallValidResults; + + /** + * Encodes the specified ToolCallValidResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidResults.verify|verify} messages. + * @param message ToolCallValidResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolCallValidResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCallValidResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidResults.verify|verify} messages. + * @param message ToolCallValidResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolCallValidResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCallValidResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCallValidResults + * @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.ToolCallValidResults; + + /** + * Decodes a ToolCallValidResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCallValidResults + * @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.ToolCallValidResults; + + /** + * Verifies a ToolCallValidResults 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 ToolCallValidResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCallValidResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolCallValidResults; + + /** + * Creates a plain object from a ToolCallValidResults message. Also converts values to other types if specified. + * @param message ToolCallValidResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolCallValidResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCallValidResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCallValidResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolCallValidMetricValue. */ + interface IToolCallValidMetricValue { + + /** ToolCallValidMetricValue score */ + score?: (number|null); + } + + /** Represents a ToolCallValidMetricValue. */ + class ToolCallValidMetricValue implements IToolCallValidMetricValue { + + /** + * Constructs a new ToolCallValidMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue); + + /** ToolCallValidMetricValue score. */ + public score?: (number|null); + + /** ToolCallValidMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new ToolCallValidMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolCallValidMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue): google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue; + + /** + * Encodes the specified ToolCallValidMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.verify|verify} messages. + * @param message ToolCallValidMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolCallValidMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.verify|verify} messages. + * @param message ToolCallValidMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolCallValidMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolCallValidMetricValue + * @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.ToolCallValidMetricValue; + + /** + * Decodes a ToolCallValidMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolCallValidMetricValue + * @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.ToolCallValidMetricValue; + + /** + * Verifies a ToolCallValidMetricValue 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 ToolCallValidMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolCallValidMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue; + + /** + * Creates a plain object from a ToolCallValidMetricValue message. Also converts values to other types if specified. + * @param message ToolCallValidMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolCallValidMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolCallValidMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolNameMatchInput. */ + interface IToolNameMatchInput { + + /** ToolNameMatchInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IToolNameMatchSpec|null); + + /** ToolNameMatchInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IToolNameMatchInstance[]|null); + } + + /** Represents a ToolNameMatchInput. */ + class ToolNameMatchInput implements IToolNameMatchInput { + + /** + * Constructs a new ToolNameMatchInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchInput); + + /** ToolNameMatchInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IToolNameMatchSpec|null); + + /** ToolNameMatchInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IToolNameMatchInstance[]; + + /** + * Creates a new ToolNameMatchInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolNameMatchInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchInput): google.cloud.aiplatform.v1beta1.ToolNameMatchInput; + + /** + * Encodes the specified ToolNameMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInput.verify|verify} messages. + * @param message ToolNameMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolNameMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolNameMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInput.verify|verify} messages. + * @param message ToolNameMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolNameMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolNameMatchInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolNameMatchInput + * @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.ToolNameMatchInput; + + /** + * Decodes a ToolNameMatchInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolNameMatchInput + * @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.ToolNameMatchInput; + + /** + * Verifies a ToolNameMatchInput 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 ToolNameMatchInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolNameMatchInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolNameMatchInput; + + /** + * Creates a plain object from a ToolNameMatchInput message. Also converts values to other types if specified. + * @param message ToolNameMatchInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolNameMatchInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolNameMatchInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolNameMatchInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolNameMatchSpec. */ + interface IToolNameMatchSpec { + } + + /** Represents a ToolNameMatchSpec. */ + class ToolNameMatchSpec implements IToolNameMatchSpec { + + /** + * Constructs a new ToolNameMatchSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchSpec); + + /** + * Creates a new ToolNameMatchSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolNameMatchSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchSpec): google.cloud.aiplatform.v1beta1.ToolNameMatchSpec; + + /** + * Encodes the specified ToolNameMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.verify|verify} messages. + * @param message ToolNameMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolNameMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolNameMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.verify|verify} messages. + * @param message ToolNameMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolNameMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolNameMatchSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolNameMatchSpec + * @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.ToolNameMatchSpec; + + /** + * Decodes a ToolNameMatchSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolNameMatchSpec + * @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.ToolNameMatchSpec; + + /** + * Verifies a ToolNameMatchSpec 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 ToolNameMatchSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolNameMatchSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolNameMatchSpec; + + /** + * Creates a plain object from a ToolNameMatchSpec message. Also converts values to other types if specified. + * @param message ToolNameMatchSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolNameMatchSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolNameMatchSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolNameMatchSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolNameMatchInstance. */ + interface IToolNameMatchInstance { + + /** ToolNameMatchInstance prediction */ + prediction?: (string|null); + + /** ToolNameMatchInstance reference */ + reference?: (string|null); + } + + /** Represents a ToolNameMatchInstance. */ + class ToolNameMatchInstance implements IToolNameMatchInstance { + + /** + * Constructs a new ToolNameMatchInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchInstance); + + /** ToolNameMatchInstance prediction. */ + public prediction?: (string|null); + + /** ToolNameMatchInstance reference. */ + public reference?: (string|null); + + /** ToolNameMatchInstance _prediction. */ + public _prediction?: "prediction"; + + /** ToolNameMatchInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ToolNameMatchInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolNameMatchInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchInstance): google.cloud.aiplatform.v1beta1.ToolNameMatchInstance; + + /** + * Encodes the specified ToolNameMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.verify|verify} messages. + * @param message ToolNameMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolNameMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolNameMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.verify|verify} messages. + * @param message ToolNameMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolNameMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolNameMatchInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolNameMatchInstance + * @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.ToolNameMatchInstance; + + /** + * Decodes a ToolNameMatchInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolNameMatchInstance + * @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.ToolNameMatchInstance; + + /** + * Verifies a ToolNameMatchInstance 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 ToolNameMatchInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolNameMatchInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolNameMatchInstance; + + /** + * Creates a plain object from a ToolNameMatchInstance message. Also converts values to other types if specified. + * @param message ToolNameMatchInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolNameMatchInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolNameMatchInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolNameMatchInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolNameMatchResults. */ + interface IToolNameMatchResults { + + /** ToolNameMatchResults toolNameMatchMetricValues */ + toolNameMatchMetricValues?: (google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue[]|null); + } + + /** Represents a ToolNameMatchResults. */ + class ToolNameMatchResults implements IToolNameMatchResults { + + /** + * Constructs a new ToolNameMatchResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchResults); + + /** ToolNameMatchResults toolNameMatchMetricValues. */ + public toolNameMatchMetricValues: google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue[]; + + /** + * Creates a new ToolNameMatchResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolNameMatchResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchResults): google.cloud.aiplatform.v1beta1.ToolNameMatchResults; + + /** + * Encodes the specified ToolNameMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchResults.verify|verify} messages. + * @param message ToolNameMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolNameMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolNameMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchResults.verify|verify} messages. + * @param message ToolNameMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolNameMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolNameMatchResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolNameMatchResults + * @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.ToolNameMatchResults; + + /** + * Decodes a ToolNameMatchResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolNameMatchResults + * @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.ToolNameMatchResults; + + /** + * Verifies a ToolNameMatchResults 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 ToolNameMatchResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolNameMatchResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolNameMatchResults; + + /** + * Creates a plain object from a ToolNameMatchResults message. Also converts values to other types if specified. + * @param message ToolNameMatchResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolNameMatchResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolNameMatchResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolNameMatchResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolNameMatchMetricValue. */ + interface IToolNameMatchMetricValue { + + /** ToolNameMatchMetricValue score */ + score?: (number|null); + } + + /** Represents a ToolNameMatchMetricValue. */ + class ToolNameMatchMetricValue implements IToolNameMatchMetricValue { + + /** + * Constructs a new ToolNameMatchMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue); + + /** ToolNameMatchMetricValue score. */ + public score?: (number|null); + + /** ToolNameMatchMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new ToolNameMatchMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolNameMatchMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue): google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue; + + /** + * Encodes the specified ToolNameMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.verify|verify} messages. + * @param message ToolNameMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolNameMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.verify|verify} messages. + * @param message ToolNameMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolNameMatchMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolNameMatchMetricValue + * @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.ToolNameMatchMetricValue; + + /** + * Decodes a ToolNameMatchMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolNameMatchMetricValue + * @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.ToolNameMatchMetricValue; + + /** + * Verifies a ToolNameMatchMetricValue 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 ToolNameMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolNameMatchMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue; + + /** + * Creates a plain object from a ToolNameMatchMetricValue message. Also converts values to other types if specified. + * @param message ToolNameMatchMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolNameMatchMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolNameMatchMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKeyMatchInput. */ + interface IToolParameterKeyMatchInput { + + /** ToolParameterKeyMatchInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec|null); + + /** ToolParameterKeyMatchInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance[]|null); + } + + /** Represents a ToolParameterKeyMatchInput. */ + class ToolParameterKeyMatchInput implements IToolParameterKeyMatchInput { + + /** + * Constructs a new ToolParameterKeyMatchInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput); + + /** ToolParameterKeyMatchInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec|null); + + /** ToolParameterKeyMatchInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance[]; + + /** + * Creates a new ToolParameterKeyMatchInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKeyMatchInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput; + + /** + * Encodes the specified ToolParameterKeyMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.verify|verify} messages. + * @param message ToolParameterKeyMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKeyMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.verify|verify} messages. + * @param message ToolParameterKeyMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKeyMatchInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKeyMatchInput + * @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.ToolParameterKeyMatchInput; + + /** + * Decodes a ToolParameterKeyMatchInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKeyMatchInput + * @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.ToolParameterKeyMatchInput; + + /** + * Verifies a ToolParameterKeyMatchInput 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 ToolParameterKeyMatchInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKeyMatchInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput; + + /** + * Creates a plain object from a ToolParameterKeyMatchInput message. Also converts values to other types if specified. + * @param message ToolParameterKeyMatchInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKeyMatchInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKeyMatchInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKeyMatchSpec. */ + interface IToolParameterKeyMatchSpec { + } + + /** Represents a ToolParameterKeyMatchSpec. */ + class ToolParameterKeyMatchSpec implements IToolParameterKeyMatchSpec { + + /** + * Constructs a new ToolParameterKeyMatchSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec); + + /** + * Creates a new ToolParameterKeyMatchSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKeyMatchSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec; + + /** + * Encodes the specified ToolParameterKeyMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.verify|verify} messages. + * @param message ToolParameterKeyMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKeyMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.verify|verify} messages. + * @param message ToolParameterKeyMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKeyMatchSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKeyMatchSpec + * @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.ToolParameterKeyMatchSpec; + + /** + * Decodes a ToolParameterKeyMatchSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKeyMatchSpec + * @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.ToolParameterKeyMatchSpec; + + /** + * Verifies a ToolParameterKeyMatchSpec 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 ToolParameterKeyMatchSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKeyMatchSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec; + + /** + * Creates a plain object from a ToolParameterKeyMatchSpec message. Also converts values to other types if specified. + * @param message ToolParameterKeyMatchSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKeyMatchSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKeyMatchSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKeyMatchInstance. */ + interface IToolParameterKeyMatchInstance { + + /** ToolParameterKeyMatchInstance prediction */ + prediction?: (string|null); + + /** ToolParameterKeyMatchInstance reference */ + reference?: (string|null); + } + + /** Represents a ToolParameterKeyMatchInstance. */ + class ToolParameterKeyMatchInstance implements IToolParameterKeyMatchInstance { + + /** + * Constructs a new ToolParameterKeyMatchInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance); + + /** ToolParameterKeyMatchInstance prediction. */ + public prediction?: (string|null); + + /** ToolParameterKeyMatchInstance reference. */ + public reference?: (string|null); + + /** ToolParameterKeyMatchInstance _prediction. */ + public _prediction?: "prediction"; + + /** ToolParameterKeyMatchInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ToolParameterKeyMatchInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKeyMatchInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance; + + /** + * Encodes the specified ToolParameterKeyMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.verify|verify} messages. + * @param message ToolParameterKeyMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKeyMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.verify|verify} messages. + * @param message ToolParameterKeyMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKeyMatchInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKeyMatchInstance + * @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.ToolParameterKeyMatchInstance; + + /** + * Decodes a ToolParameterKeyMatchInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKeyMatchInstance + * @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.ToolParameterKeyMatchInstance; + + /** + * Verifies a ToolParameterKeyMatchInstance 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 ToolParameterKeyMatchInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKeyMatchInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance; + + /** + * Creates a plain object from a ToolParameterKeyMatchInstance message. Also converts values to other types if specified. + * @param message ToolParameterKeyMatchInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKeyMatchInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKeyMatchInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKeyMatchResults. */ + interface IToolParameterKeyMatchResults { + + /** ToolParameterKeyMatchResults toolParameterKeyMatchMetricValues */ + toolParameterKeyMatchMetricValues?: (google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue[]|null); + } + + /** Represents a ToolParameterKeyMatchResults. */ + class ToolParameterKeyMatchResults implements IToolParameterKeyMatchResults { + + /** + * Constructs a new ToolParameterKeyMatchResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults); + + /** ToolParameterKeyMatchResults toolParameterKeyMatchMetricValues. */ + public toolParameterKeyMatchMetricValues: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue[]; + + /** + * Creates a new ToolParameterKeyMatchResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKeyMatchResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults; + + /** + * Encodes the specified ToolParameterKeyMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.verify|verify} messages. + * @param message ToolParameterKeyMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKeyMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.verify|verify} messages. + * @param message ToolParameterKeyMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKeyMatchResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKeyMatchResults + * @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.ToolParameterKeyMatchResults; + + /** + * Decodes a ToolParameterKeyMatchResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKeyMatchResults + * @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.ToolParameterKeyMatchResults; + + /** + * Verifies a ToolParameterKeyMatchResults 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 ToolParameterKeyMatchResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKeyMatchResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults; + + /** + * Creates a plain object from a ToolParameterKeyMatchResults message. Also converts values to other types if specified. + * @param message ToolParameterKeyMatchResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKeyMatchResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKeyMatchResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKeyMatchMetricValue. */ + interface IToolParameterKeyMatchMetricValue { + + /** ToolParameterKeyMatchMetricValue score */ + score?: (number|null); + } + + /** Represents a ToolParameterKeyMatchMetricValue. */ + class ToolParameterKeyMatchMetricValue implements IToolParameterKeyMatchMetricValue { + + /** + * Constructs a new ToolParameterKeyMatchMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue); + + /** ToolParameterKeyMatchMetricValue score. */ + public score?: (number|null); + + /** ToolParameterKeyMatchMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new ToolParameterKeyMatchMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKeyMatchMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue; + + /** + * Encodes the specified ToolParameterKeyMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.verify|verify} messages. + * @param message ToolParameterKeyMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKeyMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.verify|verify} messages. + * @param message ToolParameterKeyMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKeyMatchMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKeyMatchMetricValue + * @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.ToolParameterKeyMatchMetricValue; + + /** + * Decodes a ToolParameterKeyMatchMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKeyMatchMetricValue + * @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.ToolParameterKeyMatchMetricValue; + + /** + * Verifies a ToolParameterKeyMatchMetricValue 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 ToolParameterKeyMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKeyMatchMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue; + + /** + * Creates a plain object from a ToolParameterKeyMatchMetricValue message. Also converts values to other types if specified. + * @param message ToolParameterKeyMatchMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKeyMatchMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKeyMatchMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKVMatchInput. */ + interface IToolParameterKVMatchInput { + + /** ToolParameterKVMatchInput metricSpec */ + metricSpec?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec|null); + + /** ToolParameterKVMatchInput instances */ + instances?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance[]|null); + } + + /** Represents a ToolParameterKVMatchInput. */ + class ToolParameterKVMatchInput implements IToolParameterKVMatchInput { + + /** + * Constructs a new ToolParameterKVMatchInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput); + + /** ToolParameterKVMatchInput metricSpec. */ + public metricSpec?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec|null); + + /** ToolParameterKVMatchInput instances. */ + public instances: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance[]; + + /** + * Creates a new ToolParameterKVMatchInput instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKVMatchInput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput; + + /** + * Encodes the specified ToolParameterKVMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.verify|verify} messages. + * @param message ToolParameterKVMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKVMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.verify|verify} messages. + * @param message ToolParameterKVMatchInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKVMatchInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKVMatchInput + * @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.ToolParameterKVMatchInput; + + /** + * Decodes a ToolParameterKVMatchInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKVMatchInput + * @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.ToolParameterKVMatchInput; + + /** + * Verifies a ToolParameterKVMatchInput 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 ToolParameterKVMatchInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKVMatchInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput; + + /** + * Creates a plain object from a ToolParameterKVMatchInput message. Also converts values to other types if specified. + * @param message ToolParameterKVMatchInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKVMatchInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKVMatchInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKVMatchSpec. */ + interface IToolParameterKVMatchSpec { + + /** ToolParameterKVMatchSpec useStrictStringMatch */ + useStrictStringMatch?: (boolean|null); + } + + /** Represents a ToolParameterKVMatchSpec. */ + class ToolParameterKVMatchSpec implements IToolParameterKVMatchSpec { + + /** + * Constructs a new ToolParameterKVMatchSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec); + + /** ToolParameterKVMatchSpec useStrictStringMatch. */ + public useStrictStringMatch: boolean; + + /** + * Creates a new ToolParameterKVMatchSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKVMatchSpec instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec; + + /** + * Encodes the specified ToolParameterKVMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.verify|verify} messages. + * @param message ToolParameterKVMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKVMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.verify|verify} messages. + * @param message ToolParameterKVMatchSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKVMatchSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKVMatchSpec + * @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.ToolParameterKVMatchSpec; + + /** + * Decodes a ToolParameterKVMatchSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKVMatchSpec + * @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.ToolParameterKVMatchSpec; + + /** + * Verifies a ToolParameterKVMatchSpec 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 ToolParameterKVMatchSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKVMatchSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec; + + /** + * Creates a plain object from a ToolParameterKVMatchSpec message. Also converts values to other types if specified. + * @param message ToolParameterKVMatchSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKVMatchSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKVMatchSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKVMatchInstance. */ + interface IToolParameterKVMatchInstance { + + /** ToolParameterKVMatchInstance prediction */ + prediction?: (string|null); + + /** ToolParameterKVMatchInstance reference */ + reference?: (string|null); + } + + /** Represents a ToolParameterKVMatchInstance. */ + class ToolParameterKVMatchInstance implements IToolParameterKVMatchInstance { + + /** + * Constructs a new ToolParameterKVMatchInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance); + + /** ToolParameterKVMatchInstance prediction. */ + public prediction?: (string|null); + + /** ToolParameterKVMatchInstance reference. */ + public reference?: (string|null); + + /** ToolParameterKVMatchInstance _prediction. */ + public _prediction?: "prediction"; + + /** ToolParameterKVMatchInstance _reference. */ + public _reference?: "reference"; + + /** + * Creates a new ToolParameterKVMatchInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKVMatchInstance instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance; + + /** + * Encodes the specified ToolParameterKVMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.verify|verify} messages. + * @param message ToolParameterKVMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKVMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.verify|verify} messages. + * @param message ToolParameterKVMatchInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKVMatchInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKVMatchInstance + * @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.ToolParameterKVMatchInstance; + + /** + * Decodes a ToolParameterKVMatchInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKVMatchInstance + * @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.ToolParameterKVMatchInstance; + + /** + * Verifies a ToolParameterKVMatchInstance 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 ToolParameterKVMatchInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKVMatchInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance; + + /** + * Creates a plain object from a ToolParameterKVMatchInstance message. Also converts values to other types if specified. + * @param message ToolParameterKVMatchInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKVMatchInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKVMatchInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKVMatchResults. */ + interface IToolParameterKVMatchResults { + + /** ToolParameterKVMatchResults toolParameterKvMatchMetricValues */ + toolParameterKvMatchMetricValues?: (google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue[]|null); + } + + /** Represents a ToolParameterKVMatchResults. */ + class ToolParameterKVMatchResults implements IToolParameterKVMatchResults { + + /** + * Constructs a new ToolParameterKVMatchResults. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults); + + /** ToolParameterKVMatchResults toolParameterKvMatchMetricValues. */ + public toolParameterKvMatchMetricValues: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue[]; + + /** + * Creates a new ToolParameterKVMatchResults instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKVMatchResults instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults; + + /** + * Encodes the specified ToolParameterKVMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.verify|verify} messages. + * @param message ToolParameterKVMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKVMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.verify|verify} messages. + * @param message ToolParameterKVMatchResults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKVMatchResults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKVMatchResults + * @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.ToolParameterKVMatchResults; + + /** + * Decodes a ToolParameterKVMatchResults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKVMatchResults + * @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.ToolParameterKVMatchResults; + + /** + * Verifies a ToolParameterKVMatchResults 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 ToolParameterKVMatchResults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKVMatchResults + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults; + + /** + * Creates a plain object from a ToolParameterKVMatchResults message. Also converts values to other types if specified. + * @param message ToolParameterKVMatchResults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKVMatchResults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKVMatchResults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ToolParameterKVMatchMetricValue. */ + interface IToolParameterKVMatchMetricValue { + + /** ToolParameterKVMatchMetricValue score */ + score?: (number|null); + } + + /** Represents a ToolParameterKVMatchMetricValue. */ + class ToolParameterKVMatchMetricValue implements IToolParameterKVMatchMetricValue { + + /** + * Constructs a new ToolParameterKVMatchMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue); + + /** ToolParameterKVMatchMetricValue score. */ + public score?: (number|null); + + /** ToolParameterKVMatchMetricValue _score. */ + public _score?: "score"; + + /** + * Creates a new ToolParameterKVMatchMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns ToolParameterKVMatchMetricValue instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue; + + /** + * Encodes the specified ToolParameterKVMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.verify|verify} messages. + * @param message ToolParameterKVMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ToolParameterKVMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.verify|verify} messages. + * @param message ToolParameterKVMatchMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ToolParameterKVMatchMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ToolParameterKVMatchMetricValue + * @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.ToolParameterKVMatchMetricValue; + + /** + * Decodes a ToolParameterKVMatchMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ToolParameterKVMatchMetricValue + * @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.ToolParameterKVMatchMetricValue; + + /** + * Verifies a ToolParameterKVMatchMetricValue 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 ToolParameterKVMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ToolParameterKVMatchMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue; + + /** + * Creates a plain object from a ToolParameterKVMatchMetricValue message. Also converts values to other types if specified. + * @param message ToolParameterKVMatchMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ToolParameterKVMatchMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ToolParameterKVMatchMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an Event. */ interface IEvent { diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index e0b417cae38..a0f8d4436f6 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -298575,6 +298575,26741 @@ return ErrorAnalysisAnnotation; })(); + v1beta1.EvaluationService = (function() { + + /** + * Constructs a new EvaluationService service. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EvaluationService + * @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 EvaluationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (EvaluationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = EvaluationService; + + /** + * Creates new EvaluationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EvaluationService + * @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 {EvaluationService} RPC service. Useful where requests and/or responses are streamed. + */ + EvaluationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.aiplatform.v1beta1.EvaluationService|evaluateInstances}. + * @memberof google.cloud.aiplatform.v1beta1.EvaluationService + * @typedef EvaluateInstancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse} [response] EvaluateInstancesResponse + */ + + /** + * Calls EvaluateInstances. + * @function evaluateInstances + * @memberof google.cloud.aiplatform.v1beta1.EvaluationService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest} request EvaluateInstancesRequest message or plain object + * @param {google.cloud.aiplatform.v1beta1.EvaluationService.EvaluateInstancesCallback} callback Node-style callback called with the error, if any, and EvaluateInstancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(EvaluationService.prototype.evaluateInstances = function evaluateInstances(request, callback) { + return this.rpcCall(evaluateInstances, $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest, $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse, request, callback); + }, "name", { value: "EvaluateInstances" }); + + /** + * Calls EvaluateInstances. + * @function evaluateInstances + * @memberof google.cloud.aiplatform.v1beta1.EvaluationService + * @instance + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest} request EvaluateInstancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return EvaluationService; + })(); + + /** + * PairwiseChoice enum. + * @name google.cloud.aiplatform.v1beta1.PairwiseChoice + * @enum {number} + * @property {number} PAIRWISE_CHOICE_UNSPECIFIED=0 PAIRWISE_CHOICE_UNSPECIFIED value + * @property {number} BASELINE=1 BASELINE value + * @property {number} CANDIDATE=2 CANDIDATE value + * @property {number} TIE=3 TIE value + */ + v1beta1.PairwiseChoice = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PAIRWISE_CHOICE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASELINE"] = 1; + values[valuesById[2] = "CANDIDATE"] = 2; + values[valuesById[3] = "TIE"] = 3; + return values; + })(); + + v1beta1.EvaluateInstancesRequest = (function() { + + /** + * Properties of an EvaluateInstancesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEvaluateInstancesRequest + * @property {google.cloud.aiplatform.v1beta1.IExactMatchInput|null} [exactMatchInput] EvaluateInstancesRequest exactMatchInput + * @property {google.cloud.aiplatform.v1beta1.IBleuInput|null} [bleuInput] EvaluateInstancesRequest bleuInput + * @property {google.cloud.aiplatform.v1beta1.IRougeInput|null} [rougeInput] EvaluateInstancesRequest rougeInput + * @property {google.cloud.aiplatform.v1beta1.IFluencyInput|null} [fluencyInput] EvaluateInstancesRequest fluencyInput + * @property {google.cloud.aiplatform.v1beta1.ICoherenceInput|null} [coherenceInput] EvaluateInstancesRequest coherenceInput + * @property {google.cloud.aiplatform.v1beta1.ISafetyInput|null} [safetyInput] EvaluateInstancesRequest safetyInput + * @property {google.cloud.aiplatform.v1beta1.IGroundednessInput|null} [groundednessInput] EvaluateInstancesRequest groundednessInput + * @property {google.cloud.aiplatform.v1beta1.IFulfillmentInput|null} [fulfillmentInput] EvaluateInstancesRequest fulfillmentInput + * @property {google.cloud.aiplatform.v1beta1.IResponseRecallInput|null} [responseRecallInput] EvaluateInstancesRequest responseRecallInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput|null} [summarizationQualityInput] EvaluateInstancesRequest summarizationQualityInput + * @property {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput|null} [pairwiseSummarizationQualityInput] EvaluateInstancesRequest pairwiseSummarizationQualityInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput|null} [summarizationHelpfulnessInput] EvaluateInstancesRequest summarizationHelpfulnessInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput|null} [summarizationVerbosityInput] EvaluateInstancesRequest summarizationVerbosityInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput|null} [questionAnsweringQualityInput] EvaluateInstancesRequest questionAnsweringQualityInput + * @property {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput|null} [pairwiseQuestionAnsweringQualityInput] EvaluateInstancesRequest pairwiseQuestionAnsweringQualityInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput|null} [questionAnsweringRelevanceInput] EvaluateInstancesRequest questionAnsweringRelevanceInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput|null} [questionAnsweringHelpfulnessInput] EvaluateInstancesRequest questionAnsweringHelpfulnessInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput|null} [questionAnsweringCorrectnessInput] EvaluateInstancesRequest questionAnsweringCorrectnessInput + * @property {google.cloud.aiplatform.v1beta1.IRagContextRecallInput|null} [ragContextRecallInput] EvaluateInstancesRequest ragContextRecallInput + * @property {google.cloud.aiplatform.v1beta1.IToolCallValidInput|null} [toolCallValidInput] EvaluateInstancesRequest toolCallValidInput + * @property {google.cloud.aiplatform.v1beta1.IToolNameMatchInput|null} [toolNameMatchInput] EvaluateInstancesRequest toolNameMatchInput + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput|null} [toolParameterKeyMatchInput] EvaluateInstancesRequest toolParameterKeyMatchInput + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput|null} [toolParameterKvMatchInput] EvaluateInstancesRequest toolParameterKvMatchInput + * @property {string|null} [location] EvaluateInstancesRequest location + */ + + /** + * Constructs a new EvaluateInstancesRequest. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EvaluateInstancesRequest. + * @implements IEvaluateInstancesRequest + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest=} [properties] Properties to set + */ + function EvaluateInstancesRequest(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]]; + } + + /** + * EvaluateInstancesRequest exactMatchInput. + * @member {google.cloud.aiplatform.v1beta1.IExactMatchInput|null|undefined} exactMatchInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.exactMatchInput = null; + + /** + * EvaluateInstancesRequest bleuInput. + * @member {google.cloud.aiplatform.v1beta1.IBleuInput|null|undefined} bleuInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.bleuInput = null; + + /** + * EvaluateInstancesRequest rougeInput. + * @member {google.cloud.aiplatform.v1beta1.IRougeInput|null|undefined} rougeInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.rougeInput = null; + + /** + * EvaluateInstancesRequest fluencyInput. + * @member {google.cloud.aiplatform.v1beta1.IFluencyInput|null|undefined} fluencyInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.fluencyInput = null; + + /** + * EvaluateInstancesRequest coherenceInput. + * @member {google.cloud.aiplatform.v1beta1.ICoherenceInput|null|undefined} coherenceInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.coherenceInput = null; + + /** + * EvaluateInstancesRequest safetyInput. + * @member {google.cloud.aiplatform.v1beta1.ISafetyInput|null|undefined} safetyInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.safetyInput = null; + + /** + * EvaluateInstancesRequest groundednessInput. + * @member {google.cloud.aiplatform.v1beta1.IGroundednessInput|null|undefined} groundednessInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.groundednessInput = null; + + /** + * EvaluateInstancesRequest fulfillmentInput. + * @member {google.cloud.aiplatform.v1beta1.IFulfillmentInput|null|undefined} fulfillmentInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.fulfillmentInput = null; + + /** + * EvaluateInstancesRequest responseRecallInput. + * @member {google.cloud.aiplatform.v1beta1.IResponseRecallInput|null|undefined} responseRecallInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.responseRecallInput = null; + + /** + * EvaluateInstancesRequest summarizationQualityInput. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput|null|undefined} summarizationQualityInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.summarizationQualityInput = null; + + /** + * EvaluateInstancesRequest pairwiseSummarizationQualityInput. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput|null|undefined} pairwiseSummarizationQualityInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.pairwiseSummarizationQualityInput = null; + + /** + * EvaluateInstancesRequest summarizationHelpfulnessInput. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput|null|undefined} summarizationHelpfulnessInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.summarizationHelpfulnessInput = null; + + /** + * EvaluateInstancesRequest summarizationVerbosityInput. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput|null|undefined} summarizationVerbosityInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.summarizationVerbosityInput = null; + + /** + * EvaluateInstancesRequest questionAnsweringQualityInput. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput|null|undefined} questionAnsweringQualityInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.questionAnsweringQualityInput = null; + + /** + * EvaluateInstancesRequest pairwiseQuestionAnsweringQualityInput. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput|null|undefined} pairwiseQuestionAnsweringQualityInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.pairwiseQuestionAnsweringQualityInput = null; + + /** + * EvaluateInstancesRequest questionAnsweringRelevanceInput. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput|null|undefined} questionAnsweringRelevanceInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.questionAnsweringRelevanceInput = null; + + /** + * EvaluateInstancesRequest questionAnsweringHelpfulnessInput. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput|null|undefined} questionAnsweringHelpfulnessInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.questionAnsweringHelpfulnessInput = null; + + /** + * EvaluateInstancesRequest questionAnsweringCorrectnessInput. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput|null|undefined} questionAnsweringCorrectnessInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.questionAnsweringCorrectnessInput = null; + + /** + * EvaluateInstancesRequest ragContextRecallInput. + * @member {google.cloud.aiplatform.v1beta1.IRagContextRecallInput|null|undefined} ragContextRecallInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.ragContextRecallInput = null; + + /** + * EvaluateInstancesRequest toolCallValidInput. + * @member {google.cloud.aiplatform.v1beta1.IToolCallValidInput|null|undefined} toolCallValidInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.toolCallValidInput = null; + + /** + * EvaluateInstancesRequest toolNameMatchInput. + * @member {google.cloud.aiplatform.v1beta1.IToolNameMatchInput|null|undefined} toolNameMatchInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.toolNameMatchInput = null; + + /** + * EvaluateInstancesRequest toolParameterKeyMatchInput. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput|null|undefined} toolParameterKeyMatchInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.toolParameterKeyMatchInput = null; + + /** + * EvaluateInstancesRequest toolParameterKvMatchInput. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput|null|undefined} toolParameterKvMatchInput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.toolParameterKvMatchInput = null; + + /** + * EvaluateInstancesRequest location. + * @member {string} location + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + EvaluateInstancesRequest.prototype.location = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EvaluateInstancesRequest metricInputs. + * @member {"exactMatchInput"|"bleuInput"|"rougeInput"|"fluencyInput"|"coherenceInput"|"safetyInput"|"groundednessInput"|"fulfillmentInput"|"responseRecallInput"|"summarizationQualityInput"|"pairwiseSummarizationQualityInput"|"summarizationHelpfulnessInput"|"summarizationVerbosityInput"|"questionAnsweringQualityInput"|"pairwiseQuestionAnsweringQualityInput"|"questionAnsweringRelevanceInput"|"questionAnsweringHelpfulnessInput"|"questionAnsweringCorrectnessInput"|"ragContextRecallInput"|"toolCallValidInput"|"toolNameMatchInput"|"toolParameterKeyMatchInput"|"toolParameterKvMatchInput"|undefined} metricInputs + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + */ + Object.defineProperty(EvaluateInstancesRequest.prototype, "metricInputs", { + get: $util.oneOfGetter($oneOfFields = ["exactMatchInput", "bleuInput", "rougeInput", "fluencyInput", "coherenceInput", "safetyInput", "groundednessInput", "fulfillmentInput", "responseRecallInput", "summarizationQualityInput", "pairwiseSummarizationQualityInput", "summarizationHelpfulnessInput", "summarizationVerbosityInput", "questionAnsweringQualityInput", "pairwiseQuestionAnsweringQualityInput", "questionAnsweringRelevanceInput", "questionAnsweringHelpfulnessInput", "questionAnsweringCorrectnessInput", "ragContextRecallInput", "toolCallValidInput", "toolNameMatchInput", "toolParameterKeyMatchInput", "toolParameterKvMatchInput"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EvaluateInstancesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest} EvaluateInstancesRequest instance + */ + EvaluateInstancesRequest.create = function create(properties) { + return new EvaluateInstancesRequest(properties); + }; + + /** + * Encodes the specified EvaluateInstancesRequest message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest} message EvaluateInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateInstancesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.exactMatchInput != null && Object.hasOwnProperty.call(message, "exactMatchInput")) + $root.google.cloud.aiplatform.v1beta1.ExactMatchInput.encode(message.exactMatchInput, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bleuInput != null && Object.hasOwnProperty.call(message, "bleuInput")) + $root.google.cloud.aiplatform.v1beta1.BleuInput.encode(message.bleuInput, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rougeInput != null && Object.hasOwnProperty.call(message, "rougeInput")) + $root.google.cloud.aiplatform.v1beta1.RougeInput.encode(message.rougeInput, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fluencyInput != null && Object.hasOwnProperty.call(message, "fluencyInput")) + $root.google.cloud.aiplatform.v1beta1.FluencyInput.encode(message.fluencyInput, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.coherenceInput != null && Object.hasOwnProperty.call(message, "coherenceInput")) + $root.google.cloud.aiplatform.v1beta1.CoherenceInput.encode(message.coherenceInput, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.summarizationQualityInput != null && Object.hasOwnProperty.call(message, "summarizationQualityInput")) + $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.encode(message.summarizationQualityInput, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.safetyInput != null && Object.hasOwnProperty.call(message, "safetyInput")) + $root.google.cloud.aiplatform.v1beta1.SafetyInput.encode(message.safetyInput, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.groundednessInput != null && Object.hasOwnProperty.call(message, "groundednessInput")) + $root.google.cloud.aiplatform.v1beta1.GroundednessInput.encode(message.groundednessInput, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.questionAnsweringQualityInput != null && Object.hasOwnProperty.call(message, "questionAnsweringQualityInput")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.encode(message.questionAnsweringQualityInput, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.ragContextRecallInput != null && Object.hasOwnProperty.call(message, "ragContextRecallInput")) + $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput.encode(message.ragContextRecallInput, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.fulfillmentInput != null && Object.hasOwnProperty.call(message, "fulfillmentInput")) + $root.google.cloud.aiplatform.v1beta1.FulfillmentInput.encode(message.fulfillmentInput, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.responseRecallInput != null && Object.hasOwnProperty.call(message, "responseRecallInput")) + $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput.encode(message.responseRecallInput, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.summarizationHelpfulnessInput != null && Object.hasOwnProperty.call(message, "summarizationHelpfulnessInput")) + $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.encode(message.summarizationHelpfulnessInput, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.summarizationVerbosityInput != null && Object.hasOwnProperty.call(message, "summarizationVerbosityInput")) + $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.encode(message.summarizationVerbosityInput, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.questionAnsweringRelevanceInput != null && Object.hasOwnProperty.call(message, "questionAnsweringRelevanceInput")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.encode(message.questionAnsweringRelevanceInput, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.questionAnsweringHelpfulnessInput != null && Object.hasOwnProperty.call(message, "questionAnsweringHelpfulnessInput")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.encode(message.questionAnsweringHelpfulnessInput, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.questionAnsweringCorrectnessInput != null && Object.hasOwnProperty.call(message, "questionAnsweringCorrectnessInput")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.encode(message.questionAnsweringCorrectnessInput, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.toolCallValidInput != null && Object.hasOwnProperty.call(message, "toolCallValidInput")) + $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput.encode(message.toolCallValidInput, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.toolNameMatchInput != null && Object.hasOwnProperty.call(message, "toolNameMatchInput")) + $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput.encode(message.toolNameMatchInput, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.toolParameterKeyMatchInput != null && Object.hasOwnProperty.call(message, "toolParameterKeyMatchInput")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.encode(message.toolParameterKeyMatchInput, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.toolParameterKvMatchInput != null && Object.hasOwnProperty.call(message, "toolParameterKvMatchInput")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.encode(message.toolParameterKvMatchInput, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.pairwiseSummarizationQualityInput != null && Object.hasOwnProperty.call(message, "pairwiseSummarizationQualityInput")) + $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.encode(message.pairwiseSummarizationQualityInput, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pairwiseQuestionAnsweringQualityInput != null && Object.hasOwnProperty.call(message, "pairwiseQuestionAnsweringQualityInput")) + $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.encode(message.pairwiseQuestionAnsweringQualityInput, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluateInstancesRequest message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest} message EvaluateInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateInstancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluateInstancesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @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.EvaluateInstancesRequest} EvaluateInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateInstancesRequest.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.EvaluateInstancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.exactMatchInput = $root.google.cloud.aiplatform.v1beta1.ExactMatchInput.decode(reader, reader.uint32()); + break; + } + case 3: { + message.bleuInput = $root.google.cloud.aiplatform.v1beta1.BleuInput.decode(reader, reader.uint32()); + break; + } + case 4: { + message.rougeInput = $root.google.cloud.aiplatform.v1beta1.RougeInput.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fluencyInput = $root.google.cloud.aiplatform.v1beta1.FluencyInput.decode(reader, reader.uint32()); + break; + } + case 6: { + message.coherenceInput = $root.google.cloud.aiplatform.v1beta1.CoherenceInput.decode(reader, reader.uint32()); + break; + } + case 8: { + message.safetyInput = $root.google.cloud.aiplatform.v1beta1.SafetyInput.decode(reader, reader.uint32()); + break; + } + case 9: { + message.groundednessInput = $root.google.cloud.aiplatform.v1beta1.GroundednessInput.decode(reader, reader.uint32()); + break; + } + case 12: { + message.fulfillmentInput = $root.google.cloud.aiplatform.v1beta1.FulfillmentInput.decode(reader, reader.uint32()); + break; + } + case 13: { + message.responseRecallInput = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput.decode(reader, reader.uint32()); + break; + } + case 7: { + message.summarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.decode(reader, reader.uint32()); + break; + } + case 23: { + message.pairwiseSummarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.decode(reader, reader.uint32()); + break; + } + case 14: { + message.summarizationHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.decode(reader, reader.uint32()); + break; + } + case 15: { + message.summarizationVerbosityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.decode(reader, reader.uint32()); + break; + } + case 10: { + message.questionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pairwiseQuestionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.decode(reader, reader.uint32()); + break; + } + case 16: { + message.questionAnsweringRelevanceInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.decode(reader, reader.uint32()); + break; + } + case 17: { + message.questionAnsweringHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.decode(reader, reader.uint32()); + break; + } + case 18: { + message.questionAnsweringCorrectnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.decode(reader, reader.uint32()); + break; + } + case 11: { + message.ragContextRecallInput = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput.decode(reader, reader.uint32()); + break; + } + case 19: { + message.toolCallValidInput = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput.decode(reader, reader.uint32()); + break; + } + case 20: { + message.toolNameMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput.decode(reader, reader.uint32()); + break; + } + case 21: { + message.toolParameterKeyMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.decode(reader, reader.uint32()); + break; + } + case 22: { + message.toolParameterKvMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.decode(reader, reader.uint32()); + break; + } + case 1: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluateInstancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest} EvaluateInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateInstancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluateInstancesRequest message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluateInstancesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exactMatchInput != null && message.hasOwnProperty("exactMatchInput")) { + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchInput.verify(message.exactMatchInput); + if (error) + return "exactMatchInput." + error; + } + } + if (message.bleuInput != null && message.hasOwnProperty("bleuInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.BleuInput.verify(message.bleuInput); + if (error) + return "bleuInput." + error; + } + } + if (message.rougeInput != null && message.hasOwnProperty("rougeInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.RougeInput.verify(message.rougeInput); + if (error) + return "rougeInput." + error; + } + } + if (message.fluencyInput != null && message.hasOwnProperty("fluencyInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FluencyInput.verify(message.fluencyInput); + if (error) + return "fluencyInput." + error; + } + } + if (message.coherenceInput != null && message.hasOwnProperty("coherenceInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.CoherenceInput.verify(message.coherenceInput); + if (error) + return "coherenceInput." + error; + } + } + if (message.safetyInput != null && message.hasOwnProperty("safetyInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SafetyInput.verify(message.safetyInput); + if (error) + return "safetyInput." + error; + } + } + if (message.groundednessInput != null && message.hasOwnProperty("groundednessInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.GroundednessInput.verify(message.groundednessInput); + if (error) + return "groundednessInput." + error; + } + } + if (message.fulfillmentInput != null && message.hasOwnProperty("fulfillmentInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FulfillmentInput.verify(message.fulfillmentInput); + if (error) + return "fulfillmentInput." + error; + } + } + if (message.responseRecallInput != null && message.hasOwnProperty("responseRecallInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput.verify(message.responseRecallInput); + if (error) + return "responseRecallInput." + error; + } + } + if (message.summarizationQualityInput != null && message.hasOwnProperty("summarizationQualityInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.verify(message.summarizationQualityInput); + if (error) + return "summarizationQualityInput." + error; + } + } + if (message.pairwiseSummarizationQualityInput != null && message.hasOwnProperty("pairwiseSummarizationQualityInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.verify(message.pairwiseSummarizationQualityInput); + if (error) + return "pairwiseSummarizationQualityInput." + error; + } + } + if (message.summarizationHelpfulnessInput != null && message.hasOwnProperty("summarizationHelpfulnessInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.verify(message.summarizationHelpfulnessInput); + if (error) + return "summarizationHelpfulnessInput." + error; + } + } + if (message.summarizationVerbosityInput != null && message.hasOwnProperty("summarizationVerbosityInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.verify(message.summarizationVerbosityInput); + if (error) + return "summarizationVerbosityInput." + error; + } + } + if (message.questionAnsweringQualityInput != null && message.hasOwnProperty("questionAnsweringQualityInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.verify(message.questionAnsweringQualityInput); + if (error) + return "questionAnsweringQualityInput." + error; + } + } + if (message.pairwiseQuestionAnsweringQualityInput != null && message.hasOwnProperty("pairwiseQuestionAnsweringQualityInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.verify(message.pairwiseQuestionAnsweringQualityInput); + if (error) + return "pairwiseQuestionAnsweringQualityInput." + error; + } + } + if (message.questionAnsweringRelevanceInput != null && message.hasOwnProperty("questionAnsweringRelevanceInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.verify(message.questionAnsweringRelevanceInput); + if (error) + return "questionAnsweringRelevanceInput." + error; + } + } + if (message.questionAnsweringHelpfulnessInput != null && message.hasOwnProperty("questionAnsweringHelpfulnessInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.verify(message.questionAnsweringHelpfulnessInput); + if (error) + return "questionAnsweringHelpfulnessInput." + error; + } + } + if (message.questionAnsweringCorrectnessInput != null && message.hasOwnProperty("questionAnsweringCorrectnessInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.verify(message.questionAnsweringCorrectnessInput); + if (error) + return "questionAnsweringCorrectnessInput." + error; + } + } + if (message.ragContextRecallInput != null && message.hasOwnProperty("ragContextRecallInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput.verify(message.ragContextRecallInput); + if (error) + return "ragContextRecallInput." + error; + } + } + if (message.toolCallValidInput != null && message.hasOwnProperty("toolCallValidInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput.verify(message.toolCallValidInput); + if (error) + return "toolCallValidInput." + error; + } + } + if (message.toolNameMatchInput != null && message.hasOwnProperty("toolNameMatchInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput.verify(message.toolNameMatchInput); + if (error) + return "toolNameMatchInput." + error; + } + } + if (message.toolParameterKeyMatchInput != null && message.hasOwnProperty("toolParameterKeyMatchInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.verify(message.toolParameterKeyMatchInput); + if (error) + return "toolParameterKeyMatchInput." + error; + } + } + if (message.toolParameterKvMatchInput != null && message.hasOwnProperty("toolParameterKvMatchInput")) { + if (properties.metricInputs === 1) + return "metricInputs: multiple values"; + properties.metricInputs = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.verify(message.toolParameterKvMatchInput); + if (error) + return "toolParameterKvMatchInput." + error; + } + } + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an EvaluateInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest} EvaluateInstancesRequest + */ + EvaluateInstancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest(); + if (object.exactMatchInput != null) { + if (typeof object.exactMatchInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.exactMatchInput: object expected"); + message.exactMatchInput = $root.google.cloud.aiplatform.v1beta1.ExactMatchInput.fromObject(object.exactMatchInput); + } + if (object.bleuInput != null) { + if (typeof object.bleuInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.bleuInput: object expected"); + message.bleuInput = $root.google.cloud.aiplatform.v1beta1.BleuInput.fromObject(object.bleuInput); + } + if (object.rougeInput != null) { + if (typeof object.rougeInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.rougeInput: object expected"); + message.rougeInput = $root.google.cloud.aiplatform.v1beta1.RougeInput.fromObject(object.rougeInput); + } + if (object.fluencyInput != null) { + if (typeof object.fluencyInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.fluencyInput: object expected"); + message.fluencyInput = $root.google.cloud.aiplatform.v1beta1.FluencyInput.fromObject(object.fluencyInput); + } + if (object.coherenceInput != null) { + if (typeof object.coherenceInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.coherenceInput: object expected"); + message.coherenceInput = $root.google.cloud.aiplatform.v1beta1.CoherenceInput.fromObject(object.coherenceInput); + } + if (object.safetyInput != null) { + if (typeof object.safetyInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.safetyInput: object expected"); + message.safetyInput = $root.google.cloud.aiplatform.v1beta1.SafetyInput.fromObject(object.safetyInput); + } + if (object.groundednessInput != null) { + if (typeof object.groundednessInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.groundednessInput: object expected"); + message.groundednessInput = $root.google.cloud.aiplatform.v1beta1.GroundednessInput.fromObject(object.groundednessInput); + } + if (object.fulfillmentInput != null) { + if (typeof object.fulfillmentInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.fulfillmentInput: object expected"); + message.fulfillmentInput = $root.google.cloud.aiplatform.v1beta1.FulfillmentInput.fromObject(object.fulfillmentInput); + } + if (object.responseRecallInput != null) { + if (typeof object.responseRecallInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.responseRecallInput: object expected"); + message.responseRecallInput = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput.fromObject(object.responseRecallInput); + } + if (object.summarizationQualityInput != null) { + if (typeof object.summarizationQualityInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.summarizationQualityInput: object expected"); + message.summarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.fromObject(object.summarizationQualityInput); + } + if (object.pairwiseSummarizationQualityInput != null) { + if (typeof object.pairwiseSummarizationQualityInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.pairwiseSummarizationQualityInput: object expected"); + message.pairwiseSummarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.fromObject(object.pairwiseSummarizationQualityInput); + } + if (object.summarizationHelpfulnessInput != null) { + if (typeof object.summarizationHelpfulnessInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.summarizationHelpfulnessInput: object expected"); + message.summarizationHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.fromObject(object.summarizationHelpfulnessInput); + } + if (object.summarizationVerbosityInput != null) { + if (typeof object.summarizationVerbosityInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.summarizationVerbosityInput: object expected"); + message.summarizationVerbosityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.fromObject(object.summarizationVerbosityInput); + } + if (object.questionAnsweringQualityInput != null) { + if (typeof object.questionAnsweringQualityInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.questionAnsweringQualityInput: object expected"); + message.questionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.fromObject(object.questionAnsweringQualityInput); + } + if (object.pairwiseQuestionAnsweringQualityInput != null) { + if (typeof object.pairwiseQuestionAnsweringQualityInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.pairwiseQuestionAnsweringQualityInput: object expected"); + message.pairwiseQuestionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.fromObject(object.pairwiseQuestionAnsweringQualityInput); + } + if (object.questionAnsweringRelevanceInput != null) { + if (typeof object.questionAnsweringRelevanceInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.questionAnsweringRelevanceInput: object expected"); + message.questionAnsweringRelevanceInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.fromObject(object.questionAnsweringRelevanceInput); + } + if (object.questionAnsweringHelpfulnessInput != null) { + if (typeof object.questionAnsweringHelpfulnessInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.questionAnsweringHelpfulnessInput: object expected"); + message.questionAnsweringHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.fromObject(object.questionAnsweringHelpfulnessInput); + } + if (object.questionAnsweringCorrectnessInput != null) { + if (typeof object.questionAnsweringCorrectnessInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.questionAnsweringCorrectnessInput: object expected"); + message.questionAnsweringCorrectnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.fromObject(object.questionAnsweringCorrectnessInput); + } + if (object.ragContextRecallInput != null) { + if (typeof object.ragContextRecallInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.ragContextRecallInput: object expected"); + message.ragContextRecallInput = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput.fromObject(object.ragContextRecallInput); + } + if (object.toolCallValidInput != null) { + if (typeof object.toolCallValidInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.toolCallValidInput: object expected"); + message.toolCallValidInput = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput.fromObject(object.toolCallValidInput); + } + if (object.toolNameMatchInput != null) { + if (typeof object.toolNameMatchInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.toolNameMatchInput: object expected"); + message.toolNameMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput.fromObject(object.toolNameMatchInput); + } + if (object.toolParameterKeyMatchInput != null) { + if (typeof object.toolParameterKeyMatchInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.toolParameterKeyMatchInput: object expected"); + message.toolParameterKeyMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.fromObject(object.toolParameterKeyMatchInput); + } + if (object.toolParameterKvMatchInput != null) { + if (typeof object.toolParameterKvMatchInput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest.toolParameterKvMatchInput: object expected"); + message.toolParameterKvMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.fromObject(object.toolParameterKvMatchInput); + } + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an EvaluateInstancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest} message EvaluateInstancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluateInstancesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.exactMatchInput != null && message.hasOwnProperty("exactMatchInput")) { + object.exactMatchInput = $root.google.cloud.aiplatform.v1beta1.ExactMatchInput.toObject(message.exactMatchInput, options); + if (options.oneofs) + object.metricInputs = "exactMatchInput"; + } + if (message.bleuInput != null && message.hasOwnProperty("bleuInput")) { + object.bleuInput = $root.google.cloud.aiplatform.v1beta1.BleuInput.toObject(message.bleuInput, options); + if (options.oneofs) + object.metricInputs = "bleuInput"; + } + if (message.rougeInput != null && message.hasOwnProperty("rougeInput")) { + object.rougeInput = $root.google.cloud.aiplatform.v1beta1.RougeInput.toObject(message.rougeInput, options); + if (options.oneofs) + object.metricInputs = "rougeInput"; + } + if (message.fluencyInput != null && message.hasOwnProperty("fluencyInput")) { + object.fluencyInput = $root.google.cloud.aiplatform.v1beta1.FluencyInput.toObject(message.fluencyInput, options); + if (options.oneofs) + object.metricInputs = "fluencyInput"; + } + if (message.coherenceInput != null && message.hasOwnProperty("coherenceInput")) { + object.coherenceInput = $root.google.cloud.aiplatform.v1beta1.CoherenceInput.toObject(message.coherenceInput, options); + if (options.oneofs) + object.metricInputs = "coherenceInput"; + } + if (message.summarizationQualityInput != null && message.hasOwnProperty("summarizationQualityInput")) { + object.summarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput.toObject(message.summarizationQualityInput, options); + if (options.oneofs) + object.metricInputs = "summarizationQualityInput"; + } + if (message.safetyInput != null && message.hasOwnProperty("safetyInput")) { + object.safetyInput = $root.google.cloud.aiplatform.v1beta1.SafetyInput.toObject(message.safetyInput, options); + if (options.oneofs) + object.metricInputs = "safetyInput"; + } + if (message.groundednessInput != null && message.hasOwnProperty("groundednessInput")) { + object.groundednessInput = $root.google.cloud.aiplatform.v1beta1.GroundednessInput.toObject(message.groundednessInput, options); + if (options.oneofs) + object.metricInputs = "groundednessInput"; + } + if (message.questionAnsweringQualityInput != null && message.hasOwnProperty("questionAnsweringQualityInput")) { + object.questionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.toObject(message.questionAnsweringQualityInput, options); + if (options.oneofs) + object.metricInputs = "questionAnsweringQualityInput"; + } + if (message.ragContextRecallInput != null && message.hasOwnProperty("ragContextRecallInput")) { + object.ragContextRecallInput = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput.toObject(message.ragContextRecallInput, options); + if (options.oneofs) + object.metricInputs = "ragContextRecallInput"; + } + if (message.fulfillmentInput != null && message.hasOwnProperty("fulfillmentInput")) { + object.fulfillmentInput = $root.google.cloud.aiplatform.v1beta1.FulfillmentInput.toObject(message.fulfillmentInput, options); + if (options.oneofs) + object.metricInputs = "fulfillmentInput"; + } + if (message.responseRecallInput != null && message.hasOwnProperty("responseRecallInput")) { + object.responseRecallInput = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput.toObject(message.responseRecallInput, options); + if (options.oneofs) + object.metricInputs = "responseRecallInput"; + } + if (message.summarizationHelpfulnessInput != null && message.hasOwnProperty("summarizationHelpfulnessInput")) { + object.summarizationHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.toObject(message.summarizationHelpfulnessInput, options); + if (options.oneofs) + object.metricInputs = "summarizationHelpfulnessInput"; + } + if (message.summarizationVerbosityInput != null && message.hasOwnProperty("summarizationVerbosityInput")) { + object.summarizationVerbosityInput = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.toObject(message.summarizationVerbosityInput, options); + if (options.oneofs) + object.metricInputs = "summarizationVerbosityInput"; + } + if (message.questionAnsweringRelevanceInput != null && message.hasOwnProperty("questionAnsweringRelevanceInput")) { + object.questionAnsweringRelevanceInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.toObject(message.questionAnsweringRelevanceInput, options); + if (options.oneofs) + object.metricInputs = "questionAnsweringRelevanceInput"; + } + if (message.questionAnsweringHelpfulnessInput != null && message.hasOwnProperty("questionAnsweringHelpfulnessInput")) { + object.questionAnsweringHelpfulnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.toObject(message.questionAnsweringHelpfulnessInput, options); + if (options.oneofs) + object.metricInputs = "questionAnsweringHelpfulnessInput"; + } + if (message.questionAnsweringCorrectnessInput != null && message.hasOwnProperty("questionAnsweringCorrectnessInput")) { + object.questionAnsweringCorrectnessInput = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.toObject(message.questionAnsweringCorrectnessInput, options); + if (options.oneofs) + object.metricInputs = "questionAnsweringCorrectnessInput"; + } + if (message.toolCallValidInput != null && message.hasOwnProperty("toolCallValidInput")) { + object.toolCallValidInput = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput.toObject(message.toolCallValidInput, options); + if (options.oneofs) + object.metricInputs = "toolCallValidInput"; + } + if (message.toolNameMatchInput != null && message.hasOwnProperty("toolNameMatchInput")) { + object.toolNameMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput.toObject(message.toolNameMatchInput, options); + if (options.oneofs) + object.metricInputs = "toolNameMatchInput"; + } + if (message.toolParameterKeyMatchInput != null && message.hasOwnProperty("toolParameterKeyMatchInput")) { + object.toolParameterKeyMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.toObject(message.toolParameterKeyMatchInput, options); + if (options.oneofs) + object.metricInputs = "toolParameterKeyMatchInput"; + } + if (message.toolParameterKvMatchInput != null && message.hasOwnProperty("toolParameterKvMatchInput")) { + object.toolParameterKvMatchInput = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.toObject(message.toolParameterKvMatchInput, options); + if (options.oneofs) + object.metricInputs = "toolParameterKvMatchInput"; + } + if (message.pairwiseSummarizationQualityInput != null && message.hasOwnProperty("pairwiseSummarizationQualityInput")) { + object.pairwiseSummarizationQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.toObject(message.pairwiseSummarizationQualityInput, options); + if (options.oneofs) + object.metricInputs = "pairwiseSummarizationQualityInput"; + } + if (message.pairwiseQuestionAnsweringQualityInput != null && message.hasOwnProperty("pairwiseQuestionAnsweringQualityInput")) { + object.pairwiseQuestionAnsweringQualityInput = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.toObject(message.pairwiseQuestionAnsweringQualityInput, options); + if (options.oneofs) + object.metricInputs = "pairwiseQuestionAnsweringQualityInput"; + } + return object; + }; + + /** + * Converts this EvaluateInstancesRequest to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @instance + * @returns {Object.} JSON object + */ + EvaluateInstancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluateInstancesRequest + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluateInstancesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest"; + }; + + return EvaluateInstancesRequest; + })(); + + v1beta1.EvaluateInstancesResponse = (function() { + + /** + * Properties of an EvaluateInstancesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IEvaluateInstancesResponse + * @property {google.cloud.aiplatform.v1beta1.IExactMatchResults|null} [exactMatchResults] EvaluateInstancesResponse exactMatchResults + * @property {google.cloud.aiplatform.v1beta1.IBleuResults|null} [bleuResults] EvaluateInstancesResponse bleuResults + * @property {google.cloud.aiplatform.v1beta1.IRougeResults|null} [rougeResults] EvaluateInstancesResponse rougeResults + * @property {google.cloud.aiplatform.v1beta1.IFluencyResult|null} [fluencyResult] EvaluateInstancesResponse fluencyResult + * @property {google.cloud.aiplatform.v1beta1.ICoherenceResult|null} [coherenceResult] EvaluateInstancesResponse coherenceResult + * @property {google.cloud.aiplatform.v1beta1.ISafetyResult|null} [safetyResult] EvaluateInstancesResponse safetyResult + * @property {google.cloud.aiplatform.v1beta1.IGroundednessResult|null} [groundednessResult] EvaluateInstancesResponse groundednessResult + * @property {google.cloud.aiplatform.v1beta1.IFulfillmentResult|null} [fulfillmentResult] EvaluateInstancesResponse fulfillmentResult + * @property {google.cloud.aiplatform.v1beta1.IResponseRecallResult|null} [responseRecallResult] EvaluateInstancesResponse responseRecallResult + * @property {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult|null} [summarizationQualityResult] EvaluateInstancesResponse summarizationQualityResult + * @property {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult|null} [pairwiseSummarizationQualityResult] EvaluateInstancesResponse pairwiseSummarizationQualityResult + * @property {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult|null} [summarizationHelpfulnessResult] EvaluateInstancesResponse summarizationHelpfulnessResult + * @property {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult|null} [summarizationVerbosityResult] EvaluateInstancesResponse summarizationVerbosityResult + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult|null} [questionAnsweringQualityResult] EvaluateInstancesResponse questionAnsweringQualityResult + * @property {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult|null} [pairwiseQuestionAnsweringQualityResult] EvaluateInstancesResponse pairwiseQuestionAnsweringQualityResult + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult|null} [questionAnsweringRelevanceResult] EvaluateInstancesResponse questionAnsweringRelevanceResult + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult|null} [questionAnsweringHelpfulnessResult] EvaluateInstancesResponse questionAnsweringHelpfulnessResult + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult|null} [questionAnsweringCorrectnessResult] EvaluateInstancesResponse questionAnsweringCorrectnessResult + * @property {google.cloud.aiplatform.v1beta1.IRagContextRecallResult|null} [ragContextRecallResult] EvaluateInstancesResponse ragContextRecallResult + * @property {google.cloud.aiplatform.v1beta1.IToolCallValidResults|null} [toolCallValidResults] EvaluateInstancesResponse toolCallValidResults + * @property {google.cloud.aiplatform.v1beta1.IToolNameMatchResults|null} [toolNameMatchResults] EvaluateInstancesResponse toolNameMatchResults + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults|null} [toolParameterKeyMatchResults] EvaluateInstancesResponse toolParameterKeyMatchResults + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults|null} [toolParameterKvMatchResults] EvaluateInstancesResponse toolParameterKvMatchResults + */ + + /** + * Constructs a new EvaluateInstancesResponse. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an EvaluateInstancesResponse. + * @implements IEvaluateInstancesResponse + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse=} [properties] Properties to set + */ + function EvaluateInstancesResponse(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]]; + } + + /** + * EvaluateInstancesResponse exactMatchResults. + * @member {google.cloud.aiplatform.v1beta1.IExactMatchResults|null|undefined} exactMatchResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.exactMatchResults = null; + + /** + * EvaluateInstancesResponse bleuResults. + * @member {google.cloud.aiplatform.v1beta1.IBleuResults|null|undefined} bleuResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.bleuResults = null; + + /** + * EvaluateInstancesResponse rougeResults. + * @member {google.cloud.aiplatform.v1beta1.IRougeResults|null|undefined} rougeResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.rougeResults = null; + + /** + * EvaluateInstancesResponse fluencyResult. + * @member {google.cloud.aiplatform.v1beta1.IFluencyResult|null|undefined} fluencyResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.fluencyResult = null; + + /** + * EvaluateInstancesResponse coherenceResult. + * @member {google.cloud.aiplatform.v1beta1.ICoherenceResult|null|undefined} coherenceResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.coherenceResult = null; + + /** + * EvaluateInstancesResponse safetyResult. + * @member {google.cloud.aiplatform.v1beta1.ISafetyResult|null|undefined} safetyResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.safetyResult = null; + + /** + * EvaluateInstancesResponse groundednessResult. + * @member {google.cloud.aiplatform.v1beta1.IGroundednessResult|null|undefined} groundednessResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.groundednessResult = null; + + /** + * EvaluateInstancesResponse fulfillmentResult. + * @member {google.cloud.aiplatform.v1beta1.IFulfillmentResult|null|undefined} fulfillmentResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.fulfillmentResult = null; + + /** + * EvaluateInstancesResponse responseRecallResult. + * @member {google.cloud.aiplatform.v1beta1.IResponseRecallResult|null|undefined} responseRecallResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.responseRecallResult = null; + + /** + * EvaluateInstancesResponse summarizationQualityResult. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult|null|undefined} summarizationQualityResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.summarizationQualityResult = null; + + /** + * EvaluateInstancesResponse pairwiseSummarizationQualityResult. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult|null|undefined} pairwiseSummarizationQualityResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.pairwiseSummarizationQualityResult = null; + + /** + * EvaluateInstancesResponse summarizationHelpfulnessResult. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult|null|undefined} summarizationHelpfulnessResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.summarizationHelpfulnessResult = null; + + /** + * EvaluateInstancesResponse summarizationVerbosityResult. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult|null|undefined} summarizationVerbosityResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.summarizationVerbosityResult = null; + + /** + * EvaluateInstancesResponse questionAnsweringQualityResult. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult|null|undefined} questionAnsweringQualityResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.questionAnsweringQualityResult = null; + + /** + * EvaluateInstancesResponse pairwiseQuestionAnsweringQualityResult. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult|null|undefined} pairwiseQuestionAnsweringQualityResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.pairwiseQuestionAnsweringQualityResult = null; + + /** + * EvaluateInstancesResponse questionAnsweringRelevanceResult. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult|null|undefined} questionAnsweringRelevanceResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.questionAnsweringRelevanceResult = null; + + /** + * EvaluateInstancesResponse questionAnsweringHelpfulnessResult. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult|null|undefined} questionAnsweringHelpfulnessResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.questionAnsweringHelpfulnessResult = null; + + /** + * EvaluateInstancesResponse questionAnsweringCorrectnessResult. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult|null|undefined} questionAnsweringCorrectnessResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.questionAnsweringCorrectnessResult = null; + + /** + * EvaluateInstancesResponse ragContextRecallResult. + * @member {google.cloud.aiplatform.v1beta1.IRagContextRecallResult|null|undefined} ragContextRecallResult + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.ragContextRecallResult = null; + + /** + * EvaluateInstancesResponse toolCallValidResults. + * @member {google.cloud.aiplatform.v1beta1.IToolCallValidResults|null|undefined} toolCallValidResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.toolCallValidResults = null; + + /** + * EvaluateInstancesResponse toolNameMatchResults. + * @member {google.cloud.aiplatform.v1beta1.IToolNameMatchResults|null|undefined} toolNameMatchResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.toolNameMatchResults = null; + + /** + * EvaluateInstancesResponse toolParameterKeyMatchResults. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults|null|undefined} toolParameterKeyMatchResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.toolParameterKeyMatchResults = null; + + /** + * EvaluateInstancesResponse toolParameterKvMatchResults. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults|null|undefined} toolParameterKvMatchResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + EvaluateInstancesResponse.prototype.toolParameterKvMatchResults = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * EvaluateInstancesResponse evaluationResults. + * @member {"exactMatchResults"|"bleuResults"|"rougeResults"|"fluencyResult"|"coherenceResult"|"safetyResult"|"groundednessResult"|"fulfillmentResult"|"responseRecallResult"|"summarizationQualityResult"|"pairwiseSummarizationQualityResult"|"summarizationHelpfulnessResult"|"summarizationVerbosityResult"|"questionAnsweringQualityResult"|"pairwiseQuestionAnsweringQualityResult"|"questionAnsweringRelevanceResult"|"questionAnsweringHelpfulnessResult"|"questionAnsweringCorrectnessResult"|"ragContextRecallResult"|"toolCallValidResults"|"toolNameMatchResults"|"toolParameterKeyMatchResults"|"toolParameterKvMatchResults"|undefined} evaluationResults + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + */ + Object.defineProperty(EvaluateInstancesResponse.prototype, "evaluationResults", { + get: $util.oneOfGetter($oneOfFields = ["exactMatchResults", "bleuResults", "rougeResults", "fluencyResult", "coherenceResult", "safetyResult", "groundednessResult", "fulfillmentResult", "responseRecallResult", "summarizationQualityResult", "pairwiseSummarizationQualityResult", "summarizationHelpfulnessResult", "summarizationVerbosityResult", "questionAnsweringQualityResult", "pairwiseQuestionAnsweringQualityResult", "questionAnsweringRelevanceResult", "questionAnsweringHelpfulnessResult", "questionAnsweringCorrectnessResult", "ragContextRecallResult", "toolCallValidResults", "toolNameMatchResults", "toolParameterKeyMatchResults", "toolParameterKvMatchResults"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new EvaluateInstancesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse} EvaluateInstancesResponse instance + */ + EvaluateInstancesResponse.create = function create(properties) { + return new EvaluateInstancesResponse(properties); + }; + + /** + * Encodes the specified EvaluateInstancesResponse message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse} message EvaluateInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateInstancesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exactMatchResults != null && Object.hasOwnProperty.call(message, "exactMatchResults")) + $root.google.cloud.aiplatform.v1beta1.ExactMatchResults.encode(message.exactMatchResults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bleuResults != null && Object.hasOwnProperty.call(message, "bleuResults")) + $root.google.cloud.aiplatform.v1beta1.BleuResults.encode(message.bleuResults, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rougeResults != null && Object.hasOwnProperty.call(message, "rougeResults")) + $root.google.cloud.aiplatform.v1beta1.RougeResults.encode(message.rougeResults, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.fluencyResult != null && Object.hasOwnProperty.call(message, "fluencyResult")) + $root.google.cloud.aiplatform.v1beta1.FluencyResult.encode(message.fluencyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.coherenceResult != null && Object.hasOwnProperty.call(message, "coherenceResult")) + $root.google.cloud.aiplatform.v1beta1.CoherenceResult.encode(message.coherenceResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.summarizationQualityResult != null && Object.hasOwnProperty.call(message, "summarizationQualityResult")) + $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.encode(message.summarizationQualityResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.safetyResult != null && Object.hasOwnProperty.call(message, "safetyResult")) + $root.google.cloud.aiplatform.v1beta1.SafetyResult.encode(message.safetyResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.groundednessResult != null && Object.hasOwnProperty.call(message, "groundednessResult")) + $root.google.cloud.aiplatform.v1beta1.GroundednessResult.encode(message.groundednessResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.questionAnsweringQualityResult != null && Object.hasOwnProperty.call(message, "questionAnsweringQualityResult")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.encode(message.questionAnsweringQualityResult, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.ragContextRecallResult != null && Object.hasOwnProperty.call(message, "ragContextRecallResult")) + $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult.encode(message.ragContextRecallResult, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.fulfillmentResult != null && Object.hasOwnProperty.call(message, "fulfillmentResult")) + $root.google.cloud.aiplatform.v1beta1.FulfillmentResult.encode(message.fulfillmentResult, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseRecallResult != null && Object.hasOwnProperty.call(message, "responseRecallResult")) + $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult.encode(message.responseRecallResult, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.summarizationHelpfulnessResult != null && Object.hasOwnProperty.call(message, "summarizationHelpfulnessResult")) + $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.encode(message.summarizationHelpfulnessResult, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.summarizationVerbosityResult != null && Object.hasOwnProperty.call(message, "summarizationVerbosityResult")) + $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.encode(message.summarizationVerbosityResult, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.questionAnsweringRelevanceResult != null && Object.hasOwnProperty.call(message, "questionAnsweringRelevanceResult")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.encode(message.questionAnsweringRelevanceResult, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.questionAnsweringHelpfulnessResult != null && Object.hasOwnProperty.call(message, "questionAnsweringHelpfulnessResult")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.encode(message.questionAnsweringHelpfulnessResult, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.questionAnsweringCorrectnessResult != null && Object.hasOwnProperty.call(message, "questionAnsweringCorrectnessResult")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.encode(message.questionAnsweringCorrectnessResult, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.toolCallValidResults != null && Object.hasOwnProperty.call(message, "toolCallValidResults")) + $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults.encode(message.toolCallValidResults, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.toolNameMatchResults != null && Object.hasOwnProperty.call(message, "toolNameMatchResults")) + $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults.encode(message.toolNameMatchResults, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.toolParameterKeyMatchResults != null && Object.hasOwnProperty.call(message, "toolParameterKeyMatchResults")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.encode(message.toolParameterKeyMatchResults, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.toolParameterKvMatchResults != null && Object.hasOwnProperty.call(message, "toolParameterKvMatchResults")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.encode(message.toolParameterKvMatchResults, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.pairwiseSummarizationQualityResult != null && Object.hasOwnProperty.call(message, "pairwiseSummarizationQualityResult")) + $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.encode(message.pairwiseSummarizationQualityResult, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.pairwiseQuestionAnsweringQualityResult != null && Object.hasOwnProperty.call(message, "pairwiseQuestionAnsweringQualityResult")) + $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.encode(message.pairwiseQuestionAnsweringQualityResult, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvaluateInstancesResponse message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse} message EvaluateInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvaluateInstancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvaluateInstancesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @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.EvaluateInstancesResponse} EvaluateInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateInstancesResponse.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.EvaluateInstancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.exactMatchResults = $root.google.cloud.aiplatform.v1beta1.ExactMatchResults.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bleuResults = $root.google.cloud.aiplatform.v1beta1.BleuResults.decode(reader, reader.uint32()); + break; + } + case 3: { + message.rougeResults = $root.google.cloud.aiplatform.v1beta1.RougeResults.decode(reader, reader.uint32()); + break; + } + case 4: { + message.fluencyResult = $root.google.cloud.aiplatform.v1beta1.FluencyResult.decode(reader, reader.uint32()); + break; + } + case 5: { + message.coherenceResult = $root.google.cloud.aiplatform.v1beta1.CoherenceResult.decode(reader, reader.uint32()); + break; + } + case 7: { + message.safetyResult = $root.google.cloud.aiplatform.v1beta1.SafetyResult.decode(reader, reader.uint32()); + break; + } + case 8: { + message.groundednessResult = $root.google.cloud.aiplatform.v1beta1.GroundednessResult.decode(reader, reader.uint32()); + break; + } + case 11: { + message.fulfillmentResult = $root.google.cloud.aiplatform.v1beta1.FulfillmentResult.decode(reader, reader.uint32()); + break; + } + case 12: { + message.responseRecallResult = $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult.decode(reader, reader.uint32()); + break; + } + case 6: { + message.summarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.decode(reader, reader.uint32()); + break; + } + case 22: { + message.pairwiseSummarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.decode(reader, reader.uint32()); + break; + } + case 13: { + message.summarizationHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.decode(reader, reader.uint32()); + break; + } + case 14: { + message.summarizationVerbosityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.decode(reader, reader.uint32()); + break; + } + case 9: { + message.questionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.decode(reader, reader.uint32()); + break; + } + case 23: { + message.pairwiseQuestionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.decode(reader, reader.uint32()); + break; + } + case 15: { + message.questionAnsweringRelevanceResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.decode(reader, reader.uint32()); + break; + } + case 16: { + message.questionAnsweringHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.decode(reader, reader.uint32()); + break; + } + case 17: { + message.questionAnsweringCorrectnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.decode(reader, reader.uint32()); + break; + } + case 10: { + message.ragContextRecallResult = $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult.decode(reader, reader.uint32()); + break; + } + case 18: { + message.toolCallValidResults = $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults.decode(reader, reader.uint32()); + break; + } + case 19: { + message.toolNameMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults.decode(reader, reader.uint32()); + break; + } + case 20: { + message.toolParameterKeyMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.decode(reader, reader.uint32()); + break; + } + case 21: { + message.toolParameterKvMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvaluateInstancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse} EvaluateInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvaluateInstancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvaluateInstancesResponse message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvaluateInstancesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exactMatchResults != null && message.hasOwnProperty("exactMatchResults")) { + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchResults.verify(message.exactMatchResults); + if (error) + return "exactMatchResults." + error; + } + } + if (message.bleuResults != null && message.hasOwnProperty("bleuResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.BleuResults.verify(message.bleuResults); + if (error) + return "bleuResults." + error; + } + } + if (message.rougeResults != null && message.hasOwnProperty("rougeResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.RougeResults.verify(message.rougeResults); + if (error) + return "rougeResults." + error; + } + } + if (message.fluencyResult != null && message.hasOwnProperty("fluencyResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FluencyResult.verify(message.fluencyResult); + if (error) + return "fluencyResult." + error; + } + } + if (message.coherenceResult != null && message.hasOwnProperty("coherenceResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.CoherenceResult.verify(message.coherenceResult); + if (error) + return "coherenceResult." + error; + } + } + if (message.safetyResult != null && message.hasOwnProperty("safetyResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SafetyResult.verify(message.safetyResult); + if (error) + return "safetyResult." + error; + } + } + if (message.groundednessResult != null && message.hasOwnProperty("groundednessResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.GroundednessResult.verify(message.groundednessResult); + if (error) + return "groundednessResult." + error; + } + } + if (message.fulfillmentResult != null && message.hasOwnProperty("fulfillmentResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.FulfillmentResult.verify(message.fulfillmentResult); + if (error) + return "fulfillmentResult." + error; + } + } + if (message.responseRecallResult != null && message.hasOwnProperty("responseRecallResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult.verify(message.responseRecallResult); + if (error) + return "responseRecallResult." + error; + } + } + if (message.summarizationQualityResult != null && message.hasOwnProperty("summarizationQualityResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.verify(message.summarizationQualityResult); + if (error) + return "summarizationQualityResult." + error; + } + } + if (message.pairwiseSummarizationQualityResult != null && message.hasOwnProperty("pairwiseSummarizationQualityResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.verify(message.pairwiseSummarizationQualityResult); + if (error) + return "pairwiseSummarizationQualityResult." + error; + } + } + if (message.summarizationHelpfulnessResult != null && message.hasOwnProperty("summarizationHelpfulnessResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.verify(message.summarizationHelpfulnessResult); + if (error) + return "summarizationHelpfulnessResult." + error; + } + } + if (message.summarizationVerbosityResult != null && message.hasOwnProperty("summarizationVerbosityResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.verify(message.summarizationVerbosityResult); + if (error) + return "summarizationVerbosityResult." + error; + } + } + if (message.questionAnsweringQualityResult != null && message.hasOwnProperty("questionAnsweringQualityResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.verify(message.questionAnsweringQualityResult); + if (error) + return "questionAnsweringQualityResult." + error; + } + } + if (message.pairwiseQuestionAnsweringQualityResult != null && message.hasOwnProperty("pairwiseQuestionAnsweringQualityResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.verify(message.pairwiseQuestionAnsweringQualityResult); + if (error) + return "pairwiseQuestionAnsweringQualityResult." + error; + } + } + if (message.questionAnsweringRelevanceResult != null && message.hasOwnProperty("questionAnsweringRelevanceResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.verify(message.questionAnsweringRelevanceResult); + if (error) + return "questionAnsweringRelevanceResult." + error; + } + } + if (message.questionAnsweringHelpfulnessResult != null && message.hasOwnProperty("questionAnsweringHelpfulnessResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.verify(message.questionAnsweringHelpfulnessResult); + if (error) + return "questionAnsweringHelpfulnessResult." + error; + } + } + if (message.questionAnsweringCorrectnessResult != null && message.hasOwnProperty("questionAnsweringCorrectnessResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.verify(message.questionAnsweringCorrectnessResult); + if (error) + return "questionAnsweringCorrectnessResult." + error; + } + } + if (message.ragContextRecallResult != null && message.hasOwnProperty("ragContextRecallResult")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult.verify(message.ragContextRecallResult); + if (error) + return "ragContextRecallResult." + error; + } + } + if (message.toolCallValidResults != null && message.hasOwnProperty("toolCallValidResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults.verify(message.toolCallValidResults); + if (error) + return "toolCallValidResults." + error; + } + } + if (message.toolNameMatchResults != null && message.hasOwnProperty("toolNameMatchResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults.verify(message.toolNameMatchResults); + if (error) + return "toolNameMatchResults." + error; + } + } + if (message.toolParameterKeyMatchResults != null && message.hasOwnProperty("toolParameterKeyMatchResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.verify(message.toolParameterKeyMatchResults); + if (error) + return "toolParameterKeyMatchResults." + error; + } + } + if (message.toolParameterKvMatchResults != null && message.hasOwnProperty("toolParameterKvMatchResults")) { + if (properties.evaluationResults === 1) + return "evaluationResults: multiple values"; + properties.evaluationResults = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.verify(message.toolParameterKvMatchResults); + if (error) + return "toolParameterKvMatchResults." + error; + } + } + return null; + }; + + /** + * Creates an EvaluateInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse} EvaluateInstancesResponse + */ + EvaluateInstancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse(); + if (object.exactMatchResults != null) { + if (typeof object.exactMatchResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.exactMatchResults: object expected"); + message.exactMatchResults = $root.google.cloud.aiplatform.v1beta1.ExactMatchResults.fromObject(object.exactMatchResults); + } + if (object.bleuResults != null) { + if (typeof object.bleuResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.bleuResults: object expected"); + message.bleuResults = $root.google.cloud.aiplatform.v1beta1.BleuResults.fromObject(object.bleuResults); + } + if (object.rougeResults != null) { + if (typeof object.rougeResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.rougeResults: object expected"); + message.rougeResults = $root.google.cloud.aiplatform.v1beta1.RougeResults.fromObject(object.rougeResults); + } + if (object.fluencyResult != null) { + if (typeof object.fluencyResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.fluencyResult: object expected"); + message.fluencyResult = $root.google.cloud.aiplatform.v1beta1.FluencyResult.fromObject(object.fluencyResult); + } + if (object.coherenceResult != null) { + if (typeof object.coherenceResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.coherenceResult: object expected"); + message.coherenceResult = $root.google.cloud.aiplatform.v1beta1.CoherenceResult.fromObject(object.coherenceResult); + } + if (object.safetyResult != null) { + if (typeof object.safetyResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.safetyResult: object expected"); + message.safetyResult = $root.google.cloud.aiplatform.v1beta1.SafetyResult.fromObject(object.safetyResult); + } + if (object.groundednessResult != null) { + if (typeof object.groundednessResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.groundednessResult: object expected"); + message.groundednessResult = $root.google.cloud.aiplatform.v1beta1.GroundednessResult.fromObject(object.groundednessResult); + } + if (object.fulfillmentResult != null) { + if (typeof object.fulfillmentResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.fulfillmentResult: object expected"); + message.fulfillmentResult = $root.google.cloud.aiplatform.v1beta1.FulfillmentResult.fromObject(object.fulfillmentResult); + } + if (object.responseRecallResult != null) { + if (typeof object.responseRecallResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.responseRecallResult: object expected"); + message.responseRecallResult = $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult.fromObject(object.responseRecallResult); + } + if (object.summarizationQualityResult != null) { + if (typeof object.summarizationQualityResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.summarizationQualityResult: object expected"); + message.summarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.fromObject(object.summarizationQualityResult); + } + if (object.pairwiseSummarizationQualityResult != null) { + if (typeof object.pairwiseSummarizationQualityResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.pairwiseSummarizationQualityResult: object expected"); + message.pairwiseSummarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.fromObject(object.pairwiseSummarizationQualityResult); + } + if (object.summarizationHelpfulnessResult != null) { + if (typeof object.summarizationHelpfulnessResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.summarizationHelpfulnessResult: object expected"); + message.summarizationHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.fromObject(object.summarizationHelpfulnessResult); + } + if (object.summarizationVerbosityResult != null) { + if (typeof object.summarizationVerbosityResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.summarizationVerbosityResult: object expected"); + message.summarizationVerbosityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.fromObject(object.summarizationVerbosityResult); + } + if (object.questionAnsweringQualityResult != null) { + if (typeof object.questionAnsweringQualityResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.questionAnsweringQualityResult: object expected"); + message.questionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.fromObject(object.questionAnsweringQualityResult); + } + if (object.pairwiseQuestionAnsweringQualityResult != null) { + if (typeof object.pairwiseQuestionAnsweringQualityResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.pairwiseQuestionAnsweringQualityResult: object expected"); + message.pairwiseQuestionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.fromObject(object.pairwiseQuestionAnsweringQualityResult); + } + if (object.questionAnsweringRelevanceResult != null) { + if (typeof object.questionAnsweringRelevanceResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.questionAnsweringRelevanceResult: object expected"); + message.questionAnsweringRelevanceResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.fromObject(object.questionAnsweringRelevanceResult); + } + if (object.questionAnsweringHelpfulnessResult != null) { + if (typeof object.questionAnsweringHelpfulnessResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.questionAnsweringHelpfulnessResult: object expected"); + message.questionAnsweringHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.fromObject(object.questionAnsweringHelpfulnessResult); + } + if (object.questionAnsweringCorrectnessResult != null) { + if (typeof object.questionAnsweringCorrectnessResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.questionAnsweringCorrectnessResult: object expected"); + message.questionAnsweringCorrectnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.fromObject(object.questionAnsweringCorrectnessResult); + } + if (object.ragContextRecallResult != null) { + if (typeof object.ragContextRecallResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.ragContextRecallResult: object expected"); + message.ragContextRecallResult = $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult.fromObject(object.ragContextRecallResult); + } + if (object.toolCallValidResults != null) { + if (typeof object.toolCallValidResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.toolCallValidResults: object expected"); + message.toolCallValidResults = $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults.fromObject(object.toolCallValidResults); + } + if (object.toolNameMatchResults != null) { + if (typeof object.toolNameMatchResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.toolNameMatchResults: object expected"); + message.toolNameMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults.fromObject(object.toolNameMatchResults); + } + if (object.toolParameterKeyMatchResults != null) { + if (typeof object.toolParameterKeyMatchResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.toolParameterKeyMatchResults: object expected"); + message.toolParameterKeyMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.fromObject(object.toolParameterKeyMatchResults); + } + if (object.toolParameterKvMatchResults != null) { + if (typeof object.toolParameterKvMatchResults !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse.toolParameterKvMatchResults: object expected"); + message.toolParameterKvMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.fromObject(object.toolParameterKvMatchResults); + } + return message; + }; + + /** + * Creates a plain object from an EvaluateInstancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse} message EvaluateInstancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvaluateInstancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exactMatchResults != null && message.hasOwnProperty("exactMatchResults")) { + object.exactMatchResults = $root.google.cloud.aiplatform.v1beta1.ExactMatchResults.toObject(message.exactMatchResults, options); + if (options.oneofs) + object.evaluationResults = "exactMatchResults"; + } + if (message.bleuResults != null && message.hasOwnProperty("bleuResults")) { + object.bleuResults = $root.google.cloud.aiplatform.v1beta1.BleuResults.toObject(message.bleuResults, options); + if (options.oneofs) + object.evaluationResults = "bleuResults"; + } + if (message.rougeResults != null && message.hasOwnProperty("rougeResults")) { + object.rougeResults = $root.google.cloud.aiplatform.v1beta1.RougeResults.toObject(message.rougeResults, options); + if (options.oneofs) + object.evaluationResults = "rougeResults"; + } + if (message.fluencyResult != null && message.hasOwnProperty("fluencyResult")) { + object.fluencyResult = $root.google.cloud.aiplatform.v1beta1.FluencyResult.toObject(message.fluencyResult, options); + if (options.oneofs) + object.evaluationResults = "fluencyResult"; + } + if (message.coherenceResult != null && message.hasOwnProperty("coherenceResult")) { + object.coherenceResult = $root.google.cloud.aiplatform.v1beta1.CoherenceResult.toObject(message.coherenceResult, options); + if (options.oneofs) + object.evaluationResults = "coherenceResult"; + } + if (message.summarizationQualityResult != null && message.hasOwnProperty("summarizationQualityResult")) { + object.summarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult.toObject(message.summarizationQualityResult, options); + if (options.oneofs) + object.evaluationResults = "summarizationQualityResult"; + } + if (message.safetyResult != null && message.hasOwnProperty("safetyResult")) { + object.safetyResult = $root.google.cloud.aiplatform.v1beta1.SafetyResult.toObject(message.safetyResult, options); + if (options.oneofs) + object.evaluationResults = "safetyResult"; + } + if (message.groundednessResult != null && message.hasOwnProperty("groundednessResult")) { + object.groundednessResult = $root.google.cloud.aiplatform.v1beta1.GroundednessResult.toObject(message.groundednessResult, options); + if (options.oneofs) + object.evaluationResults = "groundednessResult"; + } + if (message.questionAnsweringQualityResult != null && message.hasOwnProperty("questionAnsweringQualityResult")) { + object.questionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.toObject(message.questionAnsweringQualityResult, options); + if (options.oneofs) + object.evaluationResults = "questionAnsweringQualityResult"; + } + if (message.ragContextRecallResult != null && message.hasOwnProperty("ragContextRecallResult")) { + object.ragContextRecallResult = $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult.toObject(message.ragContextRecallResult, options); + if (options.oneofs) + object.evaluationResults = "ragContextRecallResult"; + } + if (message.fulfillmentResult != null && message.hasOwnProperty("fulfillmentResult")) { + object.fulfillmentResult = $root.google.cloud.aiplatform.v1beta1.FulfillmentResult.toObject(message.fulfillmentResult, options); + if (options.oneofs) + object.evaluationResults = "fulfillmentResult"; + } + if (message.responseRecallResult != null && message.hasOwnProperty("responseRecallResult")) { + object.responseRecallResult = $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult.toObject(message.responseRecallResult, options); + if (options.oneofs) + object.evaluationResults = "responseRecallResult"; + } + if (message.summarizationHelpfulnessResult != null && message.hasOwnProperty("summarizationHelpfulnessResult")) { + object.summarizationHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.toObject(message.summarizationHelpfulnessResult, options); + if (options.oneofs) + object.evaluationResults = "summarizationHelpfulnessResult"; + } + if (message.summarizationVerbosityResult != null && message.hasOwnProperty("summarizationVerbosityResult")) { + object.summarizationVerbosityResult = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.toObject(message.summarizationVerbosityResult, options); + if (options.oneofs) + object.evaluationResults = "summarizationVerbosityResult"; + } + if (message.questionAnsweringRelevanceResult != null && message.hasOwnProperty("questionAnsweringRelevanceResult")) { + object.questionAnsweringRelevanceResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.toObject(message.questionAnsweringRelevanceResult, options); + if (options.oneofs) + object.evaluationResults = "questionAnsweringRelevanceResult"; + } + if (message.questionAnsweringHelpfulnessResult != null && message.hasOwnProperty("questionAnsweringHelpfulnessResult")) { + object.questionAnsweringHelpfulnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.toObject(message.questionAnsweringHelpfulnessResult, options); + if (options.oneofs) + object.evaluationResults = "questionAnsweringHelpfulnessResult"; + } + if (message.questionAnsweringCorrectnessResult != null && message.hasOwnProperty("questionAnsweringCorrectnessResult")) { + object.questionAnsweringCorrectnessResult = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.toObject(message.questionAnsweringCorrectnessResult, options); + if (options.oneofs) + object.evaluationResults = "questionAnsweringCorrectnessResult"; + } + if (message.toolCallValidResults != null && message.hasOwnProperty("toolCallValidResults")) { + object.toolCallValidResults = $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults.toObject(message.toolCallValidResults, options); + if (options.oneofs) + object.evaluationResults = "toolCallValidResults"; + } + if (message.toolNameMatchResults != null && message.hasOwnProperty("toolNameMatchResults")) { + object.toolNameMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults.toObject(message.toolNameMatchResults, options); + if (options.oneofs) + object.evaluationResults = "toolNameMatchResults"; + } + if (message.toolParameterKeyMatchResults != null && message.hasOwnProperty("toolParameterKeyMatchResults")) { + object.toolParameterKeyMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.toObject(message.toolParameterKeyMatchResults, options); + if (options.oneofs) + object.evaluationResults = "toolParameterKeyMatchResults"; + } + if (message.toolParameterKvMatchResults != null && message.hasOwnProperty("toolParameterKvMatchResults")) { + object.toolParameterKvMatchResults = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.toObject(message.toolParameterKvMatchResults, options); + if (options.oneofs) + object.evaluationResults = "toolParameterKvMatchResults"; + } + if (message.pairwiseSummarizationQualityResult != null && message.hasOwnProperty("pairwiseSummarizationQualityResult")) { + object.pairwiseSummarizationQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.toObject(message.pairwiseSummarizationQualityResult, options); + if (options.oneofs) + object.evaluationResults = "pairwiseSummarizationQualityResult"; + } + if (message.pairwiseQuestionAnsweringQualityResult != null && message.hasOwnProperty("pairwiseQuestionAnsweringQualityResult")) { + object.pairwiseQuestionAnsweringQualityResult = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.toObject(message.pairwiseQuestionAnsweringQualityResult, options); + if (options.oneofs) + object.evaluationResults = "pairwiseQuestionAnsweringQualityResult"; + } + return object; + }; + + /** + * Converts this EvaluateInstancesResponse to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @instance + * @returns {Object.} JSON object + */ + EvaluateInstancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvaluateInstancesResponse + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvaluateInstancesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse"; + }; + + return EvaluateInstancesResponse; + })(); + + v1beta1.ExactMatchInput = (function() { + + /** + * Properties of an ExactMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExactMatchInput + * @property {google.cloud.aiplatform.v1beta1.IExactMatchSpec|null} [metricSpec] ExactMatchInput metricSpec + * @property {Array.|null} [instances] ExactMatchInput instances + */ + + /** + * Constructs a new ExactMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExactMatchInput. + * @implements IExactMatchInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInput=} [properties] Properties to set + */ + function ExactMatchInput(properties) { + this.instances = []; + 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]]; + } + + /** + * ExactMatchInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IExactMatchSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @instance + */ + ExactMatchInput.prototype.metricSpec = null; + + /** + * ExactMatchInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @instance + */ + ExactMatchInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new ExactMatchInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInput} ExactMatchInput instance + */ + ExactMatchInput.create = function create(properties) { + return new ExactMatchInput(properties); + }; + + /** + * Encodes the specified ExactMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInput} message ExactMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExactMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInput} message ExactMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @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.ExactMatchInput} ExactMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchInput.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.ExactMatchInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.ExactMatchInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInput} ExactMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates an ExactMatchInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInput} ExactMatchInput + */ + ExactMatchInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExactMatchInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ExactMatchInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ExactMatchInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ExactMatchInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ExactMatchInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExactMatchInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ExactMatchInput} message ExactMatchInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this ExactMatchInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @instance + * @returns {Object.} JSON object + */ + ExactMatchInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExactMatchInput"; + }; + + return ExactMatchInput; + })(); + + v1beta1.ExactMatchInstance = (function() { + + /** + * Properties of an ExactMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExactMatchInstance + * @property {string|null} [prediction] ExactMatchInstance prediction + * @property {string|null} [reference] ExactMatchInstance reference + */ + + /** + * Constructs a new ExactMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExactMatchInstance. + * @implements IExactMatchInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInstance=} [properties] Properties to set + */ + function ExactMatchInstance(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]]; + } + + /** + * ExactMatchInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @instance + */ + ExactMatchInstance.prototype.prediction = null; + + /** + * ExactMatchInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @instance + */ + ExactMatchInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExactMatchInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @instance + */ + Object.defineProperty(ExactMatchInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ExactMatchInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @instance + */ + Object.defineProperty(ExactMatchInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExactMatchInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInstance} ExactMatchInstance instance + */ + ExactMatchInstance.create = function create(properties) { + return new ExactMatchInstance(properties); + }; + + /** + * Encodes the specified ExactMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInstance} message ExactMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ExactMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchInstance} message ExactMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @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.ExactMatchInstance} ExactMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchInstance.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.ExactMatchInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInstance} ExactMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates an ExactMatchInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchInstance} ExactMatchInstance + */ + ExactMatchInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ExactMatchInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from an ExactMatchInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ExactMatchInstance} message ExactMatchInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ExactMatchInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @instance + * @returns {Object.} JSON object + */ + ExactMatchInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExactMatchInstance"; + }; + + return ExactMatchInstance; + })(); + + v1beta1.ExactMatchSpec = (function() { + + /** + * Properties of an ExactMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExactMatchSpec + */ + + /** + * Constructs a new ExactMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExactMatchSpec. + * @implements IExactMatchSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExactMatchSpec=} [properties] Properties to set + */ + function ExactMatchSpec(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 ExactMatchSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchSpec} ExactMatchSpec instance + */ + ExactMatchSpec.create = function create(properties) { + return new ExactMatchSpec(properties); + }; + + /** + * Encodes the specified ExactMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchSpec} message ExactMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ExactMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchSpec} message ExactMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @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.ExactMatchSpec} ExactMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchSpec.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.ExactMatchSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchSpec} ExactMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an ExactMatchSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchSpec} ExactMatchSpec + */ + ExactMatchSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec) + return object; + return new $root.google.cloud.aiplatform.v1beta1.ExactMatchSpec(); + }; + + /** + * Creates a plain object from an ExactMatchSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ExactMatchSpec} message ExactMatchSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ExactMatchSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @instance + * @returns {Object.} JSON object + */ + ExactMatchSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExactMatchSpec"; + }; + + return ExactMatchSpec; + })(); + + v1beta1.ExactMatchResults = (function() { + + /** + * Properties of an ExactMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExactMatchResults + * @property {Array.|null} [exactMatchMetricValues] ExactMatchResults exactMatchMetricValues + */ + + /** + * Constructs a new ExactMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExactMatchResults. + * @implements IExactMatchResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExactMatchResults=} [properties] Properties to set + */ + function ExactMatchResults(properties) { + this.exactMatchMetricValues = []; + 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]]; + } + + /** + * ExactMatchResults exactMatchMetricValues. + * @member {Array.} exactMatchMetricValues + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @instance + */ + ExactMatchResults.prototype.exactMatchMetricValues = $util.emptyArray; + + /** + * Creates a new ExactMatchResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchResults} ExactMatchResults instance + */ + ExactMatchResults.create = function create(properties) { + return new ExactMatchResults(properties); + }; + + /** + * Encodes the specified ExactMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchResults} message ExactMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exactMatchMetricValues != null && message.exactMatchMetricValues.length) + for (var i = 0; i < message.exactMatchMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.encode(message.exactMatchMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExactMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchResults} message ExactMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @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.ExactMatchResults} ExactMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchResults.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.ExactMatchResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.exactMatchMetricValues && message.exactMatchMetricValues.length)) + message.exactMatchMetricValues = []; + message.exactMatchMetricValues.push($root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchResults} ExactMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exactMatchMetricValues != null && message.hasOwnProperty("exactMatchMetricValues")) { + if (!Array.isArray(message.exactMatchMetricValues)) + return "exactMatchMetricValues: array expected"; + for (var i = 0; i < message.exactMatchMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify(message.exactMatchMetricValues[i]); + if (error) + return "exactMatchMetricValues." + error; + } + } + return null; + }; + + /** + * Creates an ExactMatchResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchResults} ExactMatchResults + */ + ExactMatchResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExactMatchResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ExactMatchResults(); + if (object.exactMatchMetricValues) { + if (!Array.isArray(object.exactMatchMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ExactMatchResults.exactMatchMetricValues: array expected"); + message.exactMatchMetricValues = []; + for (var i = 0; i < object.exactMatchMetricValues.length; ++i) { + if (typeof object.exactMatchMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ExactMatchResults.exactMatchMetricValues: object expected"); + message.exactMatchMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.fromObject(object.exactMatchMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExactMatchResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.ExactMatchResults} message ExactMatchResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exactMatchMetricValues = []; + if (message.exactMatchMetricValues && message.exactMatchMetricValues.length) { + object.exactMatchMetricValues = []; + for (var j = 0; j < message.exactMatchMetricValues.length; ++j) + object.exactMatchMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.toObject(message.exactMatchMetricValues[j], options); + } + return object; + }; + + /** + * Converts this ExactMatchResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @instance + * @returns {Object.} JSON object + */ + ExactMatchResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExactMatchResults"; + }; + + return ExactMatchResults; + })(); + + v1beta1.ExactMatchMetricValue = (function() { + + /** + * Properties of an ExactMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IExactMatchMetricValue + * @property {number|null} [score] ExactMatchMetricValue score + */ + + /** + * Constructs a new ExactMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an ExactMatchMetricValue. + * @implements IExactMatchMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue=} [properties] Properties to set + */ + function ExactMatchMetricValue(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]]; + } + + /** + * ExactMatchMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @instance + */ + ExactMatchMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExactMatchMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @instance + */ + Object.defineProperty(ExactMatchMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExactMatchMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchMetricValue} ExactMatchMetricValue instance + */ + ExactMatchMetricValue.create = function create(properties) { + return new ExactMatchMetricValue(properties); + }; + + /** + * Encodes the specified ExactMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue} message ExactMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified ExactMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue} message ExactMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExactMatchMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExactMatchMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @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.ExactMatchMetricValue} ExactMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchMetricValue.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.ExactMatchMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExactMatchMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchMetricValue} ExactMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExactMatchMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExactMatchMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExactMatchMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates an ExactMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ExactMatchMetricValue} ExactMatchMetricValue + */ + ExactMatchMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from an ExactMatchMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.ExactMatchMetricValue} message ExactMatchMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExactMatchMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this ExactMatchMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @instance + * @returns {Object.} JSON object + */ + ExactMatchMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExactMatchMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ExactMatchMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExactMatchMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ExactMatchMetricValue"; + }; + + return ExactMatchMetricValue; + })(); + + v1beta1.BleuInput = (function() { + + /** + * Properties of a BleuInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBleuInput + * @property {google.cloud.aiplatform.v1beta1.IBleuSpec|null} [metricSpec] BleuInput metricSpec + * @property {Array.|null} [instances] BleuInput instances + */ + + /** + * Constructs a new BleuInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BleuInput. + * @implements IBleuInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBleuInput=} [properties] Properties to set + */ + function BleuInput(properties) { + this.instances = []; + 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]]; + } + + /** + * BleuInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IBleuSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @instance + */ + BleuInput.prototype.metricSpec = null; + + /** + * BleuInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @instance + */ + BleuInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new BleuInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BleuInput} BleuInput instance + */ + BleuInput.create = function create(properties) { + return new BleuInput(properties); + }; + + /** + * Encodes the specified BleuInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInput} message BleuInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.BleuSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.BleuInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BleuInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInput} message BleuInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BleuInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @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.BleuInput} BleuInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuInput.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.BleuInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.BleuSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.BleuInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BleuInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BleuInput} BleuInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BleuInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BleuInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.BleuSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.BleuInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a BleuInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BleuInput} BleuInput + */ + BleuInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BleuInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.BleuInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.BleuSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.BleuInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.BleuInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.BleuInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BleuInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {google.cloud.aiplatform.v1beta1.BleuInput} message BleuInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BleuInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.BleuSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.BleuInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this BleuInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @instance + * @returns {Object.} JSON object + */ + BleuInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BleuInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BleuInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BleuInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BleuInput"; + }; + + return BleuInput; + })(); + + v1beta1.BleuInstance = (function() { + + /** + * Properties of a BleuInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBleuInstance + * @property {string|null} [prediction] BleuInstance prediction + * @property {string|null} [reference] BleuInstance reference + */ + + /** + * Constructs a new BleuInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BleuInstance. + * @implements IBleuInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBleuInstance=} [properties] Properties to set + */ + function BleuInstance(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]]; + } + + /** + * BleuInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @instance + */ + BleuInstance.prototype.prediction = null; + + /** + * BleuInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @instance + */ + BleuInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BleuInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @instance + */ + Object.defineProperty(BleuInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BleuInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @instance + */ + Object.defineProperty(BleuInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BleuInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BleuInstance} BleuInstance instance + */ + BleuInstance.create = function create(properties) { + return new BleuInstance(properties); + }; + + /** + * Encodes the specified BleuInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInstance} message BleuInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified BleuInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuInstance} message BleuInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BleuInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @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.BleuInstance} BleuInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuInstance.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.BleuInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BleuInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BleuInstance} BleuInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BleuInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BleuInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a BleuInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BleuInstance} BleuInstance + */ + BleuInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BleuInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a BleuInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.BleuInstance} message BleuInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BleuInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this BleuInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @instance + * @returns {Object.} JSON object + */ + BleuInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BleuInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BleuInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BleuInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BleuInstance"; + }; + + return BleuInstance; + })(); + + v1beta1.BleuSpec = (function() { + + /** + * Properties of a BleuSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBleuSpec + */ + + /** + * Constructs a new BleuSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BleuSpec. + * @implements IBleuSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBleuSpec=} [properties] Properties to set + */ + function BleuSpec(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 BleuSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BleuSpec} BleuSpec instance + */ + BleuSpec.create = function create(properties) { + return new BleuSpec(properties); + }; + + /** + * Encodes the specified BleuSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuSpec} message BleuSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BleuSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuSpec} message BleuSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BleuSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @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.BleuSpec} BleuSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuSpec.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.BleuSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BleuSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BleuSpec} BleuSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BleuSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BleuSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BleuSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BleuSpec} BleuSpec + */ + BleuSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuSpec) + return object; + return new $root.google.cloud.aiplatform.v1beta1.BleuSpec(); + }; + + /** + * Creates a plain object from a BleuSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.BleuSpec} message BleuSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BleuSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BleuSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @instance + * @returns {Object.} JSON object + */ + BleuSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BleuSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BleuSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BleuSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BleuSpec"; + }; + + return BleuSpec; + })(); + + v1beta1.BleuResults = (function() { + + /** + * Properties of a BleuResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBleuResults + * @property {Array.|null} [bleuMetricValues] BleuResults bleuMetricValues + */ + + /** + * Constructs a new BleuResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BleuResults. + * @implements IBleuResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBleuResults=} [properties] Properties to set + */ + function BleuResults(properties) { + this.bleuMetricValues = []; + 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]]; + } + + /** + * BleuResults bleuMetricValues. + * @member {Array.} bleuMetricValues + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @instance + */ + BleuResults.prototype.bleuMetricValues = $util.emptyArray; + + /** + * Creates a new BleuResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BleuResults} BleuResults instance + */ + BleuResults.create = function create(properties) { + return new BleuResults(properties); + }; + + /** + * Encodes the specified BleuResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuResults} message BleuResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bleuMetricValues != null && message.bleuMetricValues.length) + for (var i = 0; i < message.bleuMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.encode(message.bleuMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BleuResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuResults} message BleuResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BleuResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @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.BleuResults} BleuResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuResults.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.BleuResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bleuMetricValues && message.bleuMetricValues.length)) + message.bleuMetricValues = []; + message.bleuMetricValues.push($root.google.cloud.aiplatform.v1beta1.BleuMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BleuResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BleuResults} BleuResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BleuResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BleuResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bleuMetricValues != null && message.hasOwnProperty("bleuMetricValues")) { + if (!Array.isArray(message.bleuMetricValues)) + return "bleuMetricValues: array expected"; + for (var i = 0; i < message.bleuMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.verify(message.bleuMetricValues[i]); + if (error) + return "bleuMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a BleuResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BleuResults} BleuResults + */ + BleuResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BleuResults(); + if (object.bleuMetricValues) { + if (!Array.isArray(object.bleuMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.BleuResults.bleuMetricValues: array expected"); + message.bleuMetricValues = []; + for (var i = 0; i < object.bleuMetricValues.length; ++i) { + if (typeof object.bleuMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.BleuResults.bleuMetricValues: object expected"); + message.bleuMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.fromObject(object.bleuMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BleuResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {google.cloud.aiplatform.v1beta1.BleuResults} message BleuResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BleuResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bleuMetricValues = []; + if (message.bleuMetricValues && message.bleuMetricValues.length) { + object.bleuMetricValues = []; + for (var j = 0; j < message.bleuMetricValues.length; ++j) + object.bleuMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.toObject(message.bleuMetricValues[j], options); + } + return object; + }; + + /** + * Converts this BleuResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @instance + * @returns {Object.} JSON object + */ + BleuResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BleuResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BleuResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BleuResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BleuResults"; + }; + + return BleuResults; + })(); + + v1beta1.BleuMetricValue = (function() { + + /** + * Properties of a BleuMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IBleuMetricValue + * @property {number|null} [score] BleuMetricValue score + */ + + /** + * Constructs a new BleuMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a BleuMetricValue. + * @implements IBleuMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IBleuMetricValue=} [properties] Properties to set + */ + function BleuMetricValue(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]]; + } + + /** + * BleuMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @instance + */ + BleuMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BleuMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @instance + */ + Object.defineProperty(BleuMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BleuMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.BleuMetricValue} BleuMetricValue instance + */ + BleuMetricValue.create = function create(properties) { + return new BleuMetricValue(properties); + }; + + /** + * Encodes the specified BleuMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuMetricValue} message BleuMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified BleuMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.BleuMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IBleuMetricValue} message BleuMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BleuMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BleuMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @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.BleuMetricValue} BleuMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuMetricValue.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.BleuMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BleuMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.BleuMetricValue} BleuMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BleuMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BleuMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BleuMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a BleuMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.BleuMetricValue} BleuMetricValue + */ + BleuMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.BleuMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.BleuMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a BleuMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.BleuMetricValue} message BleuMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BleuMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this BleuMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @instance + * @returns {Object.} JSON object + */ + BleuMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BleuMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.BleuMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BleuMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.BleuMetricValue"; + }; + + return BleuMetricValue; + })(); + + v1beta1.RougeInput = (function() { + + /** + * Properties of a RougeInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRougeInput + * @property {google.cloud.aiplatform.v1beta1.IRougeSpec|null} [metricSpec] RougeInput metricSpec + * @property {Array.|null} [instances] RougeInput instances + */ + + /** + * Constructs a new RougeInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RougeInput. + * @implements IRougeInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRougeInput=} [properties] Properties to set + */ + function RougeInput(properties) { + this.instances = []; + 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]]; + } + + /** + * RougeInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IRougeSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @instance + */ + RougeInput.prototype.metricSpec = null; + + /** + * RougeInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @instance + */ + RougeInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new RougeInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RougeInput} RougeInput instance + */ + RougeInput.create = function create(properties) { + return new RougeInput(properties); + }; + + /** + * Encodes the specified RougeInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInput} message RougeInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.RougeSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.RougeInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RougeInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInput} message RougeInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RougeInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @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.RougeInput} RougeInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeInput.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.RougeInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.RougeSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.RougeInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RougeInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RougeInput} RougeInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RougeInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RougeInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.RougeSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.RougeInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a RougeInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RougeInput} RougeInput + */ + RougeInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RougeInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RougeInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.RougeInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.RougeSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.RougeInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.RougeInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.RougeInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RougeInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {google.cloud.aiplatform.v1beta1.RougeInput} message RougeInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RougeInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.RougeSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.RougeInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this RougeInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @instance + * @returns {Object.} JSON object + */ + RougeInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RougeInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RougeInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RougeInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RougeInput"; + }; + + return RougeInput; + })(); + + v1beta1.RougeInstance = (function() { + + /** + * Properties of a RougeInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRougeInstance + * @property {string|null} [prediction] RougeInstance prediction + * @property {string|null} [reference] RougeInstance reference + */ + + /** + * Constructs a new RougeInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RougeInstance. + * @implements IRougeInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRougeInstance=} [properties] Properties to set + */ + function RougeInstance(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]]; + } + + /** + * RougeInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @instance + */ + RougeInstance.prototype.prediction = null; + + /** + * RougeInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @instance + */ + RougeInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RougeInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @instance + */ + Object.defineProperty(RougeInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RougeInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @instance + */ + Object.defineProperty(RougeInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RougeInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RougeInstance} RougeInstance instance + */ + RougeInstance.create = function create(properties) { + return new RougeInstance(properties); + }; + + /** + * Encodes the specified RougeInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInstance} message RougeInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified RougeInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeInstance} message RougeInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RougeInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @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.RougeInstance} RougeInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeInstance.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.RougeInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RougeInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RougeInstance} RougeInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RougeInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RougeInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a RougeInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RougeInstance} RougeInstance + */ + RougeInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RougeInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RougeInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a RougeInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.RougeInstance} message RougeInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RougeInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this RougeInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @instance + * @returns {Object.} JSON object + */ + RougeInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RougeInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RougeInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RougeInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RougeInstance"; + }; + + return RougeInstance; + })(); + + v1beta1.RougeSpec = (function() { + + /** + * Properties of a RougeSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRougeSpec + * @property {string|null} [rougeType] RougeSpec rougeType + * @property {boolean|null} [useStemmer] RougeSpec useStemmer + * @property {boolean|null} [splitSummaries] RougeSpec splitSummaries + */ + + /** + * Constructs a new RougeSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RougeSpec. + * @implements IRougeSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRougeSpec=} [properties] Properties to set + */ + function RougeSpec(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]]; + } + + /** + * RougeSpec rougeType. + * @member {string} rougeType + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @instance + */ + RougeSpec.prototype.rougeType = ""; + + /** + * RougeSpec useStemmer. + * @member {boolean} useStemmer + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @instance + */ + RougeSpec.prototype.useStemmer = false; + + /** + * RougeSpec splitSummaries. + * @member {boolean} splitSummaries + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @instance + */ + RougeSpec.prototype.splitSummaries = false; + + /** + * Creates a new RougeSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RougeSpec} RougeSpec instance + */ + RougeSpec.create = function create(properties) { + return new RougeSpec(properties); + }; + + /** + * Encodes the specified RougeSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeSpec} message RougeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rougeType != null && Object.hasOwnProperty.call(message, "rougeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rougeType); + if (message.useStemmer != null && Object.hasOwnProperty.call(message, "useStemmer")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useStemmer); + if (message.splitSummaries != null && Object.hasOwnProperty.call(message, "splitSummaries")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.splitSummaries); + return writer; + }; + + /** + * Encodes the specified RougeSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeSpec} message RougeSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RougeSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @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.RougeSpec} RougeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeSpec.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.RougeSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rougeType = reader.string(); + break; + } + case 2: { + message.useStemmer = reader.bool(); + break; + } + case 3: { + message.splitSummaries = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RougeSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RougeSpec} RougeSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RougeSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RougeSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rougeType != null && message.hasOwnProperty("rougeType")) + if (!$util.isString(message.rougeType)) + return "rougeType: string expected"; + if (message.useStemmer != null && message.hasOwnProperty("useStemmer")) + if (typeof message.useStemmer !== "boolean") + return "useStemmer: boolean expected"; + if (message.splitSummaries != null && message.hasOwnProperty("splitSummaries")) + if (typeof message.splitSummaries !== "boolean") + return "splitSummaries: boolean expected"; + return null; + }; + + /** + * Creates a RougeSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RougeSpec} RougeSpec + */ + RougeSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RougeSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RougeSpec(); + if (object.rougeType != null) + message.rougeType = String(object.rougeType); + if (object.useStemmer != null) + message.useStemmer = Boolean(object.useStemmer); + if (object.splitSummaries != null) + message.splitSummaries = Boolean(object.splitSummaries); + return message; + }; + + /** + * Creates a plain object from a RougeSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.RougeSpec} message RougeSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RougeSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rougeType = ""; + object.useStemmer = false; + object.splitSummaries = false; + } + if (message.rougeType != null && message.hasOwnProperty("rougeType")) + object.rougeType = message.rougeType; + if (message.useStemmer != null && message.hasOwnProperty("useStemmer")) + object.useStemmer = message.useStemmer; + if (message.splitSummaries != null && message.hasOwnProperty("splitSummaries")) + object.splitSummaries = message.splitSummaries; + return object; + }; + + /** + * Converts this RougeSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @instance + * @returns {Object.} JSON object + */ + RougeSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RougeSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RougeSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RougeSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RougeSpec"; + }; + + return RougeSpec; + })(); + + v1beta1.RougeResults = (function() { + + /** + * Properties of a RougeResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRougeResults + * @property {Array.|null} [rougeMetricValues] RougeResults rougeMetricValues + */ + + /** + * Constructs a new RougeResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RougeResults. + * @implements IRougeResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRougeResults=} [properties] Properties to set + */ + function RougeResults(properties) { + this.rougeMetricValues = []; + 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]]; + } + + /** + * RougeResults rougeMetricValues. + * @member {Array.} rougeMetricValues + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @instance + */ + RougeResults.prototype.rougeMetricValues = $util.emptyArray; + + /** + * Creates a new RougeResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RougeResults} RougeResults instance + */ + RougeResults.create = function create(properties) { + return new RougeResults(properties); + }; + + /** + * Encodes the specified RougeResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeResults} message RougeResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rougeMetricValues != null && message.rougeMetricValues.length) + for (var i = 0; i < message.rougeMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.encode(message.rougeMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RougeResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeResults} message RougeResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RougeResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @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.RougeResults} RougeResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeResults.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.RougeResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rougeMetricValues && message.rougeMetricValues.length)) + message.rougeMetricValues = []; + message.rougeMetricValues.push($root.google.cloud.aiplatform.v1beta1.RougeMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RougeResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RougeResults} RougeResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RougeResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RougeResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rougeMetricValues != null && message.hasOwnProperty("rougeMetricValues")) { + if (!Array.isArray(message.rougeMetricValues)) + return "rougeMetricValues: array expected"; + for (var i = 0; i < message.rougeMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.verify(message.rougeMetricValues[i]); + if (error) + return "rougeMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a RougeResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RougeResults} RougeResults + */ + RougeResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RougeResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RougeResults(); + if (object.rougeMetricValues) { + if (!Array.isArray(object.rougeMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.RougeResults.rougeMetricValues: array expected"); + message.rougeMetricValues = []; + for (var i = 0; i < object.rougeMetricValues.length; ++i) { + if (typeof object.rougeMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.RougeResults.rougeMetricValues: object expected"); + message.rougeMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.fromObject(object.rougeMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RougeResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {google.cloud.aiplatform.v1beta1.RougeResults} message RougeResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RougeResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rougeMetricValues = []; + if (message.rougeMetricValues && message.rougeMetricValues.length) { + object.rougeMetricValues = []; + for (var j = 0; j < message.rougeMetricValues.length; ++j) + object.rougeMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.toObject(message.rougeMetricValues[j], options); + } + return object; + }; + + /** + * Converts this RougeResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @instance + * @returns {Object.} JSON object + */ + RougeResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RougeResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RougeResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RougeResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RougeResults"; + }; + + return RougeResults; + })(); + + v1beta1.RougeMetricValue = (function() { + + /** + * Properties of a RougeMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRougeMetricValue + * @property {number|null} [score] RougeMetricValue score + */ + + /** + * Constructs a new RougeMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RougeMetricValue. + * @implements IRougeMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRougeMetricValue=} [properties] Properties to set + */ + function RougeMetricValue(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]]; + } + + /** + * RougeMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @instance + */ + RougeMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RougeMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @instance + */ + Object.defineProperty(RougeMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RougeMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RougeMetricValue} RougeMetricValue instance + */ + RougeMetricValue.create = function create(properties) { + return new RougeMetricValue(properties); + }; + + /** + * Encodes the specified RougeMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeMetricValue} message RougeMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified RougeMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RougeMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IRougeMetricValue} message RougeMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RougeMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RougeMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @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.RougeMetricValue} RougeMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeMetricValue.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.RougeMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RougeMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RougeMetricValue} RougeMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RougeMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RougeMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RougeMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a RougeMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RougeMetricValue} RougeMetricValue + */ + RougeMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RougeMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RougeMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a RougeMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.RougeMetricValue} message RougeMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RougeMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this RougeMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @instance + * @returns {Object.} JSON object + */ + RougeMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RougeMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RougeMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RougeMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RougeMetricValue"; + }; + + return RougeMetricValue; + })(); + + v1beta1.CoherenceInput = (function() { + + /** + * Properties of a CoherenceInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICoherenceInput + * @property {google.cloud.aiplatform.v1beta1.ICoherenceSpec|null} [metricSpec] CoherenceInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.ICoherenceInstance|null} [instance] CoherenceInput instance + */ + + /** + * Constructs a new CoherenceInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CoherenceInput. + * @implements ICoherenceInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInput=} [properties] Properties to set + */ + function CoherenceInput(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]]; + } + + /** + * CoherenceInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.ICoherenceSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @instance + */ + CoherenceInput.prototype.metricSpec = null; + + /** + * CoherenceInput instance. + * @member {google.cloud.aiplatform.v1beta1.ICoherenceInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @instance + */ + CoherenceInput.prototype.instance = null; + + /** + * Creates a new CoherenceInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInput} CoherenceInput instance + */ + CoherenceInput.create = function create(properties) { + return new CoherenceInput(properties); + }; + + /** + * Encodes the specified CoherenceInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInput} message CoherenceInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.CoherenceSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.CoherenceInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CoherenceInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInput} message CoherenceInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CoherenceInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @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.CoherenceInput} CoherenceInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceInput.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.CoherenceInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.CoherenceSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.CoherenceInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CoherenceInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInput} CoherenceInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CoherenceInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CoherenceInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.CoherenceSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.CoherenceInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a CoherenceInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInput} CoherenceInput + */ + CoherenceInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CoherenceInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CoherenceInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CoherenceInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.CoherenceSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.CoherenceInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.CoherenceInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a CoherenceInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.CoherenceInput} message CoherenceInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CoherenceInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.CoherenceSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.CoherenceInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this CoherenceInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @instance + * @returns {Object.} JSON object + */ + CoherenceInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CoherenceInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CoherenceInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CoherenceInput"; + }; + + return CoherenceInput; + })(); + + v1beta1.CoherenceInstance = (function() { + + /** + * Properties of a CoherenceInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICoherenceInstance + * @property {string|null} [prediction] CoherenceInstance prediction + */ + + /** + * Constructs a new CoherenceInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CoherenceInstance. + * @implements ICoherenceInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInstance=} [properties] Properties to set + */ + function CoherenceInstance(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]]; + } + + /** + * CoherenceInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @instance + */ + CoherenceInstance.prototype.prediction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CoherenceInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @instance + */ + Object.defineProperty(CoherenceInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CoherenceInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInstance} CoherenceInstance instance + */ + CoherenceInstance.create = function create(properties) { + return new CoherenceInstance(properties); + }; + + /** + * Encodes the specified CoherenceInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInstance} message CoherenceInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + return writer; + }; + + /** + * Encodes the specified CoherenceInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceInstance} message CoherenceInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CoherenceInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @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.CoherenceInstance} CoherenceInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceInstance.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.CoherenceInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CoherenceInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInstance} CoherenceInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CoherenceInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CoherenceInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + return null; + }; + + /** + * Creates a CoherenceInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CoherenceInstance} CoherenceInstance + */ + CoherenceInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CoherenceInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CoherenceInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + return message; + }; + + /** + * Creates a plain object from a CoherenceInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.CoherenceInstance} message CoherenceInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CoherenceInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + return object; + }; + + /** + * Converts this CoherenceInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @instance + * @returns {Object.} JSON object + */ + CoherenceInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CoherenceInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CoherenceInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CoherenceInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CoherenceInstance"; + }; + + return CoherenceInstance; + })(); + + v1beta1.CoherenceSpec = (function() { + + /** + * Properties of a CoherenceSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICoherenceSpec + * @property {number|null} [version] CoherenceSpec version + */ + + /** + * Constructs a new CoherenceSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CoherenceSpec. + * @implements ICoherenceSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICoherenceSpec=} [properties] Properties to set + */ + function CoherenceSpec(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]]; + } + + /** + * CoherenceSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @instance + */ + CoherenceSpec.prototype.version = 0; + + /** + * Creates a new CoherenceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CoherenceSpec} CoherenceSpec instance + */ + CoherenceSpec.create = function create(properties) { + return new CoherenceSpec(properties); + }; + + /** + * Encodes the specified CoherenceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceSpec} message CoherenceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified CoherenceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceSpec} message CoherenceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CoherenceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @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.CoherenceSpec} CoherenceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceSpec.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.CoherenceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CoherenceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CoherenceSpec} CoherenceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CoherenceSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CoherenceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a CoherenceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CoherenceSpec} CoherenceSpec + */ + CoherenceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CoherenceSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CoherenceSpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a CoherenceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.CoherenceSpec} message CoherenceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CoherenceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this CoherenceSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @instance + * @returns {Object.} JSON object + */ + CoherenceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CoherenceSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CoherenceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CoherenceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CoherenceSpec"; + }; + + return CoherenceSpec; + })(); + + v1beta1.CoherenceResult = (function() { + + /** + * Properties of a CoherenceResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ICoherenceResult + * @property {number|null} [score] CoherenceResult score + * @property {string|null} [explanation] CoherenceResult explanation + * @property {number|null} [confidence] CoherenceResult confidence + */ + + /** + * Constructs a new CoherenceResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a CoherenceResult. + * @implements ICoherenceResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ICoherenceResult=} [properties] Properties to set + */ + function CoherenceResult(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]]; + } + + /** + * CoherenceResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + */ + CoherenceResult.prototype.score = null; + + /** + * CoherenceResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + */ + CoherenceResult.prototype.explanation = ""; + + /** + * CoherenceResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + */ + CoherenceResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CoherenceResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + */ + Object.defineProperty(CoherenceResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CoherenceResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + */ + Object.defineProperty(CoherenceResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CoherenceResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.CoherenceResult} CoherenceResult instance + */ + CoherenceResult.create = function create(properties) { + return new CoherenceResult(properties); + }; + + /** + * Encodes the specified CoherenceResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceResult} message CoherenceResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified CoherenceResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.CoherenceResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ICoherenceResult} message CoherenceResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CoherenceResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CoherenceResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @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.CoherenceResult} CoherenceResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceResult.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.CoherenceResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CoherenceResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.CoherenceResult} CoherenceResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CoherenceResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CoherenceResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CoherenceResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a CoherenceResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.CoherenceResult} CoherenceResult + */ + CoherenceResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.CoherenceResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.CoherenceResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a CoherenceResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.CoherenceResult} message CoherenceResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CoherenceResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this CoherenceResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @instance + * @returns {Object.} JSON object + */ + CoherenceResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CoherenceResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.CoherenceResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CoherenceResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.CoherenceResult"; + }; + + return CoherenceResult; + })(); + + v1beta1.FluencyInput = (function() { + + /** + * Properties of a FluencyInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFluencyInput + * @property {google.cloud.aiplatform.v1beta1.IFluencySpec|null} [metricSpec] FluencyInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IFluencyInstance|null} [instance] FluencyInput instance + */ + + /** + * Constructs a new FluencyInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FluencyInput. + * @implements IFluencyInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFluencyInput=} [properties] Properties to set + */ + function FluencyInput(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]]; + } + + /** + * FluencyInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IFluencySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @instance + */ + FluencyInput.prototype.metricSpec = null; + + /** + * FluencyInput instance. + * @member {google.cloud.aiplatform.v1beta1.IFluencyInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @instance + */ + FluencyInput.prototype.instance = null; + + /** + * Creates a new FluencyInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FluencyInput} FluencyInput instance + */ + FluencyInput.create = function create(properties) { + return new FluencyInput(properties); + }; + + /** + * Encodes the specified FluencyInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInput} message FluencyInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.FluencySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.FluencyInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FluencyInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInput} message FluencyInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FluencyInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @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.FluencyInput} FluencyInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyInput.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.FluencyInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.FluencySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.FluencyInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FluencyInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FluencyInput} FluencyInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FluencyInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FluencyInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.FluencySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.FluencyInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a FluencyInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FluencyInput} FluencyInput + */ + FluencyInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FluencyInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FluencyInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FluencyInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.FluencySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FluencyInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.FluencyInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a FluencyInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.FluencyInput} message FluencyInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FluencyInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.FluencySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.FluencyInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this FluencyInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @instance + * @returns {Object.} JSON object + */ + FluencyInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FluencyInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FluencyInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FluencyInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FluencyInput"; + }; + + return FluencyInput; + })(); + + v1beta1.FluencyInstance = (function() { + + /** + * Properties of a FluencyInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFluencyInstance + * @property {string|null} [prediction] FluencyInstance prediction + */ + + /** + * Constructs a new FluencyInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FluencyInstance. + * @implements IFluencyInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFluencyInstance=} [properties] Properties to set + */ + function FluencyInstance(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]]; + } + + /** + * FluencyInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @instance + */ + FluencyInstance.prototype.prediction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FluencyInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @instance + */ + Object.defineProperty(FluencyInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FluencyInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FluencyInstance} FluencyInstance instance + */ + FluencyInstance.create = function create(properties) { + return new FluencyInstance(properties); + }; + + /** + * Encodes the specified FluencyInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInstance} message FluencyInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + return writer; + }; + + /** + * Encodes the specified FluencyInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyInstance} message FluencyInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FluencyInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @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.FluencyInstance} FluencyInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyInstance.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.FluencyInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FluencyInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FluencyInstance} FluencyInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FluencyInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FluencyInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + return null; + }; + + /** + * Creates a FluencyInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FluencyInstance} FluencyInstance + */ + FluencyInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FluencyInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FluencyInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + return message; + }; + + /** + * Creates a plain object from a FluencyInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.FluencyInstance} message FluencyInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FluencyInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + return object; + }; + + /** + * Converts this FluencyInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @instance + * @returns {Object.} JSON object + */ + FluencyInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FluencyInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FluencyInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FluencyInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FluencyInstance"; + }; + + return FluencyInstance; + })(); + + v1beta1.FluencySpec = (function() { + + /** + * Properties of a FluencySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFluencySpec + * @property {number|null} [version] FluencySpec version + */ + + /** + * Constructs a new FluencySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FluencySpec. + * @implements IFluencySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFluencySpec=} [properties] Properties to set + */ + function FluencySpec(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]]; + } + + /** + * FluencySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @instance + */ + FluencySpec.prototype.version = 0; + + /** + * Creates a new FluencySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FluencySpec} FluencySpec instance + */ + FluencySpec.create = function create(properties) { + return new FluencySpec(properties); + }; + + /** + * Encodes the specified FluencySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencySpec} message FluencySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified FluencySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencySpec} message FluencySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FluencySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @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.FluencySpec} FluencySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencySpec.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.FluencySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FluencySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FluencySpec} FluencySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FluencySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FluencySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a FluencySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FluencySpec} FluencySpec + */ + FluencySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FluencySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FluencySpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a FluencySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.FluencySpec} message FluencySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FluencySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this FluencySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @instance + * @returns {Object.} JSON object + */ + FluencySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FluencySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FluencySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FluencySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FluencySpec"; + }; + + return FluencySpec; + })(); + + v1beta1.FluencyResult = (function() { + + /** + * Properties of a FluencyResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFluencyResult + * @property {number|null} [score] FluencyResult score + * @property {string|null} [explanation] FluencyResult explanation + * @property {number|null} [confidence] FluencyResult confidence + */ + + /** + * Constructs a new FluencyResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FluencyResult. + * @implements IFluencyResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFluencyResult=} [properties] Properties to set + */ + function FluencyResult(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]]; + } + + /** + * FluencyResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + */ + FluencyResult.prototype.score = null; + + /** + * FluencyResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + */ + FluencyResult.prototype.explanation = ""; + + /** + * FluencyResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + */ + FluencyResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FluencyResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + */ + Object.defineProperty(FluencyResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FluencyResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + */ + Object.defineProperty(FluencyResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FluencyResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FluencyResult} FluencyResult instance + */ + FluencyResult.create = function create(properties) { + return new FluencyResult(properties); + }; + + /** + * Encodes the specified FluencyResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyResult} message FluencyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified FluencyResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FluencyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFluencyResult} message FluencyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FluencyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FluencyResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @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.FluencyResult} FluencyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyResult.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.FluencyResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FluencyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FluencyResult} FluencyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FluencyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FluencyResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FluencyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a FluencyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FluencyResult} FluencyResult + */ + FluencyResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FluencyResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FluencyResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a FluencyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.FluencyResult} message FluencyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FluencyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this FluencyResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @instance + * @returns {Object.} JSON object + */ + FluencyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FluencyResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FluencyResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FluencyResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FluencyResult"; + }; + + return FluencyResult; + })(); + + v1beta1.SafetyInput = (function() { + + /** + * Properties of a SafetyInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISafetyInput + * @property {google.cloud.aiplatform.v1beta1.ISafetySpec|null} [metricSpec] SafetyInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.ISafetyInstance|null} [instance] SafetyInput instance + */ + + /** + * Constructs a new SafetyInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SafetyInput. + * @implements ISafetyInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISafetyInput=} [properties] Properties to set + */ + function SafetyInput(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]]; + } + + /** + * SafetyInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.ISafetySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @instance + */ + SafetyInput.prototype.metricSpec = null; + + /** + * SafetyInput instance. + * @member {google.cloud.aiplatform.v1beta1.ISafetyInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @instance + */ + SafetyInput.prototype.instance = null; + + /** + * Creates a new SafetyInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SafetyInput} SafetyInput instance + */ + SafetyInput.create = function create(properties) { + return new SafetyInput(properties); + }; + + /** + * Encodes the specified SafetyInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInput} message SafetyInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.SafetySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.SafetyInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SafetyInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInput} message SafetyInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetyInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @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.SafetyInput} SafetyInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyInput.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.SafetyInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SafetySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.SafetyInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetyInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SafetyInput} SafetyInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetyInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetyInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.SafetySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.SafetyInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a SafetyInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SafetyInput} SafetyInput + */ + SafetyInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SafetyInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SafetyInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SafetyInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SafetySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SafetyInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.SafetyInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a SafetyInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {google.cloud.aiplatform.v1beta1.SafetyInput} message SafetyInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetyInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.SafetySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.SafetyInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this SafetyInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @instance + * @returns {Object.} JSON object + */ + SafetyInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetyInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SafetyInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetyInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SafetyInput"; + }; + + return SafetyInput; + })(); + + v1beta1.SafetyInstance = (function() { + + /** + * Properties of a SafetyInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISafetyInstance + * @property {string|null} [prediction] SafetyInstance prediction + */ + + /** + * Constructs a new SafetyInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SafetyInstance. + * @implements ISafetyInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISafetyInstance=} [properties] Properties to set + */ + function SafetyInstance(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]]; + } + + /** + * SafetyInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @instance + */ + SafetyInstance.prototype.prediction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SafetyInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @instance + */ + Object.defineProperty(SafetyInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SafetyInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SafetyInstance} SafetyInstance instance + */ + SafetyInstance.create = function create(properties) { + return new SafetyInstance(properties); + }; + + /** + * Encodes the specified SafetyInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInstance} message SafetyInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + return writer; + }; + + /** + * Encodes the specified SafetyInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyInstance} message SafetyInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetyInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @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.SafetyInstance} SafetyInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyInstance.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.SafetyInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetyInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SafetyInstance} SafetyInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetyInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetyInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + return null; + }; + + /** + * Creates a SafetyInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SafetyInstance} SafetyInstance + */ + SafetyInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SafetyInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SafetyInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + return message; + }; + + /** + * Creates a plain object from a SafetyInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.SafetyInstance} message SafetyInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetyInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + return object; + }; + + /** + * Converts this SafetyInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @instance + * @returns {Object.} JSON object + */ + SafetyInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetyInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SafetyInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetyInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SafetyInstance"; + }; + + return SafetyInstance; + })(); + + v1beta1.SafetySpec = (function() { + + /** + * Properties of a SafetySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISafetySpec + * @property {number|null} [version] SafetySpec version + */ + + /** + * Constructs a new SafetySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SafetySpec. + * @implements ISafetySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISafetySpec=} [properties] Properties to set + */ + function SafetySpec(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]]; + } + + /** + * SafetySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @instance + */ + SafetySpec.prototype.version = 0; + + /** + * Creates a new SafetySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SafetySpec} SafetySpec instance + */ + SafetySpec.create = function create(properties) { + return new SafetySpec(properties); + }; + + /** + * Encodes the specified SafetySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetySpec} message SafetySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SafetySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetySpec} message SafetySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @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.SafetySpec} SafetySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetySpec.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.SafetySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SafetySpec} SafetySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SafetySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SafetySpec} SafetySpec + */ + SafetySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SafetySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SafetySpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SafetySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.SafetySpec} message SafetySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SafetySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @instance + * @returns {Object.} JSON object + */ + SafetySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SafetySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SafetySpec"; + }; + + return SafetySpec; + })(); + + v1beta1.SafetyResult = (function() { + + /** + * Properties of a SafetyResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISafetyResult + * @property {number|null} [score] SafetyResult score + * @property {string|null} [explanation] SafetyResult explanation + * @property {number|null} [confidence] SafetyResult confidence + */ + + /** + * Constructs a new SafetyResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SafetyResult. + * @implements ISafetyResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISafetyResult=} [properties] Properties to set + */ + function SafetyResult(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]]; + } + + /** + * SafetyResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + */ + SafetyResult.prototype.score = null; + + /** + * SafetyResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + */ + SafetyResult.prototype.explanation = ""; + + /** + * SafetyResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + */ + SafetyResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SafetyResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + */ + Object.defineProperty(SafetyResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SafetyResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + */ + Object.defineProperty(SafetyResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SafetyResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SafetyResult} SafetyResult instance + */ + SafetyResult.create = function create(properties) { + return new SafetyResult(properties); + }; + + /** + * Encodes the specified SafetyResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyResult} message SafetyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified SafetyResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SafetyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISafetyResult} message SafetyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SafetyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SafetyResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @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.SafetyResult} SafetyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyResult.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.SafetyResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SafetyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SafetyResult} SafetyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SafetyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SafetyResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SafetyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a SafetyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SafetyResult} SafetyResult + */ + SafetyResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SafetyResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SafetyResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a SafetyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {google.cloud.aiplatform.v1beta1.SafetyResult} message SafetyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SafetyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this SafetyResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @instance + * @returns {Object.} JSON object + */ + SafetyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SafetyResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SafetyResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SafetyResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SafetyResult"; + }; + + return SafetyResult; + })(); + + v1beta1.GroundednessInput = (function() { + + /** + * Properties of a GroundednessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGroundednessInput + * @property {google.cloud.aiplatform.v1beta1.IGroundednessSpec|null} [metricSpec] GroundednessInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IGroundednessInstance|null} [instance] GroundednessInput instance + */ + + /** + * Constructs a new GroundednessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GroundednessInput. + * @implements IGroundednessInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInput=} [properties] Properties to set + */ + function GroundednessInput(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]]; + } + + /** + * GroundednessInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IGroundednessSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @instance + */ + GroundednessInput.prototype.metricSpec = null; + + /** + * GroundednessInput instance. + * @member {google.cloud.aiplatform.v1beta1.IGroundednessInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @instance + */ + GroundednessInput.prototype.instance = null; + + /** + * Creates a new GroundednessInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInput} GroundednessInput instance + */ + GroundednessInput.create = function create(properties) { + return new GroundednessInput(properties); + }; + + /** + * Encodes the specified GroundednessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInput} message GroundednessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.GroundednessSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.GroundednessInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroundednessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInput} message GroundednessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroundednessInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @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.GroundednessInput} GroundednessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessInput.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.GroundednessInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.GroundednessSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.GroundednessInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroundednessInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInput} GroundednessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroundednessInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroundednessInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.GroundednessSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.GroundednessInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a GroundednessInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInput} GroundednessInput + */ + GroundednessInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GroundednessInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GroundednessInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.GroundednessInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.GroundednessSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.GroundednessInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.GroundednessInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a GroundednessInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.GroundednessInput} message GroundednessInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroundednessInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.GroundednessSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.GroundednessInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this GroundednessInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @instance + * @returns {Object.} JSON object + */ + GroundednessInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GroundednessInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroundednessInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GroundednessInput"; + }; + + return GroundednessInput; + })(); + + v1beta1.GroundednessInstance = (function() { + + /** + * Properties of a GroundednessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGroundednessInstance + * @property {string|null} [prediction] GroundednessInstance prediction + * @property {string|null} [context] GroundednessInstance context + */ + + /** + * Constructs a new GroundednessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GroundednessInstance. + * @implements IGroundednessInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInstance=} [properties] Properties to set + */ + function GroundednessInstance(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]]; + } + + /** + * GroundednessInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @instance + */ + GroundednessInstance.prototype.prediction = null; + + /** + * GroundednessInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @instance + */ + GroundednessInstance.prototype.context = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GroundednessInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @instance + */ + Object.defineProperty(GroundednessInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GroundednessInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @instance + */ + Object.defineProperty(GroundednessInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GroundednessInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInstance} GroundednessInstance instance + */ + GroundednessInstance.create = function create(properties) { + return new GroundednessInstance(properties); + }; + + /** + * Encodes the specified GroundednessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInstance} message GroundednessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.context); + return writer; + }; + + /** + * Encodes the specified GroundednessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessInstance} message GroundednessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroundednessInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @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.GroundednessInstance} GroundednessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessInstance.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.GroundednessInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.context = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroundednessInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInstance} GroundednessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroundednessInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroundednessInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + return null; + }; + + /** + * Creates a GroundednessInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GroundednessInstance} GroundednessInstance + */ + GroundednessInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GroundednessInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GroundednessInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.context != null) + message.context = String(object.context); + return message; + }; + + /** + * Creates a plain object from a GroundednessInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.GroundednessInstance} message GroundednessInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroundednessInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + return object; + }; + + /** + * Converts this GroundednessInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @instance + * @returns {Object.} JSON object + */ + GroundednessInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GroundednessInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GroundednessInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroundednessInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GroundednessInstance"; + }; + + return GroundednessInstance; + })(); + + v1beta1.GroundednessSpec = (function() { + + /** + * Properties of a GroundednessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGroundednessSpec + * @property {number|null} [version] GroundednessSpec version + */ + + /** + * Constructs a new GroundednessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GroundednessSpec. + * @implements IGroundednessSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGroundednessSpec=} [properties] Properties to set + */ + function GroundednessSpec(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]]; + } + + /** + * GroundednessSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @instance + */ + GroundednessSpec.prototype.version = 0; + + /** + * Creates a new GroundednessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GroundednessSpec} GroundednessSpec instance + */ + GroundednessSpec.create = function create(properties) { + return new GroundednessSpec(properties); + }; + + /** + * Encodes the specified GroundednessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessSpec} message GroundednessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified GroundednessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessSpec} message GroundednessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroundednessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @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.GroundednessSpec} GroundednessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessSpec.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.GroundednessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroundednessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GroundednessSpec} GroundednessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroundednessSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroundednessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a GroundednessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GroundednessSpec} GroundednessSpec + */ + GroundednessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GroundednessSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GroundednessSpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a GroundednessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.GroundednessSpec} message GroundednessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroundednessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this GroundednessSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @instance + * @returns {Object.} JSON object + */ + GroundednessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GroundednessSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GroundednessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroundednessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GroundednessSpec"; + }; + + return GroundednessSpec; + })(); + + v1beta1.GroundednessResult = (function() { + + /** + * Properties of a GroundednessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IGroundednessResult + * @property {number|null} [score] GroundednessResult score + * @property {string|null} [explanation] GroundednessResult explanation + * @property {number|null} [confidence] GroundednessResult confidence + */ + + /** + * Constructs a new GroundednessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a GroundednessResult. + * @implements IGroundednessResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IGroundednessResult=} [properties] Properties to set + */ + function GroundednessResult(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]]; + } + + /** + * GroundednessResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + */ + GroundednessResult.prototype.score = null; + + /** + * GroundednessResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + */ + GroundednessResult.prototype.explanation = ""; + + /** + * GroundednessResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + */ + GroundednessResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GroundednessResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + */ + Object.defineProperty(GroundednessResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * GroundednessResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + */ + Object.defineProperty(GroundednessResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GroundednessResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.GroundednessResult} GroundednessResult instance + */ + GroundednessResult.create = function create(properties) { + return new GroundednessResult(properties); + }; + + /** + * Encodes the specified GroundednessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessResult} message GroundednessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified GroundednessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.GroundednessResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IGroundednessResult} message GroundednessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroundednessResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroundednessResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @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.GroundednessResult} GroundednessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessResult.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.GroundednessResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroundednessResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.GroundednessResult} GroundednessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroundednessResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroundednessResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroundednessResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a GroundednessResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.GroundednessResult} GroundednessResult + */ + GroundednessResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.GroundednessResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.GroundednessResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a GroundednessResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.GroundednessResult} message GroundednessResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroundednessResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this GroundednessResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @instance + * @returns {Object.} JSON object + */ + GroundednessResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GroundednessResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.GroundednessResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GroundednessResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.GroundednessResult"; + }; + + return GroundednessResult; + })(); + + v1beta1.FulfillmentInput = (function() { + + /** + * Properties of a FulfillmentInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFulfillmentInput + * @property {google.cloud.aiplatform.v1beta1.IFulfillmentSpec|null} [metricSpec] FulfillmentInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IFulfillmentInstance|null} [instance] FulfillmentInput instance + */ + + /** + * Constructs a new FulfillmentInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FulfillmentInput. + * @implements IFulfillmentInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInput=} [properties] Properties to set + */ + function FulfillmentInput(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]]; + } + + /** + * FulfillmentInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IFulfillmentSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @instance + */ + FulfillmentInput.prototype.metricSpec = null; + + /** + * FulfillmentInput instance. + * @member {google.cloud.aiplatform.v1beta1.IFulfillmentInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @instance + */ + FulfillmentInput.prototype.instance = null; + + /** + * Creates a new FulfillmentInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInput} FulfillmentInput instance + */ + FulfillmentInput.create = function create(properties) { + return new FulfillmentInput(properties); + }; + + /** + * Encodes the specified FulfillmentInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInput} message FulfillmentInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FulfillmentInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInput} message FulfillmentInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @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.FulfillmentInput} FulfillmentInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInput.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.FulfillmentInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInput} FulfillmentInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a FulfillmentInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInput} FulfillmentInput + */ + FulfillmentInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FulfillmentInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FulfillmentInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FulfillmentInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FulfillmentInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a FulfillmentInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {google.cloud.aiplatform.v1beta1.FulfillmentInput} message FulfillmentInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this FulfillmentInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @instance + * @returns {Object.} JSON object + */ + FulfillmentInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FulfillmentInput"; + }; + + return FulfillmentInput; + })(); + + v1beta1.FulfillmentInstance = (function() { + + /** + * Properties of a FulfillmentInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFulfillmentInstance + * @property {string|null} [prediction] FulfillmentInstance prediction + * @property {string|null} [instruction] FulfillmentInstance instruction + */ + + /** + * Constructs a new FulfillmentInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FulfillmentInstance. + * @implements IFulfillmentInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInstance=} [properties] Properties to set + */ + function FulfillmentInstance(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]]; + } + + /** + * FulfillmentInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @instance + */ + FulfillmentInstance.prototype.prediction = null; + + /** + * FulfillmentInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @instance + */ + FulfillmentInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FulfillmentInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @instance + */ + Object.defineProperty(FulfillmentInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FulfillmentInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @instance + */ + Object.defineProperty(FulfillmentInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FulfillmentInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInstance} FulfillmentInstance instance + */ + FulfillmentInstance.create = function create(properties) { + return new FulfillmentInstance(properties); + }; + + /** + * Encodes the specified FulfillmentInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInstance} message FulfillmentInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified FulfillmentInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentInstance} message FulfillmentInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @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.FulfillmentInstance} FulfillmentInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInstance.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.FulfillmentInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInstance} FulfillmentInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a FulfillmentInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentInstance} FulfillmentInstance + */ + FulfillmentInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FulfillmentInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a FulfillmentInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.FulfillmentInstance} message FulfillmentInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this FulfillmentInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @instance + * @returns {Object.} JSON object + */ + FulfillmentInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FulfillmentInstance"; + }; + + return FulfillmentInstance; + })(); + + v1beta1.FulfillmentSpec = (function() { + + /** + * Properties of a FulfillmentSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFulfillmentSpec + * @property {number|null} [version] FulfillmentSpec version + */ + + /** + * Constructs a new FulfillmentSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FulfillmentSpec. + * @implements IFulfillmentSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentSpec=} [properties] Properties to set + */ + function FulfillmentSpec(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]]; + } + + /** + * FulfillmentSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @instance + */ + FulfillmentSpec.prototype.version = 0; + + /** + * Creates a new FulfillmentSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentSpec} FulfillmentSpec instance + */ + FulfillmentSpec.create = function create(properties) { + return new FulfillmentSpec(properties); + }; + + /** + * Encodes the specified FulfillmentSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentSpec} message FulfillmentSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified FulfillmentSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentSpec} message FulfillmentSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @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.FulfillmentSpec} FulfillmentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentSpec.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.FulfillmentSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentSpec} FulfillmentSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a FulfillmentSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentSpec} FulfillmentSpec + */ + FulfillmentSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FulfillmentSpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a FulfillmentSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.FulfillmentSpec} message FulfillmentSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this FulfillmentSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @instance + * @returns {Object.} JSON object + */ + FulfillmentSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FulfillmentSpec"; + }; + + return FulfillmentSpec; + })(); + + v1beta1.FulfillmentResult = (function() { + + /** + * Properties of a FulfillmentResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFulfillmentResult + * @property {number|null} [score] FulfillmentResult score + * @property {string|null} [explanation] FulfillmentResult explanation + * @property {number|null} [confidence] FulfillmentResult confidence + */ + + /** + * Constructs a new FulfillmentResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FulfillmentResult. + * @implements IFulfillmentResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentResult=} [properties] Properties to set + */ + function FulfillmentResult(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]]; + } + + /** + * FulfillmentResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + */ + FulfillmentResult.prototype.score = null; + + /** + * FulfillmentResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + */ + FulfillmentResult.prototype.explanation = ""; + + /** + * FulfillmentResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + */ + FulfillmentResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FulfillmentResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + */ + Object.defineProperty(FulfillmentResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FulfillmentResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + */ + Object.defineProperty(FulfillmentResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FulfillmentResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentResult} FulfillmentResult instance + */ + FulfillmentResult.create = function create(properties) { + return new FulfillmentResult(properties); + }; + + /** + * Encodes the specified FulfillmentResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentResult} message FulfillmentResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified FulfillmentResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FulfillmentResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IFulfillmentResult} message FulfillmentResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FulfillmentResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FulfillmentResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @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.FulfillmentResult} FulfillmentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResult.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.FulfillmentResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FulfillmentResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentResult} FulfillmentResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FulfillmentResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FulfillmentResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FulfillmentResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a FulfillmentResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FulfillmentResult} FulfillmentResult + */ + FulfillmentResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FulfillmentResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FulfillmentResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a FulfillmentResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {google.cloud.aiplatform.v1beta1.FulfillmentResult} message FulfillmentResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FulfillmentResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this FulfillmentResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @instance + * @returns {Object.} JSON object + */ + FulfillmentResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FulfillmentResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FulfillmentResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FulfillmentResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FulfillmentResult"; + }; + + return FulfillmentResult; + })(); + + v1beta1.ResponseRecallInput = (function() { + + /** + * Properties of a ResponseRecallInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResponseRecallInput + * @property {google.cloud.aiplatform.v1beta1.IResponseRecallSpec|null} [metricSpec] ResponseRecallInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IResponseRecallInstance|null} [instance] ResponseRecallInput instance + */ + + /** + * Constructs a new ResponseRecallInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResponseRecallInput. + * @implements IResponseRecallInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInput=} [properties] Properties to set + */ + function ResponseRecallInput(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]]; + } + + /** + * ResponseRecallInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IResponseRecallSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @instance + */ + ResponseRecallInput.prototype.metricSpec = null; + + /** + * ResponseRecallInput instance. + * @member {google.cloud.aiplatform.v1beta1.IResponseRecallInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @instance + */ + ResponseRecallInput.prototype.instance = null; + + /** + * Creates a new ResponseRecallInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInput} ResponseRecallInput instance + */ + ResponseRecallInput.create = function create(properties) { + return new ResponseRecallInput(properties); + }; + + /** + * Encodes the specified ResponseRecallInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInput} message ResponseRecallInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseRecallInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInput} message ResponseRecallInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseRecallInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @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.ResponseRecallInput} ResponseRecallInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallInput.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.ResponseRecallInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseRecallInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInput} ResponseRecallInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseRecallInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseRecallInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a ResponseRecallInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInput} ResponseRecallInput + */ + ResponseRecallInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResponseRecallInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResponseRecallInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ResponseRecallInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a ResponseRecallInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ResponseRecallInput} message ResponseRecallInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseRecallInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this ResponseRecallInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @instance + * @returns {Object.} JSON object + */ + ResponseRecallInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseRecallInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseRecallInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResponseRecallInput"; + }; + + return ResponseRecallInput; + })(); + + v1beta1.ResponseRecallInstance = (function() { + + /** + * Properties of a ResponseRecallInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResponseRecallInstance + * @property {string|null} [prediction] ResponseRecallInstance prediction + * @property {string|null} [reference] ResponseRecallInstance reference + */ + + /** + * Constructs a new ResponseRecallInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResponseRecallInstance. + * @implements IResponseRecallInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInstance=} [properties] Properties to set + */ + function ResponseRecallInstance(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]]; + } + + /** + * ResponseRecallInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @instance + */ + ResponseRecallInstance.prototype.prediction = null; + + /** + * ResponseRecallInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @instance + */ + ResponseRecallInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseRecallInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @instance + */ + Object.defineProperty(ResponseRecallInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResponseRecallInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @instance + */ + Object.defineProperty(ResponseRecallInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseRecallInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInstance} ResponseRecallInstance instance + */ + ResponseRecallInstance.create = function create(properties) { + return new ResponseRecallInstance(properties); + }; + + /** + * Encodes the specified ResponseRecallInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInstance} message ResponseRecallInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ResponseRecallInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallInstance} message ResponseRecallInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseRecallInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @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.ResponseRecallInstance} ResponseRecallInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallInstance.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.ResponseRecallInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseRecallInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInstance} ResponseRecallInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseRecallInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseRecallInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a ResponseRecallInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallInstance} ResponseRecallInstance + */ + ResponseRecallInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResponseRecallInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a ResponseRecallInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ResponseRecallInstance} message ResponseRecallInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseRecallInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ResponseRecallInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @instance + * @returns {Object.} JSON object + */ + ResponseRecallInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseRecallInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseRecallInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResponseRecallInstance"; + }; + + return ResponseRecallInstance; + })(); + + v1beta1.ResponseRecallSpec = (function() { + + /** + * Properties of a ResponseRecallSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResponseRecallSpec + * @property {number|null} [version] ResponseRecallSpec version + */ + + /** + * Constructs a new ResponseRecallSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResponseRecallSpec. + * @implements IResponseRecallSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallSpec=} [properties] Properties to set + */ + function ResponseRecallSpec(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]]; + } + + /** + * ResponseRecallSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @instance + */ + ResponseRecallSpec.prototype.version = 0; + + /** + * Creates a new ResponseRecallSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallSpec} ResponseRecallSpec instance + */ + ResponseRecallSpec.create = function create(properties) { + return new ResponseRecallSpec(properties); + }; + + /** + * Encodes the specified ResponseRecallSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallSpec} message ResponseRecallSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + return writer; + }; + + /** + * Encodes the specified ResponseRecallSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallSpec} message ResponseRecallSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseRecallSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @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.ResponseRecallSpec} ResponseRecallSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallSpec.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.ResponseRecallSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseRecallSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallSpec} ResponseRecallSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseRecallSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseRecallSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a ResponseRecallSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallSpec} ResponseRecallSpec + */ + ResponseRecallSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResponseRecallSpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a ResponseRecallSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ResponseRecallSpec} message ResponseRecallSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseRecallSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this ResponseRecallSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @instance + * @returns {Object.} JSON object + */ + ResponseRecallSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseRecallSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseRecallSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResponseRecallSpec"; + }; + + return ResponseRecallSpec; + })(); + + v1beta1.ResponseRecallResult = (function() { + + /** + * Properties of a ResponseRecallResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IResponseRecallResult + * @property {number|null} [score] ResponseRecallResult score + * @property {string|null} [explanation] ResponseRecallResult explanation + * @property {number|null} [confidence] ResponseRecallResult confidence + */ + + /** + * Constructs a new ResponseRecallResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ResponseRecallResult. + * @implements IResponseRecallResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallResult=} [properties] Properties to set + */ + function ResponseRecallResult(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]]; + } + + /** + * ResponseRecallResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + */ + ResponseRecallResult.prototype.score = null; + + /** + * ResponseRecallResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + */ + ResponseRecallResult.prototype.explanation = ""; + + /** + * ResponseRecallResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + */ + ResponseRecallResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResponseRecallResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + */ + Object.defineProperty(ResponseRecallResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ResponseRecallResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + */ + Object.defineProperty(ResponseRecallResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResponseRecallResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallResult} ResponseRecallResult instance + */ + ResponseRecallResult.create = function create(properties) { + return new ResponseRecallResult(properties); + }; + + /** + * Encodes the specified ResponseRecallResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallResult} message ResponseRecallResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified ResponseRecallResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ResponseRecallResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IResponseRecallResult} message ResponseRecallResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseRecallResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseRecallResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @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.ResponseRecallResult} ResponseRecallResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallResult.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.ResponseRecallResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseRecallResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallResult} ResponseRecallResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseRecallResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseRecallResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseRecallResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a ResponseRecallResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ResponseRecallResult} ResponseRecallResult + */ + ResponseRecallResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ResponseRecallResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a ResponseRecallResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ResponseRecallResult} message ResponseRecallResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseRecallResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this ResponseRecallResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @instance + * @returns {Object.} JSON object + */ + ResponseRecallResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResponseRecallResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ResponseRecallResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResponseRecallResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ResponseRecallResult"; + }; + + return ResponseRecallResult; + })(); + + v1beta1.SummarizationQualityInput = (function() { + + /** + * Properties of a SummarizationQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationQualityInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec|null} [metricSpec] SummarizationQualityInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance|null} [instance] SummarizationQualityInput instance + */ + + /** + * Constructs a new SummarizationQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationQualityInput. + * @implements ISummarizationQualityInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput=} [properties] Properties to set + */ + function SummarizationQualityInput(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]]; + } + + /** + * SummarizationQualityInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @instance + */ + SummarizationQualityInput.prototype.metricSpec = null; + + /** + * SummarizationQualityInput instance. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @instance + */ + SummarizationQualityInput.prototype.instance = null; + + /** + * Creates a new SummarizationQualityInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInput} SummarizationQualityInput instance + */ + SummarizationQualityInput.create = function create(properties) { + return new SummarizationQualityInput(properties); + }; + + /** + * Encodes the specified SummarizationQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput} message SummarizationQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SummarizationQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInput} message SummarizationQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationQualityInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @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.SummarizationQualityInput} SummarizationQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityInput.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.SummarizationQualityInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationQualityInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInput} SummarizationQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationQualityInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationQualityInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a SummarizationQualityInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInput} SummarizationQualityInput + */ + SummarizationQualityInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationQualityInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationQualityInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a SummarizationQualityInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationQualityInput} message SummarizationQualityInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationQualityInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this SummarizationQualityInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @instance + * @returns {Object.} JSON object + */ + SummarizationQualityInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationQualityInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationQualityInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationQualityInput"; + }; + + return SummarizationQualityInput; + })(); + + v1beta1.SummarizationQualityInstance = (function() { + + /** + * Properties of a SummarizationQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationQualityInstance + * @property {string|null} [prediction] SummarizationQualityInstance prediction + * @property {string|null} [reference] SummarizationQualityInstance reference + * @property {string|null} [context] SummarizationQualityInstance context + * @property {string|null} [instruction] SummarizationQualityInstance instruction + */ + + /** + * Constructs a new SummarizationQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationQualityInstance. + * @implements ISummarizationQualityInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance=} [properties] Properties to set + */ + function SummarizationQualityInstance(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]]; + } + + /** + * SummarizationQualityInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + SummarizationQualityInstance.prototype.prediction = null; + + /** + * SummarizationQualityInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + SummarizationQualityInstance.prototype.reference = null; + + /** + * SummarizationQualityInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + SummarizationQualityInstance.prototype.context = null; + + /** + * SummarizationQualityInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + SummarizationQualityInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationQualityInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + Object.defineProperty(SummarizationQualityInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationQualityInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + Object.defineProperty(SummarizationQualityInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationQualityInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + Object.defineProperty(SummarizationQualityInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationQualityInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + */ + Object.defineProperty(SummarizationQualityInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationQualityInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInstance} SummarizationQualityInstance instance + */ + SummarizationQualityInstance.create = function create(properties) { + return new SummarizationQualityInstance(properties); + }; + + /** + * Encodes the specified SummarizationQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance} message SummarizationQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified SummarizationQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityInstance} message SummarizationQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationQualityInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @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.SummarizationQualityInstance} SummarizationQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityInstance.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.SummarizationQualityInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationQualityInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInstance} SummarizationQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationQualityInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationQualityInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a SummarizationQualityInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityInstance} SummarizationQualityInstance + */ + SummarizationQualityInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationQualityInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a SummarizationQualityInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationQualityInstance} message SummarizationQualityInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationQualityInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this SummarizationQualityInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @instance + * @returns {Object.} JSON object + */ + SummarizationQualityInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationQualityInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationQualityInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationQualityInstance"; + }; + + return SummarizationQualityInstance; + })(); + + v1beta1.SummarizationQualitySpec = (function() { + + /** + * Properties of a SummarizationQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationQualitySpec + * @property {boolean|null} [useReference] SummarizationQualitySpec useReference + * @property {number|null} [version] SummarizationQualitySpec version + */ + + /** + * Constructs a new SummarizationQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationQualitySpec. + * @implements ISummarizationQualitySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec=} [properties] Properties to set + */ + function SummarizationQualitySpec(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]]; + } + + /** + * SummarizationQualitySpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @instance + */ + SummarizationQualitySpec.prototype.useReference = false; + + /** + * SummarizationQualitySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @instance + */ + SummarizationQualitySpec.prototype.version = 0; + + /** + * Creates a new SummarizationQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualitySpec} SummarizationQualitySpec instance + */ + SummarizationQualitySpec.create = function create(properties) { + return new SummarizationQualitySpec(properties); + }; + + /** + * Encodes the specified SummarizationQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec} message SummarizationQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SummarizationQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualitySpec} message SummarizationQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @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.SummarizationQualitySpec} SummarizationQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualitySpec.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.SummarizationQualitySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualitySpec} SummarizationQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationQualitySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SummarizationQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualitySpec} SummarizationQualitySpec + */ + SummarizationQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationQualitySpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SummarizationQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationQualitySpec} message SummarizationQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SummarizationQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @instance + * @returns {Object.} JSON object + */ + SummarizationQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationQualitySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationQualitySpec"; + }; + + return SummarizationQualitySpec; + })(); + + v1beta1.SummarizationQualityResult = (function() { + + /** + * Properties of a SummarizationQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationQualityResult + * @property {number|null} [score] SummarizationQualityResult score + * @property {string|null} [explanation] SummarizationQualityResult explanation + * @property {number|null} [confidence] SummarizationQualityResult confidence + */ + + /** + * Constructs a new SummarizationQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationQualityResult. + * @implements ISummarizationQualityResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult=} [properties] Properties to set + */ + function SummarizationQualityResult(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]]; + } + + /** + * SummarizationQualityResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + */ + SummarizationQualityResult.prototype.score = null; + + /** + * SummarizationQualityResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + */ + SummarizationQualityResult.prototype.explanation = ""; + + /** + * SummarizationQualityResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + */ + SummarizationQualityResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationQualityResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + */ + Object.defineProperty(SummarizationQualityResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationQualityResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + */ + Object.defineProperty(SummarizationQualityResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityResult} SummarizationQualityResult instance + */ + SummarizationQualityResult.create = function create(properties) { + return new SummarizationQualityResult(properties); + }; + + /** + * Encodes the specified SummarizationQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult} message SummarizationQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified SummarizationQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationQualityResult} message SummarizationQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @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.SummarizationQualityResult} SummarizationQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityResult.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.SummarizationQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityResult} SummarizationQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationQualityResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a SummarizationQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationQualityResult} SummarizationQualityResult + */ + SummarizationQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationQualityResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a SummarizationQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationQualityResult} message SummarizationQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this SummarizationQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @instance + * @returns {Object.} JSON object + */ + SummarizationQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationQualityResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationQualityResult"; + }; + + return SummarizationQualityResult; + })(); + + v1beta1.PairwiseSummarizationQualityInput = (function() { + + /** + * Properties of a PairwiseSummarizationQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseSummarizationQualityInput + * @property {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec|null} [metricSpec] PairwiseSummarizationQualityInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance|null} [instance] PairwiseSummarizationQualityInput instance + */ + + /** + * Constructs a new PairwiseSummarizationQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseSummarizationQualityInput. + * @implements IPairwiseSummarizationQualityInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput=} [properties] Properties to set + */ + function PairwiseSummarizationQualityInput(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]]; + } + + /** + * PairwiseSummarizationQualityInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @instance + */ + PairwiseSummarizationQualityInput.prototype.metricSpec = null; + + /** + * PairwiseSummarizationQualityInput instance. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @instance + */ + PairwiseSummarizationQualityInput.prototype.instance = null; + + /** + * Creates a new PairwiseSummarizationQualityInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput} PairwiseSummarizationQualityInput instance + */ + PairwiseSummarizationQualityInput.create = function create(properties) { + return new PairwiseSummarizationQualityInput(properties); + }; + + /** + * Encodes the specified PairwiseSummarizationQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput} message PairwiseSummarizationQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PairwiseSummarizationQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInput} message PairwiseSummarizationQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseSummarizationQualityInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @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.PairwiseSummarizationQualityInput} PairwiseSummarizationQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityInput.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.PairwiseSummarizationQualityInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseSummarizationQualityInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput} PairwiseSummarizationQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseSummarizationQualityInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseSummarizationQualityInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a PairwiseSummarizationQualityInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput} PairwiseSummarizationQualityInput + */ + PairwiseSummarizationQualityInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a PairwiseSummarizationQualityInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput} message PairwiseSummarizationQualityInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseSummarizationQualityInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this PairwiseSummarizationQualityInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @instance + * @returns {Object.} JSON object + */ + PairwiseSummarizationQualityInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseSummarizationQualityInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseSummarizationQualityInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput"; + }; + + return PairwiseSummarizationQualityInput; + })(); + + v1beta1.PairwiseSummarizationQualityInstance = (function() { + + /** + * Properties of a PairwiseSummarizationQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseSummarizationQualityInstance + * @property {string|null} [prediction] PairwiseSummarizationQualityInstance prediction + * @property {string|null} [baselinePrediction] PairwiseSummarizationQualityInstance baselinePrediction + * @property {string|null} [reference] PairwiseSummarizationQualityInstance reference + * @property {string|null} [context] PairwiseSummarizationQualityInstance context + * @property {string|null} [instruction] PairwiseSummarizationQualityInstance instruction + */ + + /** + * Constructs a new PairwiseSummarizationQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseSummarizationQualityInstance. + * @implements IPairwiseSummarizationQualityInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance=} [properties] Properties to set + */ + function PairwiseSummarizationQualityInstance(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]]; + } + + /** + * PairwiseSummarizationQualityInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + PairwiseSummarizationQualityInstance.prototype.prediction = null; + + /** + * PairwiseSummarizationQualityInstance baselinePrediction. + * @member {string|null|undefined} baselinePrediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + PairwiseSummarizationQualityInstance.prototype.baselinePrediction = null; + + /** + * PairwiseSummarizationQualityInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + PairwiseSummarizationQualityInstance.prototype.reference = null; + + /** + * PairwiseSummarizationQualityInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + PairwiseSummarizationQualityInstance.prototype.context = null; + + /** + * PairwiseSummarizationQualityInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + PairwiseSummarizationQualityInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PairwiseSummarizationQualityInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseSummarizationQualityInstance _baselinePrediction. + * @member {"baselinePrediction"|undefined} _baselinePrediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityInstance.prototype, "_baselinePrediction", { + get: $util.oneOfGetter($oneOfFields = ["baselinePrediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseSummarizationQualityInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseSummarizationQualityInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseSummarizationQualityInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairwiseSummarizationQualityInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance} PairwiseSummarizationQualityInstance instance + */ + PairwiseSummarizationQualityInstance.create = function create(properties) { + return new PairwiseSummarizationQualityInstance(properties); + }; + + /** + * Encodes the specified PairwiseSummarizationQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance} message PairwiseSummarizationQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.baselinePrediction != null && Object.hasOwnProperty.call(message, "baselinePrediction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baselinePrediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified PairwiseSummarizationQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityInstance} message PairwiseSummarizationQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseSummarizationQualityInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @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.PairwiseSummarizationQualityInstance} PairwiseSummarizationQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityInstance.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.PairwiseSummarizationQualityInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.baselinePrediction = reader.string(); + break; + } + case 3: { + message.reference = reader.string(); + break; + } + case 4: { + message.context = reader.string(); + break; + } + case 5: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseSummarizationQualityInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance} PairwiseSummarizationQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseSummarizationQualityInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseSummarizationQualityInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.baselinePrediction != null && message.hasOwnProperty("baselinePrediction")) { + properties._baselinePrediction = 1; + if (!$util.isString(message.baselinePrediction)) + return "baselinePrediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a PairwiseSummarizationQualityInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance} PairwiseSummarizationQualityInstance + */ + PairwiseSummarizationQualityInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.baselinePrediction != null) + message.baselinePrediction = String(object.baselinePrediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a PairwiseSummarizationQualityInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance} message PairwiseSummarizationQualityInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseSummarizationQualityInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.baselinePrediction != null && message.hasOwnProperty("baselinePrediction")) { + object.baselinePrediction = message.baselinePrediction; + if (options.oneofs) + object._baselinePrediction = "baselinePrediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this PairwiseSummarizationQualityInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @instance + * @returns {Object.} JSON object + */ + PairwiseSummarizationQualityInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseSummarizationQualityInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseSummarizationQualityInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInstance"; + }; + + return PairwiseSummarizationQualityInstance; + })(); + + v1beta1.PairwiseSummarizationQualitySpec = (function() { + + /** + * Properties of a PairwiseSummarizationQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseSummarizationQualitySpec + * @property {boolean|null} [useReference] PairwiseSummarizationQualitySpec useReference + * @property {number|null} [version] PairwiseSummarizationQualitySpec version + */ + + /** + * Constructs a new PairwiseSummarizationQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseSummarizationQualitySpec. + * @implements IPairwiseSummarizationQualitySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec=} [properties] Properties to set + */ + function PairwiseSummarizationQualitySpec(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]]; + } + + /** + * PairwiseSummarizationQualitySpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @instance + */ + PairwiseSummarizationQualitySpec.prototype.useReference = false; + + /** + * PairwiseSummarizationQualitySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @instance + */ + PairwiseSummarizationQualitySpec.prototype.version = 0; + + /** + * Creates a new PairwiseSummarizationQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec} PairwiseSummarizationQualitySpec instance + */ + PairwiseSummarizationQualitySpec.create = function create(properties) { + return new PairwiseSummarizationQualitySpec(properties); + }; + + /** + * Encodes the specified PairwiseSummarizationQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec} message PairwiseSummarizationQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified PairwiseSummarizationQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualitySpec} message PairwiseSummarizationQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseSummarizationQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @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.PairwiseSummarizationQualitySpec} PairwiseSummarizationQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualitySpec.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.PairwiseSummarizationQualitySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseSummarizationQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec} PairwiseSummarizationQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseSummarizationQualitySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseSummarizationQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a PairwiseSummarizationQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec} PairwiseSummarizationQualitySpec + */ + PairwiseSummarizationQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a PairwiseSummarizationQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec} message PairwiseSummarizationQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseSummarizationQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this PairwiseSummarizationQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @instance + * @returns {Object.} JSON object + */ + PairwiseSummarizationQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseSummarizationQualitySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseSummarizationQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualitySpec"; + }; + + return PairwiseSummarizationQualitySpec; + })(); + + v1beta1.PairwiseSummarizationQualityResult = (function() { + + /** + * Properties of a PairwiseSummarizationQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseSummarizationQualityResult + * @property {google.cloud.aiplatform.v1beta1.PairwiseChoice|null} [pairwiseChoice] PairwiseSummarizationQualityResult pairwiseChoice + * @property {string|null} [explanation] PairwiseSummarizationQualityResult explanation + * @property {number|null} [confidence] PairwiseSummarizationQualityResult confidence + */ + + /** + * Constructs a new PairwiseSummarizationQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseSummarizationQualityResult. + * @implements IPairwiseSummarizationQualityResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult=} [properties] Properties to set + */ + function PairwiseSummarizationQualityResult(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]]; + } + + /** + * PairwiseSummarizationQualityResult pairwiseChoice. + * @member {google.cloud.aiplatform.v1beta1.PairwiseChoice} pairwiseChoice + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @instance + */ + PairwiseSummarizationQualityResult.prototype.pairwiseChoice = 0; + + /** + * PairwiseSummarizationQualityResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @instance + */ + PairwiseSummarizationQualityResult.prototype.explanation = ""; + + /** + * PairwiseSummarizationQualityResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @instance + */ + PairwiseSummarizationQualityResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PairwiseSummarizationQualityResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @instance + */ + Object.defineProperty(PairwiseSummarizationQualityResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairwiseSummarizationQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult} PairwiseSummarizationQualityResult instance + */ + PairwiseSummarizationQualityResult.create = function create(properties) { + return new PairwiseSummarizationQualityResult(properties); + }; + + /** + * Encodes the specified PairwiseSummarizationQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult} message PairwiseSummarizationQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairwiseChoice != null && Object.hasOwnProperty.call(message, "pairwiseChoice")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pairwiseChoice); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified PairwiseSummarizationQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseSummarizationQualityResult} message PairwiseSummarizationQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseSummarizationQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseSummarizationQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @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.PairwiseSummarizationQualityResult} PairwiseSummarizationQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityResult.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.PairwiseSummarizationQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pairwiseChoice = reader.int32(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseSummarizationQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult} PairwiseSummarizationQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseSummarizationQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseSummarizationQualityResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseSummarizationQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pairwiseChoice != null && message.hasOwnProperty("pairwiseChoice")) + switch (message.pairwiseChoice) { + default: + return "pairwiseChoice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a PairwiseSummarizationQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult} PairwiseSummarizationQualityResult + */ + PairwiseSummarizationQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult(); + switch (object.pairwiseChoice) { + default: + if (typeof object.pairwiseChoice === "number") { + message.pairwiseChoice = object.pairwiseChoice; + break; + } + break; + case "PAIRWISE_CHOICE_UNSPECIFIED": + case 0: + message.pairwiseChoice = 0; + break; + case "BASELINE": + case 1: + message.pairwiseChoice = 1; + break; + case "CANDIDATE": + case 2: + message.pairwiseChoice = 2; + break; + case "TIE": + case 3: + message.pairwiseChoice = 3; + break; + } + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a PairwiseSummarizationQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult} message PairwiseSummarizationQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseSummarizationQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pairwiseChoice = options.enums === String ? "PAIRWISE_CHOICE_UNSPECIFIED" : 0; + object.explanation = ""; + } + if (message.pairwiseChoice != null && message.hasOwnProperty("pairwiseChoice")) + object.pairwiseChoice = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PairwiseChoice[message.pairwiseChoice] === undefined ? message.pairwiseChoice : $root.google.cloud.aiplatform.v1beta1.PairwiseChoice[message.pairwiseChoice] : message.pairwiseChoice; + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this PairwiseSummarizationQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @instance + * @returns {Object.} JSON object + */ + PairwiseSummarizationQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseSummarizationQualityResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseSummarizationQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityResult"; + }; + + return PairwiseSummarizationQualityResult; + })(); + + v1beta1.SummarizationHelpfulnessInput = (function() { + + /** + * Properties of a SummarizationHelpfulnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationHelpfulnessInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec|null} [metricSpec] SummarizationHelpfulnessInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance|null} [instance] SummarizationHelpfulnessInput instance + */ + + /** + * Constructs a new SummarizationHelpfulnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationHelpfulnessInput. + * @implements ISummarizationHelpfulnessInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput=} [properties] Properties to set + */ + function SummarizationHelpfulnessInput(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]]; + } + + /** + * SummarizationHelpfulnessInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @instance + */ + SummarizationHelpfulnessInput.prototype.metricSpec = null; + + /** + * SummarizationHelpfulnessInput instance. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @instance + */ + SummarizationHelpfulnessInput.prototype.instance = null; + + /** + * Creates a new SummarizationHelpfulnessInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput} SummarizationHelpfulnessInput instance + */ + SummarizationHelpfulnessInput.create = function create(properties) { + return new SummarizationHelpfulnessInput(properties); + }; + + /** + * Encodes the specified SummarizationHelpfulnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput} message SummarizationHelpfulnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SummarizationHelpfulnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInput} message SummarizationHelpfulnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationHelpfulnessInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @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.SummarizationHelpfulnessInput} SummarizationHelpfulnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessInput.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.SummarizationHelpfulnessInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationHelpfulnessInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput} SummarizationHelpfulnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationHelpfulnessInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationHelpfulnessInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a SummarizationHelpfulnessInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput} SummarizationHelpfulnessInput + */ + SummarizationHelpfulnessInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a SummarizationHelpfulnessInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput} message SummarizationHelpfulnessInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationHelpfulnessInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this SummarizationHelpfulnessInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @instance + * @returns {Object.} JSON object + */ + SummarizationHelpfulnessInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationHelpfulnessInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationHelpfulnessInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput"; + }; + + return SummarizationHelpfulnessInput; + })(); + + v1beta1.SummarizationHelpfulnessInstance = (function() { + + /** + * Properties of a SummarizationHelpfulnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationHelpfulnessInstance + * @property {string|null} [prediction] SummarizationHelpfulnessInstance prediction + * @property {string|null} [reference] SummarizationHelpfulnessInstance reference + * @property {string|null} [context] SummarizationHelpfulnessInstance context + * @property {string|null} [instruction] SummarizationHelpfulnessInstance instruction + */ + + /** + * Constructs a new SummarizationHelpfulnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationHelpfulnessInstance. + * @implements ISummarizationHelpfulnessInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance=} [properties] Properties to set + */ + function SummarizationHelpfulnessInstance(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]]; + } + + /** + * SummarizationHelpfulnessInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + SummarizationHelpfulnessInstance.prototype.prediction = null; + + /** + * SummarizationHelpfulnessInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + SummarizationHelpfulnessInstance.prototype.reference = null; + + /** + * SummarizationHelpfulnessInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + SummarizationHelpfulnessInstance.prototype.context = null; + + /** + * SummarizationHelpfulnessInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + SummarizationHelpfulnessInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationHelpfulnessInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationHelpfulnessInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationHelpfulnessInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationHelpfulnessInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationHelpfulnessInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance} SummarizationHelpfulnessInstance instance + */ + SummarizationHelpfulnessInstance.create = function create(properties) { + return new SummarizationHelpfulnessInstance(properties); + }; + + /** + * Encodes the specified SummarizationHelpfulnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance} message SummarizationHelpfulnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified SummarizationHelpfulnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessInstance} message SummarizationHelpfulnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationHelpfulnessInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @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.SummarizationHelpfulnessInstance} SummarizationHelpfulnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessInstance.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.SummarizationHelpfulnessInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationHelpfulnessInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance} SummarizationHelpfulnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationHelpfulnessInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationHelpfulnessInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a SummarizationHelpfulnessInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance} SummarizationHelpfulnessInstance + */ + SummarizationHelpfulnessInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a SummarizationHelpfulnessInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance} message SummarizationHelpfulnessInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationHelpfulnessInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this SummarizationHelpfulnessInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @instance + * @returns {Object.} JSON object + */ + SummarizationHelpfulnessInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationHelpfulnessInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationHelpfulnessInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInstance"; + }; + + return SummarizationHelpfulnessInstance; + })(); + + v1beta1.SummarizationHelpfulnessSpec = (function() { + + /** + * Properties of a SummarizationHelpfulnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationHelpfulnessSpec + * @property {boolean|null} [useReference] SummarizationHelpfulnessSpec useReference + * @property {number|null} [version] SummarizationHelpfulnessSpec version + */ + + /** + * Constructs a new SummarizationHelpfulnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationHelpfulnessSpec. + * @implements ISummarizationHelpfulnessSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec=} [properties] Properties to set + */ + function SummarizationHelpfulnessSpec(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]]; + } + + /** + * SummarizationHelpfulnessSpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @instance + */ + SummarizationHelpfulnessSpec.prototype.useReference = false; + + /** + * SummarizationHelpfulnessSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @instance + */ + SummarizationHelpfulnessSpec.prototype.version = 0; + + /** + * Creates a new SummarizationHelpfulnessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec} SummarizationHelpfulnessSpec instance + */ + SummarizationHelpfulnessSpec.create = function create(properties) { + return new SummarizationHelpfulnessSpec(properties); + }; + + /** + * Encodes the specified SummarizationHelpfulnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec} message SummarizationHelpfulnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SummarizationHelpfulnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessSpec} message SummarizationHelpfulnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationHelpfulnessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @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.SummarizationHelpfulnessSpec} SummarizationHelpfulnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessSpec.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.SummarizationHelpfulnessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationHelpfulnessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec} SummarizationHelpfulnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationHelpfulnessSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationHelpfulnessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SummarizationHelpfulnessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec} SummarizationHelpfulnessSpec + */ + SummarizationHelpfulnessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SummarizationHelpfulnessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec} message SummarizationHelpfulnessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationHelpfulnessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SummarizationHelpfulnessSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @instance + * @returns {Object.} JSON object + */ + SummarizationHelpfulnessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationHelpfulnessSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationHelpfulnessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessSpec"; + }; + + return SummarizationHelpfulnessSpec; + })(); + + v1beta1.SummarizationHelpfulnessResult = (function() { + + /** + * Properties of a SummarizationHelpfulnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationHelpfulnessResult + * @property {number|null} [score] SummarizationHelpfulnessResult score + * @property {string|null} [explanation] SummarizationHelpfulnessResult explanation + * @property {number|null} [confidence] SummarizationHelpfulnessResult confidence + */ + + /** + * Constructs a new SummarizationHelpfulnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationHelpfulnessResult. + * @implements ISummarizationHelpfulnessResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult=} [properties] Properties to set + */ + function SummarizationHelpfulnessResult(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]]; + } + + /** + * SummarizationHelpfulnessResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + */ + SummarizationHelpfulnessResult.prototype.score = null; + + /** + * SummarizationHelpfulnessResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + */ + SummarizationHelpfulnessResult.prototype.explanation = ""; + + /** + * SummarizationHelpfulnessResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + */ + SummarizationHelpfulnessResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationHelpfulnessResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationHelpfulnessResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + */ + Object.defineProperty(SummarizationHelpfulnessResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationHelpfulnessResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult} SummarizationHelpfulnessResult instance + */ + SummarizationHelpfulnessResult.create = function create(properties) { + return new SummarizationHelpfulnessResult(properties); + }; + + /** + * Encodes the specified SummarizationHelpfulnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult} message SummarizationHelpfulnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified SummarizationHelpfulnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationHelpfulnessResult} message SummarizationHelpfulnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationHelpfulnessResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationHelpfulnessResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @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.SummarizationHelpfulnessResult} SummarizationHelpfulnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessResult.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.SummarizationHelpfulnessResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationHelpfulnessResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult} SummarizationHelpfulnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationHelpfulnessResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationHelpfulnessResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationHelpfulnessResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a SummarizationHelpfulnessResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult} SummarizationHelpfulnessResult + */ + SummarizationHelpfulnessResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a SummarizationHelpfulnessResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult} message SummarizationHelpfulnessResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationHelpfulnessResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this SummarizationHelpfulnessResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @instance + * @returns {Object.} JSON object + */ + SummarizationHelpfulnessResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationHelpfulnessResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationHelpfulnessResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessResult"; + }; + + return SummarizationHelpfulnessResult; + })(); + + v1beta1.SummarizationVerbosityInput = (function() { + + /** + * Properties of a SummarizationVerbosityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationVerbosityInput + * @property {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec|null} [metricSpec] SummarizationVerbosityInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance|null} [instance] SummarizationVerbosityInput instance + */ + + /** + * Constructs a new SummarizationVerbosityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationVerbosityInput. + * @implements ISummarizationVerbosityInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput=} [properties] Properties to set + */ + function SummarizationVerbosityInput(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]]; + } + + /** + * SummarizationVerbosityInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @instance + */ + SummarizationVerbosityInput.prototype.metricSpec = null; + + /** + * SummarizationVerbosityInput instance. + * @member {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @instance + */ + SummarizationVerbosityInput.prototype.instance = null; + + /** + * Creates a new SummarizationVerbosityInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput} SummarizationVerbosityInput instance + */ + SummarizationVerbosityInput.create = function create(properties) { + return new SummarizationVerbosityInput(properties); + }; + + /** + * Encodes the specified SummarizationVerbosityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput} message SummarizationVerbosityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SummarizationVerbosityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInput} message SummarizationVerbosityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationVerbosityInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @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.SummarizationVerbosityInput} SummarizationVerbosityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityInput.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.SummarizationVerbosityInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationVerbosityInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput} SummarizationVerbosityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationVerbosityInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationVerbosityInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a SummarizationVerbosityInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput} SummarizationVerbosityInput + */ + SummarizationVerbosityInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a SummarizationVerbosityInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput} message SummarizationVerbosityInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationVerbosityInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this SummarizationVerbosityInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @instance + * @returns {Object.} JSON object + */ + SummarizationVerbosityInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationVerbosityInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationVerbosityInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput"; + }; + + return SummarizationVerbosityInput; + })(); + + v1beta1.SummarizationVerbosityInstance = (function() { + + /** + * Properties of a SummarizationVerbosityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationVerbosityInstance + * @property {string|null} [prediction] SummarizationVerbosityInstance prediction + * @property {string|null} [reference] SummarizationVerbosityInstance reference + * @property {string|null} [context] SummarizationVerbosityInstance context + * @property {string|null} [instruction] SummarizationVerbosityInstance instruction + */ + + /** + * Constructs a new SummarizationVerbosityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationVerbosityInstance. + * @implements ISummarizationVerbosityInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance=} [properties] Properties to set + */ + function SummarizationVerbosityInstance(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]]; + } + + /** + * SummarizationVerbosityInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + SummarizationVerbosityInstance.prototype.prediction = null; + + /** + * SummarizationVerbosityInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + SummarizationVerbosityInstance.prototype.reference = null; + + /** + * SummarizationVerbosityInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + SummarizationVerbosityInstance.prototype.context = null; + + /** + * SummarizationVerbosityInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + SummarizationVerbosityInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationVerbosityInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + Object.defineProperty(SummarizationVerbosityInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationVerbosityInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + Object.defineProperty(SummarizationVerbosityInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationVerbosityInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + Object.defineProperty(SummarizationVerbosityInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationVerbosityInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + */ + Object.defineProperty(SummarizationVerbosityInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationVerbosityInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance} SummarizationVerbosityInstance instance + */ + SummarizationVerbosityInstance.create = function create(properties) { + return new SummarizationVerbosityInstance(properties); + }; + + /** + * Encodes the specified SummarizationVerbosityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance} message SummarizationVerbosityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified SummarizationVerbosityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityInstance} message SummarizationVerbosityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationVerbosityInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @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.SummarizationVerbosityInstance} SummarizationVerbosityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityInstance.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.SummarizationVerbosityInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationVerbosityInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance} SummarizationVerbosityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationVerbosityInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationVerbosityInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a SummarizationVerbosityInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance} SummarizationVerbosityInstance + */ + SummarizationVerbosityInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a SummarizationVerbosityInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance} message SummarizationVerbosityInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationVerbosityInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this SummarizationVerbosityInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @instance + * @returns {Object.} JSON object + */ + SummarizationVerbosityInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationVerbosityInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationVerbosityInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationVerbosityInstance"; + }; + + return SummarizationVerbosityInstance; + })(); + + v1beta1.SummarizationVerbositySpec = (function() { + + /** + * Properties of a SummarizationVerbositySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationVerbositySpec + * @property {boolean|null} [useReference] SummarizationVerbositySpec useReference + * @property {number|null} [version] SummarizationVerbositySpec version + */ + + /** + * Constructs a new SummarizationVerbositySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationVerbositySpec. + * @implements ISummarizationVerbositySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec=} [properties] Properties to set + */ + function SummarizationVerbositySpec(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]]; + } + + /** + * SummarizationVerbositySpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @instance + */ + SummarizationVerbositySpec.prototype.useReference = false; + + /** + * SummarizationVerbositySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @instance + */ + SummarizationVerbositySpec.prototype.version = 0; + + /** + * Creates a new SummarizationVerbositySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec} SummarizationVerbositySpec instance + */ + SummarizationVerbositySpec.create = function create(properties) { + return new SummarizationVerbositySpec(properties); + }; + + /** + * Encodes the specified SummarizationVerbositySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec} message SummarizationVerbositySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbositySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SummarizationVerbositySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbositySpec} message SummarizationVerbositySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbositySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationVerbositySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @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.SummarizationVerbositySpec} SummarizationVerbositySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbositySpec.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.SummarizationVerbositySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationVerbositySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec} SummarizationVerbositySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbositySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationVerbositySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationVerbositySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SummarizationVerbositySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec} SummarizationVerbositySpec + */ + SummarizationVerbositySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SummarizationVerbositySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec} message SummarizationVerbositySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationVerbositySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SummarizationVerbositySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @instance + * @returns {Object.} JSON object + */ + SummarizationVerbositySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationVerbositySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationVerbositySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationVerbositySpec"; + }; + + return SummarizationVerbositySpec; + })(); + + v1beta1.SummarizationVerbosityResult = (function() { + + /** + * Properties of a SummarizationVerbosityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface ISummarizationVerbosityResult + * @property {number|null} [score] SummarizationVerbosityResult score + * @property {string|null} [explanation] SummarizationVerbosityResult explanation + * @property {number|null} [confidence] SummarizationVerbosityResult confidence + */ + + /** + * Constructs a new SummarizationVerbosityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a SummarizationVerbosityResult. + * @implements ISummarizationVerbosityResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult=} [properties] Properties to set + */ + function SummarizationVerbosityResult(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]]; + } + + /** + * SummarizationVerbosityResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + */ + SummarizationVerbosityResult.prototype.score = null; + + /** + * SummarizationVerbosityResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + */ + SummarizationVerbosityResult.prototype.explanation = ""; + + /** + * SummarizationVerbosityResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + */ + SummarizationVerbosityResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SummarizationVerbosityResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + */ + Object.defineProperty(SummarizationVerbosityResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SummarizationVerbosityResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + */ + Object.defineProperty(SummarizationVerbosityResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SummarizationVerbosityResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult} SummarizationVerbosityResult instance + */ + SummarizationVerbosityResult.create = function create(properties) { + return new SummarizationVerbosityResult(properties); + }; + + /** + * Encodes the specified SummarizationVerbosityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult} message SummarizationVerbosityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified SummarizationVerbosityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.ISummarizationVerbosityResult} message SummarizationVerbosityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummarizationVerbosityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummarizationVerbosityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @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.SummarizationVerbosityResult} SummarizationVerbosityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityResult.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.SummarizationVerbosityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SummarizationVerbosityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult} SummarizationVerbosityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummarizationVerbosityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummarizationVerbosityResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummarizationVerbosityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a SummarizationVerbosityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult} SummarizationVerbosityResult + */ + SummarizationVerbosityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a SummarizationVerbosityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult} message SummarizationVerbosityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummarizationVerbosityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this SummarizationVerbosityResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @instance + * @returns {Object.} JSON object + */ + SummarizationVerbosityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummarizationVerbosityResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummarizationVerbosityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SummarizationVerbosityResult"; + }; + + return SummarizationVerbosityResult; + })(); + + v1beta1.QuestionAnsweringQualityInput = (function() { + + /** + * Properties of a QuestionAnsweringQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringQualityInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec|null} [metricSpec] QuestionAnsweringQualityInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance|null} [instance] QuestionAnsweringQualityInput instance + */ + + /** + * Constructs a new QuestionAnsweringQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringQualityInput. + * @implements IQuestionAnsweringQualityInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput=} [properties] Properties to set + */ + function QuestionAnsweringQualityInput(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]]; + } + + /** + * QuestionAnsweringQualityInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @instance + */ + QuestionAnsweringQualityInput.prototype.metricSpec = null; + + /** + * QuestionAnsweringQualityInput instance. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @instance + */ + QuestionAnsweringQualityInput.prototype.instance = null; + + /** + * Creates a new QuestionAnsweringQualityInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput} QuestionAnsweringQualityInput instance + */ + QuestionAnsweringQualityInput.create = function create(properties) { + return new QuestionAnsweringQualityInput(properties); + }; + + /** + * Encodes the specified QuestionAnsweringQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput} message QuestionAnsweringQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInput} message QuestionAnsweringQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringQualityInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @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.QuestionAnsweringQualityInput} QuestionAnsweringQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityInput.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.QuestionAnsweringQualityInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringQualityInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput} QuestionAnsweringQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringQualityInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringQualityInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a QuestionAnsweringQualityInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput} QuestionAnsweringQualityInput + */ + QuestionAnsweringQualityInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringQualityInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput} message QuestionAnsweringQualityInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringQualityInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this QuestionAnsweringQualityInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringQualityInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringQualityInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringQualityInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput"; + }; + + return QuestionAnsweringQualityInput; + })(); + + v1beta1.QuestionAnsweringQualityInstance = (function() { + + /** + * Properties of a QuestionAnsweringQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringQualityInstance + * @property {string|null} [prediction] QuestionAnsweringQualityInstance prediction + * @property {string|null} [reference] QuestionAnsweringQualityInstance reference + * @property {string|null} [context] QuestionAnsweringQualityInstance context + * @property {string|null} [instruction] QuestionAnsweringQualityInstance instruction + */ + + /** + * Constructs a new QuestionAnsweringQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringQualityInstance. + * @implements IQuestionAnsweringQualityInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance=} [properties] Properties to set + */ + function QuestionAnsweringQualityInstance(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]]; + } + + /** + * QuestionAnsweringQualityInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + QuestionAnsweringQualityInstance.prototype.prediction = null; + + /** + * QuestionAnsweringQualityInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + QuestionAnsweringQualityInstance.prototype.reference = null; + + /** + * QuestionAnsweringQualityInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + QuestionAnsweringQualityInstance.prototype.context = null; + + /** + * QuestionAnsweringQualityInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + QuestionAnsweringQualityInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringQualityInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringQualityInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringQualityInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringQualityInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringQualityInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance} QuestionAnsweringQualityInstance instance + */ + QuestionAnsweringQualityInstance.create = function create(properties) { + return new QuestionAnsweringQualityInstance(properties); + }; + + /** + * Encodes the specified QuestionAnsweringQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance} message QuestionAnsweringQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityInstance} message QuestionAnsweringQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringQualityInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @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.QuestionAnsweringQualityInstance} QuestionAnsweringQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityInstance.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.QuestionAnsweringQualityInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringQualityInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance} QuestionAnsweringQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringQualityInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringQualityInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringQualityInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance} QuestionAnsweringQualityInstance + */ + QuestionAnsweringQualityInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringQualityInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance} message QuestionAnsweringQualityInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringQualityInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringQualityInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringQualityInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringQualityInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringQualityInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInstance"; + }; + + return QuestionAnsweringQualityInstance; + })(); + + v1beta1.QuestionAnsweringQualitySpec = (function() { + + /** + * Properties of a QuestionAnsweringQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringQualitySpec + * @property {boolean|null} [useReference] QuestionAnsweringQualitySpec useReference + * @property {number|null} [version] QuestionAnsweringQualitySpec version + */ + + /** + * Constructs a new QuestionAnsweringQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringQualitySpec. + * @implements IQuestionAnsweringQualitySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec=} [properties] Properties to set + */ + function QuestionAnsweringQualitySpec(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]]; + } + + /** + * QuestionAnsweringQualitySpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @instance + */ + QuestionAnsweringQualitySpec.prototype.useReference = false; + + /** + * QuestionAnsweringQualitySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @instance + */ + QuestionAnsweringQualitySpec.prototype.version = 0; + + /** + * Creates a new QuestionAnsweringQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec} QuestionAnsweringQualitySpec instance + */ + QuestionAnsweringQualitySpec.create = function create(properties) { + return new QuestionAnsweringQualitySpec(properties); + }; + + /** + * Encodes the specified QuestionAnsweringQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec} message QuestionAnsweringQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualitySpec} message QuestionAnsweringQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @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.QuestionAnsweringQualitySpec} QuestionAnsweringQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualitySpec.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.QuestionAnsweringQualitySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec} QuestionAnsweringQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringQualitySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a QuestionAnsweringQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec} QuestionAnsweringQualitySpec + */ + QuestionAnsweringQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec} message QuestionAnsweringQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this QuestionAnsweringQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringQualitySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringQualitySpec"; + }; + + return QuestionAnsweringQualitySpec; + })(); + + v1beta1.QuestionAnsweringQualityResult = (function() { + + /** + * Properties of a QuestionAnsweringQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringQualityResult + * @property {number|null} [score] QuestionAnsweringQualityResult score + * @property {string|null} [explanation] QuestionAnsweringQualityResult explanation + * @property {number|null} [confidence] QuestionAnsweringQualityResult confidence + */ + + /** + * Constructs a new QuestionAnsweringQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringQualityResult. + * @implements IQuestionAnsweringQualityResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult=} [properties] Properties to set + */ + function QuestionAnsweringQualityResult(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]]; + } + + /** + * QuestionAnsweringQualityResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + */ + QuestionAnsweringQualityResult.prototype.score = null; + + /** + * QuestionAnsweringQualityResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + */ + QuestionAnsweringQualityResult.prototype.explanation = ""; + + /** + * QuestionAnsweringQualityResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + */ + QuestionAnsweringQualityResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringQualityResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringQualityResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + */ + Object.defineProperty(QuestionAnsweringQualityResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult} QuestionAnsweringQualityResult instance + */ + QuestionAnsweringQualityResult.create = function create(properties) { + return new QuestionAnsweringQualityResult(properties); + }; + + /** + * Encodes the specified QuestionAnsweringQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult} message QuestionAnsweringQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringQualityResult} message QuestionAnsweringQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @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.QuestionAnsweringQualityResult} QuestionAnsweringQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityResult.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.QuestionAnsweringQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult} QuestionAnsweringQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringQualityResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult} QuestionAnsweringQualityResult + */ + QuestionAnsweringQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult} message QuestionAnsweringQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringQualityResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityResult"; + }; + + return QuestionAnsweringQualityResult; + })(); + + v1beta1.PairwiseQuestionAnsweringQualityInput = (function() { + + /** + * Properties of a PairwiseQuestionAnsweringQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseQuestionAnsweringQualityInput + * @property {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec|null} [metricSpec] PairwiseQuestionAnsweringQualityInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance|null} [instance] PairwiseQuestionAnsweringQualityInput instance + */ + + /** + * Constructs a new PairwiseQuestionAnsweringQualityInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseQuestionAnsweringQualityInput. + * @implements IPairwiseQuestionAnsweringQualityInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput=} [properties] Properties to set + */ + function PairwiseQuestionAnsweringQualityInput(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]]; + } + + /** + * PairwiseQuestionAnsweringQualityInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @instance + */ + PairwiseQuestionAnsweringQualityInput.prototype.metricSpec = null; + + /** + * PairwiseQuestionAnsweringQualityInput instance. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @instance + */ + PairwiseQuestionAnsweringQualityInput.prototype.instance = null; + + /** + * Creates a new PairwiseQuestionAnsweringQualityInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput} PairwiseQuestionAnsweringQualityInput instance + */ + PairwiseQuestionAnsweringQualityInput.create = function create(properties) { + return new PairwiseQuestionAnsweringQualityInput(properties); + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput} message PairwiseQuestionAnsweringQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInput} message PairwiseQuestionAnsweringQualityInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @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.PairwiseQuestionAnsweringQualityInput} PairwiseQuestionAnsweringQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityInput.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.PairwiseQuestionAnsweringQualityInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput} PairwiseQuestionAnsweringQualityInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseQuestionAnsweringQualityInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseQuestionAnsweringQualityInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a PairwiseQuestionAnsweringQualityInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput} PairwiseQuestionAnsweringQualityInput + */ + PairwiseQuestionAnsweringQualityInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput} message PairwiseQuestionAnsweringQualityInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseQuestionAnsweringQualityInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this PairwiseQuestionAnsweringQualityInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @instance + * @returns {Object.} JSON object + */ + PairwiseQuestionAnsweringQualityInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseQuestionAnsweringQualityInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput"; + }; + + return PairwiseQuestionAnsweringQualityInput; + })(); + + v1beta1.PairwiseQuestionAnsweringQualityInstance = (function() { + + /** + * Properties of a PairwiseQuestionAnsweringQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseQuestionAnsweringQualityInstance + * @property {string|null} [prediction] PairwiseQuestionAnsweringQualityInstance prediction + * @property {string|null} [baselinePrediction] PairwiseQuestionAnsweringQualityInstance baselinePrediction + * @property {string|null} [reference] PairwiseQuestionAnsweringQualityInstance reference + * @property {string|null} [context] PairwiseQuestionAnsweringQualityInstance context + * @property {string|null} [instruction] PairwiseQuestionAnsweringQualityInstance instruction + */ + + /** + * Constructs a new PairwiseQuestionAnsweringQualityInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseQuestionAnsweringQualityInstance. + * @implements IPairwiseQuestionAnsweringQualityInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance=} [properties] Properties to set + */ + function PairwiseQuestionAnsweringQualityInstance(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]]; + } + + /** + * PairwiseQuestionAnsweringQualityInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + PairwiseQuestionAnsweringQualityInstance.prototype.prediction = null; + + /** + * PairwiseQuestionAnsweringQualityInstance baselinePrediction. + * @member {string|null|undefined} baselinePrediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + PairwiseQuestionAnsweringQualityInstance.prototype.baselinePrediction = null; + + /** + * PairwiseQuestionAnsweringQualityInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + PairwiseQuestionAnsweringQualityInstance.prototype.reference = null; + + /** + * PairwiseQuestionAnsweringQualityInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + PairwiseQuestionAnsweringQualityInstance.prototype.context = null; + + /** + * PairwiseQuestionAnsweringQualityInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + PairwiseQuestionAnsweringQualityInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PairwiseQuestionAnsweringQualityInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseQuestionAnsweringQualityInstance _baselinePrediction. + * @member {"baselinePrediction"|undefined} _baselinePrediction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityInstance.prototype, "_baselinePrediction", { + get: $util.oneOfGetter($oneOfFields = ["baselinePrediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseQuestionAnsweringQualityInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseQuestionAnsweringQualityInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * PairwiseQuestionAnsweringQualityInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairwiseQuestionAnsweringQualityInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance} PairwiseQuestionAnsweringQualityInstance instance + */ + PairwiseQuestionAnsweringQualityInstance.create = function create(properties) { + return new PairwiseQuestionAnsweringQualityInstance(properties); + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance} message PairwiseQuestionAnsweringQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.baselinePrediction != null && Object.hasOwnProperty.call(message, "baselinePrediction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baselinePrediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityInstance} message PairwiseQuestionAnsweringQualityInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @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.PairwiseQuestionAnsweringQualityInstance} PairwiseQuestionAnsweringQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityInstance.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.PairwiseQuestionAnsweringQualityInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.baselinePrediction = reader.string(); + break; + } + case 3: { + message.reference = reader.string(); + break; + } + case 4: { + message.context = reader.string(); + break; + } + case 5: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance} PairwiseQuestionAnsweringQualityInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseQuestionAnsweringQualityInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseQuestionAnsweringQualityInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.baselinePrediction != null && message.hasOwnProperty("baselinePrediction")) { + properties._baselinePrediction = 1; + if (!$util.isString(message.baselinePrediction)) + return "baselinePrediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a PairwiseQuestionAnsweringQualityInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance} PairwiseQuestionAnsweringQualityInstance + */ + PairwiseQuestionAnsweringQualityInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.baselinePrediction != null) + message.baselinePrediction = String(object.baselinePrediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance} message PairwiseQuestionAnsweringQualityInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseQuestionAnsweringQualityInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.baselinePrediction != null && message.hasOwnProperty("baselinePrediction")) { + object.baselinePrediction = message.baselinePrediction; + if (options.oneofs) + object._baselinePrediction = "baselinePrediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this PairwiseQuestionAnsweringQualityInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @instance + * @returns {Object.} JSON object + */ + PairwiseQuestionAnsweringQualityInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseQuestionAnsweringQualityInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInstance"; + }; + + return PairwiseQuestionAnsweringQualityInstance; + })(); + + v1beta1.PairwiseQuestionAnsweringQualitySpec = (function() { + + /** + * Properties of a PairwiseQuestionAnsweringQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseQuestionAnsweringQualitySpec + * @property {boolean|null} [useReference] PairwiseQuestionAnsweringQualitySpec useReference + * @property {number|null} [version] PairwiseQuestionAnsweringQualitySpec version + */ + + /** + * Constructs a new PairwiseQuestionAnsweringQualitySpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseQuestionAnsweringQualitySpec. + * @implements IPairwiseQuestionAnsweringQualitySpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec=} [properties] Properties to set + */ + function PairwiseQuestionAnsweringQualitySpec(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]]; + } + + /** + * PairwiseQuestionAnsweringQualitySpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @instance + */ + PairwiseQuestionAnsweringQualitySpec.prototype.useReference = false; + + /** + * PairwiseQuestionAnsweringQualitySpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @instance + */ + PairwiseQuestionAnsweringQualitySpec.prototype.version = 0; + + /** + * Creates a new PairwiseQuestionAnsweringQualitySpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec} PairwiseQuestionAnsweringQualitySpec instance + */ + PairwiseQuestionAnsweringQualitySpec.create = function create(properties) { + return new PairwiseQuestionAnsweringQualitySpec(properties); + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualitySpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec} message PairwiseQuestionAnsweringQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualitySpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualitySpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualitySpec} message PairwiseQuestionAnsweringQualitySpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualitySpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualitySpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @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.PairwiseQuestionAnsweringQualitySpec} PairwiseQuestionAnsweringQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualitySpec.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.PairwiseQuestionAnsweringQualitySpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualitySpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec} PairwiseQuestionAnsweringQualitySpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualitySpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseQuestionAnsweringQualitySpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseQuestionAnsweringQualitySpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a PairwiseQuestionAnsweringQualitySpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec} PairwiseQuestionAnsweringQualitySpec + */ + PairwiseQuestionAnsweringQualitySpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualitySpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec} message PairwiseQuestionAnsweringQualitySpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseQuestionAnsweringQualitySpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this PairwiseQuestionAnsweringQualitySpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @instance + * @returns {Object.} JSON object + */ + PairwiseQuestionAnsweringQualitySpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualitySpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseQuestionAnsweringQualitySpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualitySpec"; + }; + + return PairwiseQuestionAnsweringQualitySpec; + })(); + + v1beta1.PairwiseQuestionAnsweringQualityResult = (function() { + + /** + * Properties of a PairwiseQuestionAnsweringQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IPairwiseQuestionAnsweringQualityResult + * @property {google.cloud.aiplatform.v1beta1.PairwiseChoice|null} [pairwiseChoice] PairwiseQuestionAnsweringQualityResult pairwiseChoice + * @property {string|null} [explanation] PairwiseQuestionAnsweringQualityResult explanation + * @property {number|null} [confidence] PairwiseQuestionAnsweringQualityResult confidence + */ + + /** + * Constructs a new PairwiseQuestionAnsweringQualityResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a PairwiseQuestionAnsweringQualityResult. + * @implements IPairwiseQuestionAnsweringQualityResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult=} [properties] Properties to set + */ + function PairwiseQuestionAnsweringQualityResult(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]]; + } + + /** + * PairwiseQuestionAnsweringQualityResult pairwiseChoice. + * @member {google.cloud.aiplatform.v1beta1.PairwiseChoice} pairwiseChoice + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @instance + */ + PairwiseQuestionAnsweringQualityResult.prototype.pairwiseChoice = 0; + + /** + * PairwiseQuestionAnsweringQualityResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @instance + */ + PairwiseQuestionAnsweringQualityResult.prototype.explanation = ""; + + /** + * PairwiseQuestionAnsweringQualityResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @instance + */ + PairwiseQuestionAnsweringQualityResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PairwiseQuestionAnsweringQualityResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @instance + */ + Object.defineProperty(PairwiseQuestionAnsweringQualityResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PairwiseQuestionAnsweringQualityResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult} PairwiseQuestionAnsweringQualityResult instance + */ + PairwiseQuestionAnsweringQualityResult.create = function create(properties) { + return new PairwiseQuestionAnsweringQualityResult(properties); + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult} message PairwiseQuestionAnsweringQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairwiseChoice != null && Object.hasOwnProperty.call(message, "pairwiseChoice")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pairwiseChoice); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified PairwiseQuestionAnsweringQualityResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IPairwiseQuestionAnsweringQualityResult} message PairwiseQuestionAnsweringQualityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PairwiseQuestionAnsweringQualityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @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.PairwiseQuestionAnsweringQualityResult} PairwiseQuestionAnsweringQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityResult.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.PairwiseQuestionAnsweringQualityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pairwiseChoice = reader.int32(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PairwiseQuestionAnsweringQualityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult} PairwiseQuestionAnsweringQualityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PairwiseQuestionAnsweringQualityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PairwiseQuestionAnsweringQualityResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PairwiseQuestionAnsweringQualityResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pairwiseChoice != null && message.hasOwnProperty("pairwiseChoice")) + switch (message.pairwiseChoice) { + default: + return "pairwiseChoice: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a PairwiseQuestionAnsweringQualityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult} PairwiseQuestionAnsweringQualityResult + */ + PairwiseQuestionAnsweringQualityResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult(); + switch (object.pairwiseChoice) { + default: + if (typeof object.pairwiseChoice === "number") { + message.pairwiseChoice = object.pairwiseChoice; + break; + } + break; + case "PAIRWISE_CHOICE_UNSPECIFIED": + case 0: + message.pairwiseChoice = 0; + break; + case "BASELINE": + case 1: + message.pairwiseChoice = 1; + break; + case "CANDIDATE": + case 2: + message.pairwiseChoice = 2; + break; + case "TIE": + case 3: + message.pairwiseChoice = 3; + break; + } + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a PairwiseQuestionAnsweringQualityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult} message PairwiseQuestionAnsweringQualityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PairwiseQuestionAnsweringQualityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pairwiseChoice = options.enums === String ? "PAIRWISE_CHOICE_UNSPECIFIED" : 0; + object.explanation = ""; + } + if (message.pairwiseChoice != null && message.hasOwnProperty("pairwiseChoice")) + object.pairwiseChoice = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.PairwiseChoice[message.pairwiseChoice] === undefined ? message.pairwiseChoice : $root.google.cloud.aiplatform.v1beta1.PairwiseChoice[message.pairwiseChoice] : message.pairwiseChoice; + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this PairwiseQuestionAnsweringQualityResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @instance + * @returns {Object.} JSON object + */ + PairwiseQuestionAnsweringQualityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PairwiseQuestionAnsweringQualityResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PairwiseQuestionAnsweringQualityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityResult"; + }; + + return PairwiseQuestionAnsweringQualityResult; + })(); + + v1beta1.QuestionAnsweringRelevanceInput = (function() { + + /** + * Properties of a QuestionAnsweringRelevanceInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringRelevanceInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec|null} [metricSpec] QuestionAnsweringRelevanceInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance|null} [instance] QuestionAnsweringRelevanceInput instance + */ + + /** + * Constructs a new QuestionAnsweringRelevanceInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringRelevanceInput. + * @implements IQuestionAnsweringRelevanceInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput=} [properties] Properties to set + */ + function QuestionAnsweringRelevanceInput(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]]; + } + + /** + * QuestionAnsweringRelevanceInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @instance + */ + QuestionAnsweringRelevanceInput.prototype.metricSpec = null; + + /** + * QuestionAnsweringRelevanceInput instance. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @instance + */ + QuestionAnsweringRelevanceInput.prototype.instance = null; + + /** + * Creates a new QuestionAnsweringRelevanceInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput} QuestionAnsweringRelevanceInput instance + */ + QuestionAnsweringRelevanceInput.create = function create(properties) { + return new QuestionAnsweringRelevanceInput(properties); + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput} message QuestionAnsweringRelevanceInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInput} message QuestionAnsweringRelevanceInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringRelevanceInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @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.QuestionAnsweringRelevanceInput} QuestionAnsweringRelevanceInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceInput.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.QuestionAnsweringRelevanceInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringRelevanceInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput} QuestionAnsweringRelevanceInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringRelevanceInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringRelevanceInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a QuestionAnsweringRelevanceInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput} QuestionAnsweringRelevanceInput + */ + QuestionAnsweringRelevanceInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput} message QuestionAnsweringRelevanceInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringRelevanceInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this QuestionAnsweringRelevanceInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringRelevanceInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringRelevanceInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput"; + }; + + return QuestionAnsweringRelevanceInput; + })(); + + v1beta1.QuestionAnsweringRelevanceInstance = (function() { + + /** + * Properties of a QuestionAnsweringRelevanceInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringRelevanceInstance + * @property {string|null} [prediction] QuestionAnsweringRelevanceInstance prediction + * @property {string|null} [reference] QuestionAnsweringRelevanceInstance reference + * @property {string|null} [context] QuestionAnsweringRelevanceInstance context + * @property {string|null} [instruction] QuestionAnsweringRelevanceInstance instruction + */ + + /** + * Constructs a new QuestionAnsweringRelevanceInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringRelevanceInstance. + * @implements IQuestionAnsweringRelevanceInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance=} [properties] Properties to set + */ + function QuestionAnsweringRelevanceInstance(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]]; + } + + /** + * QuestionAnsweringRelevanceInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + QuestionAnsweringRelevanceInstance.prototype.prediction = null; + + /** + * QuestionAnsweringRelevanceInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + QuestionAnsweringRelevanceInstance.prototype.reference = null; + + /** + * QuestionAnsweringRelevanceInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + QuestionAnsweringRelevanceInstance.prototype.context = null; + + /** + * QuestionAnsweringRelevanceInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + QuestionAnsweringRelevanceInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringRelevanceInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringRelevanceInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringRelevanceInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringRelevanceInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringRelevanceInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance} QuestionAnsweringRelevanceInstance instance + */ + QuestionAnsweringRelevanceInstance.create = function create(properties) { + return new QuestionAnsweringRelevanceInstance(properties); + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance} message QuestionAnsweringRelevanceInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceInstance} message QuestionAnsweringRelevanceInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringRelevanceInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @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.QuestionAnsweringRelevanceInstance} QuestionAnsweringRelevanceInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceInstance.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.QuestionAnsweringRelevanceInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringRelevanceInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance} QuestionAnsweringRelevanceInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringRelevanceInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringRelevanceInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringRelevanceInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance} QuestionAnsweringRelevanceInstance + */ + QuestionAnsweringRelevanceInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance} message QuestionAnsweringRelevanceInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringRelevanceInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringRelevanceInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringRelevanceInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringRelevanceInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInstance"; + }; + + return QuestionAnsweringRelevanceInstance; + })(); + + v1beta1.QuestionAnsweringRelevanceSpec = (function() { + + /** + * Properties of a QuestionAnsweringRelevanceSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringRelevanceSpec + * @property {boolean|null} [useReference] QuestionAnsweringRelevanceSpec useReference + * @property {number|null} [version] QuestionAnsweringRelevanceSpec version + */ + + /** + * Constructs a new QuestionAnsweringRelevanceSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringRelevanceSpec. + * @implements IQuestionAnsweringRelevanceSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec=} [properties] Properties to set + */ + function QuestionAnsweringRelevanceSpec(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]]; + } + + /** + * QuestionAnsweringRelevanceSpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @instance + */ + QuestionAnsweringRelevanceSpec.prototype.useReference = false; + + /** + * QuestionAnsweringRelevanceSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @instance + */ + QuestionAnsweringRelevanceSpec.prototype.version = 0; + + /** + * Creates a new QuestionAnsweringRelevanceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec} QuestionAnsweringRelevanceSpec instance + */ + QuestionAnsweringRelevanceSpec.create = function create(properties) { + return new QuestionAnsweringRelevanceSpec(properties); + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec} message QuestionAnsweringRelevanceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceSpec} message QuestionAnsweringRelevanceSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringRelevanceSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @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.QuestionAnsweringRelevanceSpec} QuestionAnsweringRelevanceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceSpec.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.QuestionAnsweringRelevanceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringRelevanceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec} QuestionAnsweringRelevanceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringRelevanceSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringRelevanceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a QuestionAnsweringRelevanceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec} QuestionAnsweringRelevanceSpec + */ + QuestionAnsweringRelevanceSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec} message QuestionAnsweringRelevanceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringRelevanceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this QuestionAnsweringRelevanceSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringRelevanceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringRelevanceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceSpec"; + }; + + return QuestionAnsweringRelevanceSpec; + })(); + + v1beta1.QuestionAnsweringRelevanceResult = (function() { + + /** + * Properties of a QuestionAnsweringRelevanceResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringRelevanceResult + * @property {number|null} [score] QuestionAnsweringRelevanceResult score + * @property {string|null} [explanation] QuestionAnsweringRelevanceResult explanation + * @property {number|null} [confidence] QuestionAnsweringRelevanceResult confidence + */ + + /** + * Constructs a new QuestionAnsweringRelevanceResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringRelevanceResult. + * @implements IQuestionAnsweringRelevanceResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult=} [properties] Properties to set + */ + function QuestionAnsweringRelevanceResult(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]]; + } + + /** + * QuestionAnsweringRelevanceResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + */ + QuestionAnsweringRelevanceResult.prototype.score = null; + + /** + * QuestionAnsweringRelevanceResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + */ + QuestionAnsweringRelevanceResult.prototype.explanation = ""; + + /** + * QuestionAnsweringRelevanceResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + */ + QuestionAnsweringRelevanceResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringRelevanceResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringRelevanceResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + */ + Object.defineProperty(QuestionAnsweringRelevanceResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringRelevanceResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult} QuestionAnsweringRelevanceResult instance + */ + QuestionAnsweringRelevanceResult.create = function create(properties) { + return new QuestionAnsweringRelevanceResult(properties); + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult} message QuestionAnsweringRelevanceResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringRelevanceResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringRelevanceResult} message QuestionAnsweringRelevanceResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringRelevanceResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringRelevanceResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @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.QuestionAnsweringRelevanceResult} QuestionAnsweringRelevanceResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceResult.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.QuestionAnsweringRelevanceResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringRelevanceResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult} QuestionAnsweringRelevanceResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringRelevanceResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringRelevanceResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringRelevanceResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringRelevanceResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult} QuestionAnsweringRelevanceResult + */ + QuestionAnsweringRelevanceResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringRelevanceResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult} message QuestionAnsweringRelevanceResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringRelevanceResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringRelevanceResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringRelevanceResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringRelevanceResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringRelevanceResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceResult"; + }; + + return QuestionAnsweringRelevanceResult; + })(); + + v1beta1.QuestionAnsweringHelpfulnessInput = (function() { + + /** + * Properties of a QuestionAnsweringHelpfulnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringHelpfulnessInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec|null} [metricSpec] QuestionAnsweringHelpfulnessInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance|null} [instance] QuestionAnsweringHelpfulnessInput instance + */ + + /** + * Constructs a new QuestionAnsweringHelpfulnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringHelpfulnessInput. + * @implements IQuestionAnsweringHelpfulnessInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput=} [properties] Properties to set + */ + function QuestionAnsweringHelpfulnessInput(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]]; + } + + /** + * QuestionAnsweringHelpfulnessInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @instance + */ + QuestionAnsweringHelpfulnessInput.prototype.metricSpec = null; + + /** + * QuestionAnsweringHelpfulnessInput instance. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @instance + */ + QuestionAnsweringHelpfulnessInput.prototype.instance = null; + + /** + * Creates a new QuestionAnsweringHelpfulnessInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput} QuestionAnsweringHelpfulnessInput instance + */ + QuestionAnsweringHelpfulnessInput.create = function create(properties) { + return new QuestionAnsweringHelpfulnessInput(properties); + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput} message QuestionAnsweringHelpfulnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInput} message QuestionAnsweringHelpfulnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @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.QuestionAnsweringHelpfulnessInput} QuestionAnsweringHelpfulnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessInput.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.QuestionAnsweringHelpfulnessInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput} QuestionAnsweringHelpfulnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringHelpfulnessInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringHelpfulnessInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a QuestionAnsweringHelpfulnessInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput} QuestionAnsweringHelpfulnessInput + */ + QuestionAnsweringHelpfulnessInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput} message QuestionAnsweringHelpfulnessInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringHelpfulnessInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this QuestionAnsweringHelpfulnessInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringHelpfulnessInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringHelpfulnessInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput"; + }; + + return QuestionAnsweringHelpfulnessInput; + })(); + + v1beta1.QuestionAnsweringHelpfulnessInstance = (function() { + + /** + * Properties of a QuestionAnsweringHelpfulnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringHelpfulnessInstance + * @property {string|null} [prediction] QuestionAnsweringHelpfulnessInstance prediction + * @property {string|null} [reference] QuestionAnsweringHelpfulnessInstance reference + * @property {string|null} [context] QuestionAnsweringHelpfulnessInstance context + * @property {string|null} [instruction] QuestionAnsweringHelpfulnessInstance instruction + */ + + /** + * Constructs a new QuestionAnsweringHelpfulnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringHelpfulnessInstance. + * @implements IQuestionAnsweringHelpfulnessInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance=} [properties] Properties to set + */ + function QuestionAnsweringHelpfulnessInstance(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]]; + } + + /** + * QuestionAnsweringHelpfulnessInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + QuestionAnsweringHelpfulnessInstance.prototype.prediction = null; + + /** + * QuestionAnsweringHelpfulnessInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + QuestionAnsweringHelpfulnessInstance.prototype.reference = null; + + /** + * QuestionAnsweringHelpfulnessInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + QuestionAnsweringHelpfulnessInstance.prototype.context = null; + + /** + * QuestionAnsweringHelpfulnessInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + QuestionAnsweringHelpfulnessInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringHelpfulnessInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringHelpfulnessInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringHelpfulnessInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringHelpfulnessInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringHelpfulnessInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance} QuestionAnsweringHelpfulnessInstance instance + */ + QuestionAnsweringHelpfulnessInstance.create = function create(properties) { + return new QuestionAnsweringHelpfulnessInstance(properties); + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance} message QuestionAnsweringHelpfulnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessInstance} message QuestionAnsweringHelpfulnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @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.QuestionAnsweringHelpfulnessInstance} QuestionAnsweringHelpfulnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessInstance.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.QuestionAnsweringHelpfulnessInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance} QuestionAnsweringHelpfulnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringHelpfulnessInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringHelpfulnessInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringHelpfulnessInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance} QuestionAnsweringHelpfulnessInstance + */ + QuestionAnsweringHelpfulnessInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance} message QuestionAnsweringHelpfulnessInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringHelpfulnessInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringHelpfulnessInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringHelpfulnessInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringHelpfulnessInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInstance"; + }; + + return QuestionAnsweringHelpfulnessInstance; + })(); + + v1beta1.QuestionAnsweringHelpfulnessSpec = (function() { + + /** + * Properties of a QuestionAnsweringHelpfulnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringHelpfulnessSpec + * @property {boolean|null} [useReference] QuestionAnsweringHelpfulnessSpec useReference + * @property {number|null} [version] QuestionAnsweringHelpfulnessSpec version + */ + + /** + * Constructs a new QuestionAnsweringHelpfulnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringHelpfulnessSpec. + * @implements IQuestionAnsweringHelpfulnessSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec=} [properties] Properties to set + */ + function QuestionAnsweringHelpfulnessSpec(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]]; + } + + /** + * QuestionAnsweringHelpfulnessSpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @instance + */ + QuestionAnsweringHelpfulnessSpec.prototype.useReference = false; + + /** + * QuestionAnsweringHelpfulnessSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @instance + */ + QuestionAnsweringHelpfulnessSpec.prototype.version = 0; + + /** + * Creates a new QuestionAnsweringHelpfulnessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec} QuestionAnsweringHelpfulnessSpec instance + */ + QuestionAnsweringHelpfulnessSpec.create = function create(properties) { + return new QuestionAnsweringHelpfulnessSpec(properties); + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec} message QuestionAnsweringHelpfulnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessSpec} message QuestionAnsweringHelpfulnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @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.QuestionAnsweringHelpfulnessSpec} QuestionAnsweringHelpfulnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessSpec.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.QuestionAnsweringHelpfulnessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec} QuestionAnsweringHelpfulnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringHelpfulnessSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringHelpfulnessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a QuestionAnsweringHelpfulnessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec} QuestionAnsweringHelpfulnessSpec + */ + QuestionAnsweringHelpfulnessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec} message QuestionAnsweringHelpfulnessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringHelpfulnessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this QuestionAnsweringHelpfulnessSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringHelpfulnessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringHelpfulnessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessSpec"; + }; + + return QuestionAnsweringHelpfulnessSpec; + })(); + + v1beta1.QuestionAnsweringHelpfulnessResult = (function() { + + /** + * Properties of a QuestionAnsweringHelpfulnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringHelpfulnessResult + * @property {number|null} [score] QuestionAnsweringHelpfulnessResult score + * @property {string|null} [explanation] QuestionAnsweringHelpfulnessResult explanation + * @property {number|null} [confidence] QuestionAnsweringHelpfulnessResult confidence + */ + + /** + * Constructs a new QuestionAnsweringHelpfulnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringHelpfulnessResult. + * @implements IQuestionAnsweringHelpfulnessResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult=} [properties] Properties to set + */ + function QuestionAnsweringHelpfulnessResult(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]]; + } + + /** + * QuestionAnsweringHelpfulnessResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + */ + QuestionAnsweringHelpfulnessResult.prototype.score = null; + + /** + * QuestionAnsweringHelpfulnessResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + */ + QuestionAnsweringHelpfulnessResult.prototype.explanation = ""; + + /** + * QuestionAnsweringHelpfulnessResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + */ + QuestionAnsweringHelpfulnessResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringHelpfulnessResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringHelpfulnessResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + */ + Object.defineProperty(QuestionAnsweringHelpfulnessResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringHelpfulnessResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult} QuestionAnsweringHelpfulnessResult instance + */ + QuestionAnsweringHelpfulnessResult.create = function create(properties) { + return new QuestionAnsweringHelpfulnessResult(properties); + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult} message QuestionAnsweringHelpfulnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringHelpfulnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringHelpfulnessResult} message QuestionAnsweringHelpfulnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringHelpfulnessResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @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.QuestionAnsweringHelpfulnessResult} QuestionAnsweringHelpfulnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessResult.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.QuestionAnsweringHelpfulnessResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringHelpfulnessResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult} QuestionAnsweringHelpfulnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringHelpfulnessResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringHelpfulnessResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringHelpfulnessResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringHelpfulnessResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult} QuestionAnsweringHelpfulnessResult + */ + QuestionAnsweringHelpfulnessResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringHelpfulnessResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult} message QuestionAnsweringHelpfulnessResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringHelpfulnessResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringHelpfulnessResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringHelpfulnessResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringHelpfulnessResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringHelpfulnessResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessResult"; + }; + + return QuestionAnsweringHelpfulnessResult; + })(); + + v1beta1.QuestionAnsweringCorrectnessInput = (function() { + + /** + * Properties of a QuestionAnsweringCorrectnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringCorrectnessInput + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec|null} [metricSpec] QuestionAnsweringCorrectnessInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance|null} [instance] QuestionAnsweringCorrectnessInput instance + */ + + /** + * Constructs a new QuestionAnsweringCorrectnessInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringCorrectnessInput. + * @implements IQuestionAnsweringCorrectnessInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput=} [properties] Properties to set + */ + function QuestionAnsweringCorrectnessInput(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]]; + } + + /** + * QuestionAnsweringCorrectnessInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @instance + */ + QuestionAnsweringCorrectnessInput.prototype.metricSpec = null; + + /** + * QuestionAnsweringCorrectnessInput instance. + * @member {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @instance + */ + QuestionAnsweringCorrectnessInput.prototype.instance = null; + + /** + * Creates a new QuestionAnsweringCorrectnessInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput} QuestionAnsweringCorrectnessInput instance + */ + QuestionAnsweringCorrectnessInput.create = function create(properties) { + return new QuestionAnsweringCorrectnessInput(properties); + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput} message QuestionAnsweringCorrectnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInput} message QuestionAnsweringCorrectnessInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringCorrectnessInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @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.QuestionAnsweringCorrectnessInput} QuestionAnsweringCorrectnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessInput.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.QuestionAnsweringCorrectnessInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringCorrectnessInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput} QuestionAnsweringCorrectnessInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringCorrectnessInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringCorrectnessInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a QuestionAnsweringCorrectnessInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput} QuestionAnsweringCorrectnessInput + */ + QuestionAnsweringCorrectnessInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput} message QuestionAnsweringCorrectnessInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringCorrectnessInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this QuestionAnsweringCorrectnessInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringCorrectnessInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringCorrectnessInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput"; + }; + + return QuestionAnsweringCorrectnessInput; + })(); + + v1beta1.QuestionAnsweringCorrectnessInstance = (function() { + + /** + * Properties of a QuestionAnsweringCorrectnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringCorrectnessInstance + * @property {string|null} [prediction] QuestionAnsweringCorrectnessInstance prediction + * @property {string|null} [reference] QuestionAnsweringCorrectnessInstance reference + * @property {string|null} [context] QuestionAnsweringCorrectnessInstance context + * @property {string|null} [instruction] QuestionAnsweringCorrectnessInstance instruction + */ + + /** + * Constructs a new QuestionAnsweringCorrectnessInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringCorrectnessInstance. + * @implements IQuestionAnsweringCorrectnessInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance=} [properties] Properties to set + */ + function QuestionAnsweringCorrectnessInstance(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]]; + } + + /** + * QuestionAnsweringCorrectnessInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + QuestionAnsweringCorrectnessInstance.prototype.prediction = null; + + /** + * QuestionAnsweringCorrectnessInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + QuestionAnsweringCorrectnessInstance.prototype.reference = null; + + /** + * QuestionAnsweringCorrectnessInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + QuestionAnsweringCorrectnessInstance.prototype.context = null; + + /** + * QuestionAnsweringCorrectnessInstance instruction. + * @member {string|null|undefined} instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + QuestionAnsweringCorrectnessInstance.prototype.instruction = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringCorrectnessInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringCorrectnessInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringCorrectnessInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringCorrectnessInstance _instruction. + * @member {"instruction"|undefined} _instruction + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessInstance.prototype, "_instruction", { + get: $util.oneOfGetter($oneOfFields = ["instruction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringCorrectnessInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance} QuestionAnsweringCorrectnessInstance instance + */ + QuestionAnsweringCorrectnessInstance.create = function create(properties) { + return new QuestionAnsweringCorrectnessInstance(properties); + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance} message QuestionAnsweringCorrectnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.context); + if (message.instruction != null && Object.hasOwnProperty.call(message, "instruction")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instruction); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessInstance} message QuestionAnsweringCorrectnessInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringCorrectnessInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @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.QuestionAnsweringCorrectnessInstance} QuestionAnsweringCorrectnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessInstance.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.QuestionAnsweringCorrectnessInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + case 3: { + message.context = reader.string(); + break; + } + case 4: { + message.instruction = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringCorrectnessInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance} QuestionAnsweringCorrectnessInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringCorrectnessInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringCorrectnessInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + properties._instruction = 1; + if (!$util.isString(message.instruction)) + return "instruction: string expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringCorrectnessInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance} QuestionAnsweringCorrectnessInstance + */ + QuestionAnsweringCorrectnessInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + if (object.instruction != null) + message.instruction = String(object.instruction); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance} message QuestionAnsweringCorrectnessInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringCorrectnessInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + if (message.instruction != null && message.hasOwnProperty("instruction")) { + object.instruction = message.instruction; + if (options.oneofs) + object._instruction = "instruction"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringCorrectnessInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringCorrectnessInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringCorrectnessInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInstance"; + }; + + return QuestionAnsweringCorrectnessInstance; + })(); + + v1beta1.QuestionAnsweringCorrectnessSpec = (function() { + + /** + * Properties of a QuestionAnsweringCorrectnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringCorrectnessSpec + * @property {boolean|null} [useReference] QuestionAnsweringCorrectnessSpec useReference + * @property {number|null} [version] QuestionAnsweringCorrectnessSpec version + */ + + /** + * Constructs a new QuestionAnsweringCorrectnessSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringCorrectnessSpec. + * @implements IQuestionAnsweringCorrectnessSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec=} [properties] Properties to set + */ + function QuestionAnsweringCorrectnessSpec(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]]; + } + + /** + * QuestionAnsweringCorrectnessSpec useReference. + * @member {boolean} useReference + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @instance + */ + QuestionAnsweringCorrectnessSpec.prototype.useReference = false; + + /** + * QuestionAnsweringCorrectnessSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @instance + */ + QuestionAnsweringCorrectnessSpec.prototype.version = 0; + + /** + * Creates a new QuestionAnsweringCorrectnessSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec} QuestionAnsweringCorrectnessSpec instance + */ + QuestionAnsweringCorrectnessSpec.create = function create(properties) { + return new QuestionAnsweringCorrectnessSpec(properties); + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec} message QuestionAnsweringCorrectnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useReference != null && Object.hasOwnProperty.call(message, "useReference")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useReference); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessSpec} message QuestionAnsweringCorrectnessSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringCorrectnessSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @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.QuestionAnsweringCorrectnessSpec} QuestionAnsweringCorrectnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessSpec.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.QuestionAnsweringCorrectnessSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useReference = reader.bool(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringCorrectnessSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec} QuestionAnsweringCorrectnessSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringCorrectnessSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringCorrectnessSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useReference != null && message.hasOwnProperty("useReference")) + if (typeof message.useReference !== "boolean") + return "useReference: boolean expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a QuestionAnsweringCorrectnessSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec} QuestionAnsweringCorrectnessSpec + */ + QuestionAnsweringCorrectnessSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec(); + if (object.useReference != null) + message.useReference = Boolean(object.useReference); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec} message QuestionAnsweringCorrectnessSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringCorrectnessSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useReference = false; + object.version = 0; + } + if (message.useReference != null && message.hasOwnProperty("useReference")) + object.useReference = message.useReference; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this QuestionAnsweringCorrectnessSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringCorrectnessSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringCorrectnessSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessSpec"; + }; + + return QuestionAnsweringCorrectnessSpec; + })(); + + v1beta1.QuestionAnsweringCorrectnessResult = (function() { + + /** + * Properties of a QuestionAnsweringCorrectnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IQuestionAnsweringCorrectnessResult + * @property {number|null} [score] QuestionAnsweringCorrectnessResult score + * @property {string|null} [explanation] QuestionAnsweringCorrectnessResult explanation + * @property {number|null} [confidence] QuestionAnsweringCorrectnessResult confidence + */ + + /** + * Constructs a new QuestionAnsweringCorrectnessResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a QuestionAnsweringCorrectnessResult. + * @implements IQuestionAnsweringCorrectnessResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult=} [properties] Properties to set + */ + function QuestionAnsweringCorrectnessResult(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]]; + } + + /** + * QuestionAnsweringCorrectnessResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + */ + QuestionAnsweringCorrectnessResult.prototype.score = null; + + /** + * QuestionAnsweringCorrectnessResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + */ + QuestionAnsweringCorrectnessResult.prototype.explanation = ""; + + /** + * QuestionAnsweringCorrectnessResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + */ + QuestionAnsweringCorrectnessResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuestionAnsweringCorrectnessResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * QuestionAnsweringCorrectnessResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + */ + Object.defineProperty(QuestionAnsweringCorrectnessResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuestionAnsweringCorrectnessResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult} QuestionAnsweringCorrectnessResult instance + */ + QuestionAnsweringCorrectnessResult.create = function create(properties) { + return new QuestionAnsweringCorrectnessResult(properties); + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult} message QuestionAnsweringCorrectnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified QuestionAnsweringCorrectnessResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IQuestionAnsweringCorrectnessResult} message QuestionAnsweringCorrectnessResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuestionAnsweringCorrectnessResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuestionAnsweringCorrectnessResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @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.QuestionAnsweringCorrectnessResult} QuestionAnsweringCorrectnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessResult.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.QuestionAnsweringCorrectnessResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuestionAnsweringCorrectnessResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult} QuestionAnsweringCorrectnessResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuestionAnsweringCorrectnessResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuestionAnsweringCorrectnessResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuestionAnsweringCorrectnessResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a QuestionAnsweringCorrectnessResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult} QuestionAnsweringCorrectnessResult + */ + QuestionAnsweringCorrectnessResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a QuestionAnsweringCorrectnessResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult} message QuestionAnsweringCorrectnessResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuestionAnsweringCorrectnessResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this QuestionAnsweringCorrectnessResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @instance + * @returns {Object.} JSON object + */ + QuestionAnsweringCorrectnessResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuestionAnsweringCorrectnessResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuestionAnsweringCorrectnessResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessResult"; + }; + + return QuestionAnsweringCorrectnessResult; + })(); + + v1beta1.RagContextRecallInput = (function() { + + /** + * Properties of a RagContextRecallInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRagContextRecallInput + * @property {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec|null} [metricSpec] RagContextRecallInput metricSpec + * @property {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance|null} [instance] RagContextRecallInput instance + */ + + /** + * Constructs a new RagContextRecallInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RagContextRecallInput. + * @implements IRagContextRecallInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInput=} [properties] Properties to set + */ + function RagContextRecallInput(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]]; + } + + /** + * RagContextRecallInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @instance + */ + RagContextRecallInput.prototype.metricSpec = null; + + /** + * RagContextRecallInput instance. + * @member {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance|null|undefined} instance + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @instance + */ + RagContextRecallInput.prototype.instance = null; + + /** + * Creates a new RagContextRecallInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInput} RagContextRecallInput instance + */ + RagContextRecallInput.create = function create(properties) { + return new RagContextRecallInput(properties); + }; + + /** + * Encodes the specified RagContextRecallInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInput} message RagContextRecallInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.encode(message.instance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RagContextRecallInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInput} message RagContextRecallInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RagContextRecallInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @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.RagContextRecallInput} RagContextRecallInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallInput.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.RagContextRecallInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + message.instance = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RagContextRecallInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInput} RagContextRecallInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RagContextRecallInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RagContextRecallInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instance != null && message.hasOwnProperty("instance")) { + var error = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.verify(message.instance); + if (error) + return "instance." + error; + } + return null; + }; + + /** + * Creates a RagContextRecallInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInput} RagContextRecallInput + */ + RagContextRecallInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RagContextRecallInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.RagContextRecallInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.fromObject(object.metricSpec); + } + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.RagContextRecallInput.instance: object expected"); + message.instance = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.fromObject(object.instance); + } + return message; + }; + + /** + * Creates a plain object from a RagContextRecallInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {google.cloud.aiplatform.v1beta1.RagContextRecallInput} message RagContextRecallInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RagContextRecallInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.metricSpec = null; + object.instance = null; + } + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec.toObject(message.metricSpec, options); + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance.toObject(message.instance, options); + return object; + }; + + /** + * Converts this RagContextRecallInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @instance + * @returns {Object.} JSON object + */ + RagContextRecallInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RagContextRecallInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RagContextRecallInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RagContextRecallInput"; + }; + + return RagContextRecallInput; + })(); + + v1beta1.RagContextRecallInstance = (function() { + + /** + * Properties of a RagContextRecallInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRagContextRecallInstance + * @property {string|null} [reference] RagContextRecallInstance reference + * @property {string|null} [context] RagContextRecallInstance context + */ + + /** + * Constructs a new RagContextRecallInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RagContextRecallInstance. + * @implements IRagContextRecallInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance=} [properties] Properties to set + */ + function RagContextRecallInstance(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]]; + } + + /** + * RagContextRecallInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @instance + */ + RagContextRecallInstance.prototype.reference = null; + + /** + * RagContextRecallInstance context. + * @member {string|null|undefined} context + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @instance + */ + RagContextRecallInstance.prototype.context = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RagContextRecallInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @instance + */ + Object.defineProperty(RagContextRecallInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RagContextRecallInstance _context. + * @member {"context"|undefined} _context + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @instance + */ + Object.defineProperty(RagContextRecallInstance.prototype, "_context", { + get: $util.oneOfGetter($oneOfFields = ["context"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RagContextRecallInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInstance} RagContextRecallInstance instance + */ + RagContextRecallInstance.create = function create(properties) { + return new RagContextRecallInstance(properties); + }; + + /** + * Encodes the specified RagContextRecallInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance} message RagContextRecallInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reference); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.context); + return writer; + }; + + /** + * Encodes the specified RagContextRecallInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallInstance} message RagContextRecallInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RagContextRecallInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @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.RagContextRecallInstance} RagContextRecallInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallInstance.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.RagContextRecallInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.reference = reader.string(); + break; + } + case 2: { + message.context = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RagContextRecallInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInstance} RagContextRecallInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RagContextRecallInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RagContextRecallInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + if (message.context != null && message.hasOwnProperty("context")) { + properties._context = 1; + if (!$util.isString(message.context)) + return "context: string expected"; + } + return null; + }; + + /** + * Creates a RagContextRecallInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallInstance} RagContextRecallInstance + */ + RagContextRecallInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RagContextRecallInstance(); + if (object.reference != null) + message.reference = String(object.reference); + if (object.context != null) + message.context = String(object.context); + return message; + }; + + /** + * Creates a plain object from a RagContextRecallInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.RagContextRecallInstance} message RagContextRecallInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RagContextRecallInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + if (message.context != null && message.hasOwnProperty("context")) { + object.context = message.context; + if (options.oneofs) + object._context = "context"; + } + return object; + }; + + /** + * Converts this RagContextRecallInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @instance + * @returns {Object.} JSON object + */ + RagContextRecallInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RagContextRecallInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RagContextRecallInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RagContextRecallInstance"; + }; + + return RagContextRecallInstance; + })(); + + v1beta1.RagContextRecallSpec = (function() { + + /** + * Properties of a RagContextRecallSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRagContextRecallSpec + * @property {number|null} [version] RagContextRecallSpec version + */ + + /** + * Constructs a new RagContextRecallSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RagContextRecallSpec. + * @implements IRagContextRecallSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec=} [properties] Properties to set + */ + function RagContextRecallSpec(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]]; + } + + /** + * RagContextRecallSpec version. + * @member {number} version + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @instance + */ + RagContextRecallSpec.prototype.version = 0; + + /** + * Creates a new RagContextRecallSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallSpec} RagContextRecallSpec instance + */ + RagContextRecallSpec.create = function create(properties) { + return new RagContextRecallSpec(properties); + }; + + /** + * Encodes the specified RagContextRecallSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec} message RagContextRecallSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + return writer; + }; + + /** + * Encodes the specified RagContextRecallSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallSpec} message RagContextRecallSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RagContextRecallSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @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.RagContextRecallSpec} RagContextRecallSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallSpec.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.RagContextRecallSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RagContextRecallSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallSpec} RagContextRecallSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RagContextRecallSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RagContextRecallSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a RagContextRecallSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallSpec} RagContextRecallSpec + */ + RagContextRecallSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RagContextRecallSpec(); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a RagContextRecallSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.RagContextRecallSpec} message RagContextRecallSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RagContextRecallSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.version = 0; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this RagContextRecallSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @instance + * @returns {Object.} JSON object + */ + RagContextRecallSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RagContextRecallSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RagContextRecallSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RagContextRecallSpec"; + }; + + return RagContextRecallSpec; + })(); + + v1beta1.RagContextRecallResult = (function() { + + /** + * Properties of a RagContextRecallResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IRagContextRecallResult + * @property {number|null} [score] RagContextRecallResult score + * @property {string|null} [explanation] RagContextRecallResult explanation + * @property {number|null} [confidence] RagContextRecallResult confidence + */ + + /** + * Constructs a new RagContextRecallResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a RagContextRecallResult. + * @implements IRagContextRecallResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallResult=} [properties] Properties to set + */ + function RagContextRecallResult(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]]; + } + + /** + * RagContextRecallResult score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + */ + RagContextRecallResult.prototype.score = null; + + /** + * RagContextRecallResult explanation. + * @member {string} explanation + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + */ + RagContextRecallResult.prototype.explanation = ""; + + /** + * RagContextRecallResult confidence. + * @member {number|null|undefined} confidence + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + */ + RagContextRecallResult.prototype.confidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RagContextRecallResult _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + */ + Object.defineProperty(RagContextRecallResult.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RagContextRecallResult _confidence. + * @member {"confidence"|undefined} _confidence + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + */ + Object.defineProperty(RagContextRecallResult.prototype, "_confidence", { + get: $util.oneOfGetter($oneOfFields = ["confidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RagContextRecallResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallResult} RagContextRecallResult instance + */ + RagContextRecallResult.create = function create(properties) { + return new RagContextRecallResult(properties); + }; + + /** + * Encodes the specified RagContextRecallResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallResult} message RagContextRecallResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.explanation != null && Object.hasOwnProperty.call(message, "explanation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.explanation); + if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.confidence); + return writer; + }; + + /** + * Encodes the specified RagContextRecallResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.RagContextRecallResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IRagContextRecallResult} message RagContextRecallResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RagContextRecallResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RagContextRecallResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @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.RagContextRecallResult} RagContextRecallResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallResult.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.RagContextRecallResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + case 2: { + message.explanation = reader.string(); + break; + } + case 3: { + message.confidence = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RagContextRecallResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallResult} RagContextRecallResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RagContextRecallResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RagContextRecallResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RagContextRecallResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + if (!$util.isString(message.explanation)) + return "explanation: string expected"; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + properties._confidence = 1; + if (typeof message.confidence !== "number") + return "confidence: number expected"; + } + return null; + }; + + /** + * Creates a RagContextRecallResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.RagContextRecallResult} RagContextRecallResult + */ + RagContextRecallResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.RagContextRecallResult(); + if (object.score != null) + message.score = Number(object.score); + if (object.explanation != null) + message.explanation = String(object.explanation); + if (object.confidence != null) + message.confidence = Number(object.confidence); + return message; + }; + + /** + * Creates a plain object from a RagContextRecallResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {google.cloud.aiplatform.v1beta1.RagContextRecallResult} message RagContextRecallResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RagContextRecallResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.explanation = ""; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + if (message.explanation != null && message.hasOwnProperty("explanation")) + object.explanation = message.explanation; + if (message.confidence != null && message.hasOwnProperty("confidence")) { + object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence; + if (options.oneofs) + object._confidence = "confidence"; + } + return object; + }; + + /** + * Converts this RagContextRecallResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @instance + * @returns {Object.} JSON object + */ + RagContextRecallResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RagContextRecallResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.RagContextRecallResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RagContextRecallResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.RagContextRecallResult"; + }; + + return RagContextRecallResult; + })(); + + v1beta1.ToolCallValidInput = (function() { + + /** + * Properties of a ToolCallValidInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolCallValidInput + * @property {google.cloud.aiplatform.v1beta1.IToolCallValidSpec|null} [metricSpec] ToolCallValidInput metricSpec + * @property {Array.|null} [instances] ToolCallValidInput instances + */ + + /** + * Constructs a new ToolCallValidInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolCallValidInput. + * @implements IToolCallValidInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInput=} [properties] Properties to set + */ + function ToolCallValidInput(properties) { + this.instances = []; + 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]]; + } + + /** + * ToolCallValidInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IToolCallValidSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @instance + */ + ToolCallValidInput.prototype.metricSpec = null; + + /** + * ToolCallValidInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @instance + */ + ToolCallValidInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new ToolCallValidInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInput} ToolCallValidInput instance + */ + ToolCallValidInput.create = function create(properties) { + return new ToolCallValidInput(properties); + }; + + /** + * Encodes the specified ToolCallValidInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInput} message ToolCallValidInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolCallValidInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInput} message ToolCallValidInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolCallValidInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @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.ToolCallValidInput} ToolCallValidInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidInput.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.ToolCallValidInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolCallValidInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInput} ToolCallValidInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolCallValidInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolCallValidInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a ToolCallValidInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInput} ToolCallValidInput + */ + ToolCallValidInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolCallValidInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolCallValidInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolCallValidInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolCallValidInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolCallValidInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidInput} message ToolCallValidInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCallValidInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this ToolCallValidInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @instance + * @returns {Object.} JSON object + */ + ToolCallValidInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolCallValidInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolCallValidInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolCallValidInput"; + }; + + return ToolCallValidInput; + })(); + + v1beta1.ToolCallValidSpec = (function() { + + /** + * Properties of a ToolCallValidSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolCallValidSpec + */ + + /** + * Constructs a new ToolCallValidSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolCallValidSpec. + * @implements IToolCallValidSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidSpec=} [properties] Properties to set + */ + function ToolCallValidSpec(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 ToolCallValidSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidSpec} ToolCallValidSpec instance + */ + ToolCallValidSpec.create = function create(properties) { + return new ToolCallValidSpec(properties); + }; + + /** + * Encodes the specified ToolCallValidSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidSpec} message ToolCallValidSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ToolCallValidSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidSpec} message ToolCallValidSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolCallValidSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @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.ToolCallValidSpec} ToolCallValidSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidSpec.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.ToolCallValidSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolCallValidSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidSpec} ToolCallValidSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolCallValidSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolCallValidSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ToolCallValidSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidSpec} ToolCallValidSpec + */ + ToolCallValidSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec) + return object; + return new $root.google.cloud.aiplatform.v1beta1.ToolCallValidSpec(); + }; + + /** + * Creates a plain object from a ToolCallValidSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidSpec} message ToolCallValidSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCallValidSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ToolCallValidSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @instance + * @returns {Object.} JSON object + */ + ToolCallValidSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolCallValidSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolCallValidSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolCallValidSpec"; + }; + + return ToolCallValidSpec; + })(); + + v1beta1.ToolCallValidInstance = (function() { + + /** + * Properties of a ToolCallValidInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolCallValidInstance + * @property {string|null} [prediction] ToolCallValidInstance prediction + * @property {string|null} [reference] ToolCallValidInstance reference + */ + + /** + * Constructs a new ToolCallValidInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolCallValidInstance. + * @implements IToolCallValidInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInstance=} [properties] Properties to set + */ + function ToolCallValidInstance(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]]; + } + + /** + * ToolCallValidInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @instance + */ + ToolCallValidInstance.prototype.prediction = null; + + /** + * ToolCallValidInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @instance + */ + ToolCallValidInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolCallValidInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @instance + */ + Object.defineProperty(ToolCallValidInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ToolCallValidInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @instance + */ + Object.defineProperty(ToolCallValidInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolCallValidInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInstance} ToolCallValidInstance instance + */ + ToolCallValidInstance.create = function create(properties) { + return new ToolCallValidInstance(properties); + }; + + /** + * Encodes the specified ToolCallValidInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInstance} message ToolCallValidInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ToolCallValidInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidInstance} message ToolCallValidInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolCallValidInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @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.ToolCallValidInstance} ToolCallValidInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidInstance.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.ToolCallValidInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolCallValidInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInstance} ToolCallValidInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolCallValidInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolCallValidInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a ToolCallValidInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidInstance} ToolCallValidInstance + */ + ToolCallValidInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolCallValidInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a ToolCallValidInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidInstance} message ToolCallValidInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCallValidInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ToolCallValidInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @instance + * @returns {Object.} JSON object + */ + ToolCallValidInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolCallValidInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolCallValidInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolCallValidInstance"; + }; + + return ToolCallValidInstance; + })(); + + v1beta1.ToolCallValidResults = (function() { + + /** + * Properties of a ToolCallValidResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolCallValidResults + * @property {Array.|null} [toolCallValidMetricValues] ToolCallValidResults toolCallValidMetricValues + */ + + /** + * Constructs a new ToolCallValidResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolCallValidResults. + * @implements IToolCallValidResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidResults=} [properties] Properties to set + */ + function ToolCallValidResults(properties) { + this.toolCallValidMetricValues = []; + 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]]; + } + + /** + * ToolCallValidResults toolCallValidMetricValues. + * @member {Array.} toolCallValidMetricValues + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @instance + */ + ToolCallValidResults.prototype.toolCallValidMetricValues = $util.emptyArray; + + /** + * Creates a new ToolCallValidResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidResults} ToolCallValidResults instance + */ + ToolCallValidResults.create = function create(properties) { + return new ToolCallValidResults(properties); + }; + + /** + * Encodes the specified ToolCallValidResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidResults} message ToolCallValidResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.toolCallValidMetricValues != null && message.toolCallValidMetricValues.length) + for (var i = 0; i < message.toolCallValidMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.encode(message.toolCallValidMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolCallValidResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidResults} message ToolCallValidResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolCallValidResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @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.ToolCallValidResults} ToolCallValidResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidResults.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.ToolCallValidResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.toolCallValidMetricValues && message.toolCallValidMetricValues.length)) + message.toolCallValidMetricValues = []; + message.toolCallValidMetricValues.push($root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolCallValidResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidResults} ToolCallValidResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolCallValidResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolCallValidResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.toolCallValidMetricValues != null && message.hasOwnProperty("toolCallValidMetricValues")) { + if (!Array.isArray(message.toolCallValidMetricValues)) + return "toolCallValidMetricValues: array expected"; + for (var i = 0; i < message.toolCallValidMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.verify(message.toolCallValidMetricValues[i]); + if (error) + return "toolCallValidMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a ToolCallValidResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidResults} ToolCallValidResults + */ + ToolCallValidResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolCallValidResults(); + if (object.toolCallValidMetricValues) { + if (!Array.isArray(object.toolCallValidMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolCallValidResults.toolCallValidMetricValues: array expected"); + message.toolCallValidMetricValues = []; + for (var i = 0; i < object.toolCallValidMetricValues.length; ++i) { + if (typeof object.toolCallValidMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolCallValidResults.toolCallValidMetricValues: object expected"); + message.toolCallValidMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.fromObject(object.toolCallValidMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolCallValidResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidResults} message ToolCallValidResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCallValidResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.toolCallValidMetricValues = []; + if (message.toolCallValidMetricValues && message.toolCallValidMetricValues.length) { + object.toolCallValidMetricValues = []; + for (var j = 0; j < message.toolCallValidMetricValues.length; ++j) + object.toolCallValidMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.toObject(message.toolCallValidMetricValues[j], options); + } + return object; + }; + + /** + * Converts this ToolCallValidResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @instance + * @returns {Object.} JSON object + */ + ToolCallValidResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolCallValidResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolCallValidResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolCallValidResults"; + }; + + return ToolCallValidResults; + })(); + + v1beta1.ToolCallValidMetricValue = (function() { + + /** + * Properties of a ToolCallValidMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolCallValidMetricValue + * @property {number|null} [score] ToolCallValidMetricValue score + */ + + /** + * Constructs a new ToolCallValidMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolCallValidMetricValue. + * @implements IToolCallValidMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue=} [properties] Properties to set + */ + function ToolCallValidMetricValue(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]]; + } + + /** + * ToolCallValidMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @instance + */ + ToolCallValidMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolCallValidMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @instance + */ + Object.defineProperty(ToolCallValidMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolCallValidMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue} ToolCallValidMetricValue instance + */ + ToolCallValidMetricValue.create = function create(properties) { + return new ToolCallValidMetricValue(properties); + }; + + /** + * Encodes the specified ToolCallValidMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue} message ToolCallValidMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified ToolCallValidMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolCallValidMetricValue} message ToolCallValidMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolCallValidMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolCallValidMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @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.ToolCallValidMetricValue} ToolCallValidMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidMetricValue.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.ToolCallValidMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolCallValidMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue} ToolCallValidMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolCallValidMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolCallValidMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolCallValidMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a ToolCallValidMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue} ToolCallValidMetricValue + */ + ToolCallValidMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a ToolCallValidMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue} message ToolCallValidMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolCallValidMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this ToolCallValidMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @instance + * @returns {Object.} JSON object + */ + ToolCallValidMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolCallValidMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolCallValidMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolCallValidMetricValue"; + }; + + return ToolCallValidMetricValue; + })(); + + v1beta1.ToolNameMatchInput = (function() { + + /** + * Properties of a ToolNameMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolNameMatchInput + * @property {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec|null} [metricSpec] ToolNameMatchInput metricSpec + * @property {Array.|null} [instances] ToolNameMatchInput instances + */ + + /** + * Constructs a new ToolNameMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolNameMatchInput. + * @implements IToolNameMatchInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInput=} [properties] Properties to set + */ + function ToolNameMatchInput(properties) { + this.instances = []; + 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]]; + } + + /** + * ToolNameMatchInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @instance + */ + ToolNameMatchInput.prototype.metricSpec = null; + + /** + * ToolNameMatchInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @instance + */ + ToolNameMatchInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new ToolNameMatchInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInput} ToolNameMatchInput instance + */ + ToolNameMatchInput.create = function create(properties) { + return new ToolNameMatchInput(properties); + }; + + /** + * Encodes the specified ToolNameMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInput} message ToolNameMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolNameMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInput} message ToolNameMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolNameMatchInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @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.ToolNameMatchInput} ToolNameMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchInput.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.ToolNameMatchInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolNameMatchInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInput} ToolNameMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolNameMatchInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolNameMatchInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a ToolNameMatchInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInput} ToolNameMatchInput + */ + ToolNameMatchInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolNameMatchInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolNameMatchInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolNameMatchInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolNameMatchInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchInput} message ToolNameMatchInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolNameMatchInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this ToolNameMatchInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @instance + * @returns {Object.} JSON object + */ + ToolNameMatchInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolNameMatchInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolNameMatchInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolNameMatchInput"; + }; + + return ToolNameMatchInput; + })(); + + v1beta1.ToolNameMatchSpec = (function() { + + /** + * Properties of a ToolNameMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolNameMatchSpec + */ + + /** + * Constructs a new ToolNameMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolNameMatchSpec. + * @implements IToolNameMatchSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec=} [properties] Properties to set + */ + function ToolNameMatchSpec(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 ToolNameMatchSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchSpec} ToolNameMatchSpec instance + */ + ToolNameMatchSpec.create = function create(properties) { + return new ToolNameMatchSpec(properties); + }; + + /** + * Encodes the specified ToolNameMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec} message ToolNameMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ToolNameMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchSpec} message ToolNameMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolNameMatchSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @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.ToolNameMatchSpec} ToolNameMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchSpec.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.ToolNameMatchSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolNameMatchSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchSpec} ToolNameMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolNameMatchSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolNameMatchSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ToolNameMatchSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchSpec} ToolNameMatchSpec + */ + ToolNameMatchSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec) + return object; + return new $root.google.cloud.aiplatform.v1beta1.ToolNameMatchSpec(); + }; + + /** + * Creates a plain object from a ToolNameMatchSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchSpec} message ToolNameMatchSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolNameMatchSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ToolNameMatchSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @instance + * @returns {Object.} JSON object + */ + ToolNameMatchSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolNameMatchSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolNameMatchSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolNameMatchSpec"; + }; + + return ToolNameMatchSpec; + })(); + + v1beta1.ToolNameMatchInstance = (function() { + + /** + * Properties of a ToolNameMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolNameMatchInstance + * @property {string|null} [prediction] ToolNameMatchInstance prediction + * @property {string|null} [reference] ToolNameMatchInstance reference + */ + + /** + * Constructs a new ToolNameMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolNameMatchInstance. + * @implements IToolNameMatchInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInstance=} [properties] Properties to set + */ + function ToolNameMatchInstance(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]]; + } + + /** + * ToolNameMatchInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @instance + */ + ToolNameMatchInstance.prototype.prediction = null; + + /** + * ToolNameMatchInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @instance + */ + ToolNameMatchInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolNameMatchInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @instance + */ + Object.defineProperty(ToolNameMatchInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ToolNameMatchInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @instance + */ + Object.defineProperty(ToolNameMatchInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolNameMatchInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInstance} ToolNameMatchInstance instance + */ + ToolNameMatchInstance.create = function create(properties) { + return new ToolNameMatchInstance(properties); + }; + + /** + * Encodes the specified ToolNameMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInstance} message ToolNameMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ToolNameMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchInstance} message ToolNameMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolNameMatchInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @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.ToolNameMatchInstance} ToolNameMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchInstance.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.ToolNameMatchInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolNameMatchInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInstance} ToolNameMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolNameMatchInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolNameMatchInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a ToolNameMatchInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchInstance} ToolNameMatchInstance + */ + ToolNameMatchInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolNameMatchInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a ToolNameMatchInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchInstance} message ToolNameMatchInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolNameMatchInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ToolNameMatchInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @instance + * @returns {Object.} JSON object + */ + ToolNameMatchInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolNameMatchInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolNameMatchInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolNameMatchInstance"; + }; + + return ToolNameMatchInstance; + })(); + + v1beta1.ToolNameMatchResults = (function() { + + /** + * Properties of a ToolNameMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolNameMatchResults + * @property {Array.|null} [toolNameMatchMetricValues] ToolNameMatchResults toolNameMatchMetricValues + */ + + /** + * Constructs a new ToolNameMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolNameMatchResults. + * @implements IToolNameMatchResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchResults=} [properties] Properties to set + */ + function ToolNameMatchResults(properties) { + this.toolNameMatchMetricValues = []; + 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]]; + } + + /** + * ToolNameMatchResults toolNameMatchMetricValues. + * @member {Array.} toolNameMatchMetricValues + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @instance + */ + ToolNameMatchResults.prototype.toolNameMatchMetricValues = $util.emptyArray; + + /** + * Creates a new ToolNameMatchResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchResults} ToolNameMatchResults instance + */ + ToolNameMatchResults.create = function create(properties) { + return new ToolNameMatchResults(properties); + }; + + /** + * Encodes the specified ToolNameMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchResults} message ToolNameMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.toolNameMatchMetricValues != null && message.toolNameMatchMetricValues.length) + for (var i = 0; i < message.toolNameMatchMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.encode(message.toolNameMatchMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolNameMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchResults} message ToolNameMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolNameMatchResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @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.ToolNameMatchResults} ToolNameMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchResults.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.ToolNameMatchResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.toolNameMatchMetricValues && message.toolNameMatchMetricValues.length)) + message.toolNameMatchMetricValues = []; + message.toolNameMatchMetricValues.push($root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolNameMatchResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchResults} ToolNameMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolNameMatchResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolNameMatchResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.toolNameMatchMetricValues != null && message.hasOwnProperty("toolNameMatchMetricValues")) { + if (!Array.isArray(message.toolNameMatchMetricValues)) + return "toolNameMatchMetricValues: array expected"; + for (var i = 0; i < message.toolNameMatchMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.verify(message.toolNameMatchMetricValues[i]); + if (error) + return "toolNameMatchMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a ToolNameMatchResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchResults} ToolNameMatchResults + */ + ToolNameMatchResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolNameMatchResults(); + if (object.toolNameMatchMetricValues) { + if (!Array.isArray(object.toolNameMatchMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolNameMatchResults.toolNameMatchMetricValues: array expected"); + message.toolNameMatchMetricValues = []; + for (var i = 0; i < object.toolNameMatchMetricValues.length; ++i) { + if (typeof object.toolNameMatchMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolNameMatchResults.toolNameMatchMetricValues: object expected"); + message.toolNameMatchMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.fromObject(object.toolNameMatchMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolNameMatchResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchResults} message ToolNameMatchResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolNameMatchResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.toolNameMatchMetricValues = []; + if (message.toolNameMatchMetricValues && message.toolNameMatchMetricValues.length) { + object.toolNameMatchMetricValues = []; + for (var j = 0; j < message.toolNameMatchMetricValues.length; ++j) + object.toolNameMatchMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.toObject(message.toolNameMatchMetricValues[j], options); + } + return object; + }; + + /** + * Converts this ToolNameMatchResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @instance + * @returns {Object.} JSON object + */ + ToolNameMatchResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolNameMatchResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolNameMatchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolNameMatchResults"; + }; + + return ToolNameMatchResults; + })(); + + v1beta1.ToolNameMatchMetricValue = (function() { + + /** + * Properties of a ToolNameMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolNameMatchMetricValue + * @property {number|null} [score] ToolNameMatchMetricValue score + */ + + /** + * Constructs a new ToolNameMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolNameMatchMetricValue. + * @implements IToolNameMatchMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue=} [properties] Properties to set + */ + function ToolNameMatchMetricValue(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]]; + } + + /** + * ToolNameMatchMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @instance + */ + ToolNameMatchMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolNameMatchMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @instance + */ + Object.defineProperty(ToolNameMatchMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolNameMatchMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue} ToolNameMatchMetricValue instance + */ + ToolNameMatchMetricValue.create = function create(properties) { + return new ToolNameMatchMetricValue(properties); + }; + + /** + * Encodes the specified ToolNameMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue} message ToolNameMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified ToolNameMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolNameMatchMetricValue} message ToolNameMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolNameMatchMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolNameMatchMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @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.ToolNameMatchMetricValue} ToolNameMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchMetricValue.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.ToolNameMatchMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolNameMatchMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue} ToolNameMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolNameMatchMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolNameMatchMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolNameMatchMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a ToolNameMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue} ToolNameMatchMetricValue + */ + ToolNameMatchMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a ToolNameMatchMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue} message ToolNameMatchMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolNameMatchMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this ToolNameMatchMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @instance + * @returns {Object.} JSON object + */ + ToolNameMatchMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolNameMatchMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolNameMatchMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolNameMatchMetricValue"; + }; + + return ToolNameMatchMetricValue; + })(); + + v1beta1.ToolParameterKeyMatchInput = (function() { + + /** + * Properties of a ToolParameterKeyMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKeyMatchInput + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec|null} [metricSpec] ToolParameterKeyMatchInput metricSpec + * @property {Array.|null} [instances] ToolParameterKeyMatchInput instances + */ + + /** + * Constructs a new ToolParameterKeyMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKeyMatchInput. + * @implements IToolParameterKeyMatchInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput=} [properties] Properties to set + */ + function ToolParameterKeyMatchInput(properties) { + this.instances = []; + 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]]; + } + + /** + * ToolParameterKeyMatchInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @instance + */ + ToolParameterKeyMatchInput.prototype.metricSpec = null; + + /** + * ToolParameterKeyMatchInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @instance + */ + ToolParameterKeyMatchInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new ToolParameterKeyMatchInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput} ToolParameterKeyMatchInput instance + */ + ToolParameterKeyMatchInput.create = function create(properties) { + return new ToolParameterKeyMatchInput(properties); + }; + + /** + * Encodes the specified ToolParameterKeyMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput} message ToolParameterKeyMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolParameterKeyMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInput} message ToolParameterKeyMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKeyMatchInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @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.ToolParameterKeyMatchInput} ToolParameterKeyMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchInput.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.ToolParameterKeyMatchInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKeyMatchInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput} ToolParameterKeyMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKeyMatchInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKeyMatchInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a ToolParameterKeyMatchInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput} ToolParameterKeyMatchInput + */ + ToolParameterKeyMatchInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolParameterKeyMatchInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput} message ToolParameterKeyMatchInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKeyMatchInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this ToolParameterKeyMatchInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKeyMatchInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKeyMatchInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKeyMatchInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput"; + }; + + return ToolParameterKeyMatchInput; + })(); + + v1beta1.ToolParameterKeyMatchSpec = (function() { + + /** + * Properties of a ToolParameterKeyMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKeyMatchSpec + */ + + /** + * Constructs a new ToolParameterKeyMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKeyMatchSpec. + * @implements IToolParameterKeyMatchSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec=} [properties] Properties to set + */ + function ToolParameterKeyMatchSpec(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 ToolParameterKeyMatchSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec} ToolParameterKeyMatchSpec instance + */ + ToolParameterKeyMatchSpec.create = function create(properties) { + return new ToolParameterKeyMatchSpec(properties); + }; + + /** + * Encodes the specified ToolParameterKeyMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec} message ToolParameterKeyMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ToolParameterKeyMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchSpec} message ToolParameterKeyMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKeyMatchSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @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.ToolParameterKeyMatchSpec} ToolParameterKeyMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchSpec.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.ToolParameterKeyMatchSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKeyMatchSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec} ToolParameterKeyMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKeyMatchSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKeyMatchSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ToolParameterKeyMatchSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec} ToolParameterKeyMatchSpec + */ + ToolParameterKeyMatchSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec) + return object; + return new $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec(); + }; + + /** + * Creates a plain object from a ToolParameterKeyMatchSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec} message ToolParameterKeyMatchSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKeyMatchSpec.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ToolParameterKeyMatchSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKeyMatchSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKeyMatchSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKeyMatchSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchSpec"; + }; + + return ToolParameterKeyMatchSpec; + })(); + + v1beta1.ToolParameterKeyMatchInstance = (function() { + + /** + * Properties of a ToolParameterKeyMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKeyMatchInstance + * @property {string|null} [prediction] ToolParameterKeyMatchInstance prediction + * @property {string|null} [reference] ToolParameterKeyMatchInstance reference + */ + + /** + * Constructs a new ToolParameterKeyMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKeyMatchInstance. + * @implements IToolParameterKeyMatchInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance=} [properties] Properties to set + */ + function ToolParameterKeyMatchInstance(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]]; + } + + /** + * ToolParameterKeyMatchInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @instance + */ + ToolParameterKeyMatchInstance.prototype.prediction = null; + + /** + * ToolParameterKeyMatchInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @instance + */ + ToolParameterKeyMatchInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolParameterKeyMatchInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @instance + */ + Object.defineProperty(ToolParameterKeyMatchInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ToolParameterKeyMatchInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @instance + */ + Object.defineProperty(ToolParameterKeyMatchInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolParameterKeyMatchInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance} ToolParameterKeyMatchInstance instance + */ + ToolParameterKeyMatchInstance.create = function create(properties) { + return new ToolParameterKeyMatchInstance(properties); + }; + + /** + * Encodes the specified ToolParameterKeyMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance} message ToolParameterKeyMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ToolParameterKeyMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchInstance} message ToolParameterKeyMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKeyMatchInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @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.ToolParameterKeyMatchInstance} ToolParameterKeyMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchInstance.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.ToolParameterKeyMatchInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKeyMatchInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance} ToolParameterKeyMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKeyMatchInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKeyMatchInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a ToolParameterKeyMatchInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance} ToolParameterKeyMatchInstance + */ + ToolParameterKeyMatchInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a ToolParameterKeyMatchInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance} message ToolParameterKeyMatchInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKeyMatchInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ToolParameterKeyMatchInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKeyMatchInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKeyMatchInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKeyMatchInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInstance"; + }; + + return ToolParameterKeyMatchInstance; + })(); + + v1beta1.ToolParameterKeyMatchResults = (function() { + + /** + * Properties of a ToolParameterKeyMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKeyMatchResults + * @property {Array.|null} [toolParameterKeyMatchMetricValues] ToolParameterKeyMatchResults toolParameterKeyMatchMetricValues + */ + + /** + * Constructs a new ToolParameterKeyMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKeyMatchResults. + * @implements IToolParameterKeyMatchResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults=} [properties] Properties to set + */ + function ToolParameterKeyMatchResults(properties) { + this.toolParameterKeyMatchMetricValues = []; + 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]]; + } + + /** + * ToolParameterKeyMatchResults toolParameterKeyMatchMetricValues. + * @member {Array.} toolParameterKeyMatchMetricValues + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @instance + */ + ToolParameterKeyMatchResults.prototype.toolParameterKeyMatchMetricValues = $util.emptyArray; + + /** + * Creates a new ToolParameterKeyMatchResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults} ToolParameterKeyMatchResults instance + */ + ToolParameterKeyMatchResults.create = function create(properties) { + return new ToolParameterKeyMatchResults(properties); + }; + + /** + * Encodes the specified ToolParameterKeyMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults} message ToolParameterKeyMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.toolParameterKeyMatchMetricValues != null && message.toolParameterKeyMatchMetricValues.length) + for (var i = 0; i < message.toolParameterKeyMatchMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.encode(message.toolParameterKeyMatchMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolParameterKeyMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchResults} message ToolParameterKeyMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKeyMatchResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @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.ToolParameterKeyMatchResults} ToolParameterKeyMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchResults.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.ToolParameterKeyMatchResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.toolParameterKeyMatchMetricValues && message.toolParameterKeyMatchMetricValues.length)) + message.toolParameterKeyMatchMetricValues = []; + message.toolParameterKeyMatchMetricValues.push($root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKeyMatchResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults} ToolParameterKeyMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKeyMatchResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKeyMatchResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.toolParameterKeyMatchMetricValues != null && message.hasOwnProperty("toolParameterKeyMatchMetricValues")) { + if (!Array.isArray(message.toolParameterKeyMatchMetricValues)) + return "toolParameterKeyMatchMetricValues: array expected"; + for (var i = 0; i < message.toolParameterKeyMatchMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.verify(message.toolParameterKeyMatchMetricValues[i]); + if (error) + return "toolParameterKeyMatchMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a ToolParameterKeyMatchResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults} ToolParameterKeyMatchResults + */ + ToolParameterKeyMatchResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults(); + if (object.toolParameterKeyMatchMetricValues) { + if (!Array.isArray(object.toolParameterKeyMatchMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.toolParameterKeyMatchMetricValues: array expected"); + message.toolParameterKeyMatchMetricValues = []; + for (var i = 0; i < object.toolParameterKeyMatchMetricValues.length; ++i) { + if (typeof object.toolParameterKeyMatchMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults.toolParameterKeyMatchMetricValues: object expected"); + message.toolParameterKeyMatchMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.fromObject(object.toolParameterKeyMatchMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolParameterKeyMatchResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults} message ToolParameterKeyMatchResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKeyMatchResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.toolParameterKeyMatchMetricValues = []; + if (message.toolParameterKeyMatchMetricValues && message.toolParameterKeyMatchMetricValues.length) { + object.toolParameterKeyMatchMetricValues = []; + for (var j = 0; j < message.toolParameterKeyMatchMetricValues.length; ++j) + object.toolParameterKeyMatchMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.toObject(message.toolParameterKeyMatchMetricValues[j], options); + } + return object; + }; + + /** + * Converts this ToolParameterKeyMatchResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKeyMatchResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKeyMatchResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKeyMatchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchResults"; + }; + + return ToolParameterKeyMatchResults; + })(); + + v1beta1.ToolParameterKeyMatchMetricValue = (function() { + + /** + * Properties of a ToolParameterKeyMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKeyMatchMetricValue + * @property {number|null} [score] ToolParameterKeyMatchMetricValue score + */ + + /** + * Constructs a new ToolParameterKeyMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKeyMatchMetricValue. + * @implements IToolParameterKeyMatchMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue=} [properties] Properties to set + */ + function ToolParameterKeyMatchMetricValue(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]]; + } + + /** + * ToolParameterKeyMatchMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @instance + */ + ToolParameterKeyMatchMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolParameterKeyMatchMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @instance + */ + Object.defineProperty(ToolParameterKeyMatchMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolParameterKeyMatchMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue} ToolParameterKeyMatchMetricValue instance + */ + ToolParameterKeyMatchMetricValue.create = function create(properties) { + return new ToolParameterKeyMatchMetricValue(properties); + }; + + /** + * Encodes the specified ToolParameterKeyMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue} message ToolParameterKeyMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified ToolParameterKeyMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKeyMatchMetricValue} message ToolParameterKeyMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKeyMatchMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKeyMatchMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @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.ToolParameterKeyMatchMetricValue} ToolParameterKeyMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchMetricValue.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.ToolParameterKeyMatchMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKeyMatchMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue} ToolParameterKeyMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKeyMatchMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKeyMatchMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKeyMatchMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a ToolParameterKeyMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue} ToolParameterKeyMatchMetricValue + */ + ToolParameterKeyMatchMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a ToolParameterKeyMatchMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue} message ToolParameterKeyMatchMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKeyMatchMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this ToolParameterKeyMatchMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKeyMatchMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKeyMatchMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKeyMatchMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchMetricValue"; + }; + + return ToolParameterKeyMatchMetricValue; + })(); + + v1beta1.ToolParameterKVMatchInput = (function() { + + /** + * Properties of a ToolParameterKVMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKVMatchInput + * @property {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec|null} [metricSpec] ToolParameterKVMatchInput metricSpec + * @property {Array.|null} [instances] ToolParameterKVMatchInput instances + */ + + /** + * Constructs a new ToolParameterKVMatchInput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKVMatchInput. + * @implements IToolParameterKVMatchInput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput=} [properties] Properties to set + */ + function ToolParameterKVMatchInput(properties) { + this.instances = []; + 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]]; + } + + /** + * ToolParameterKVMatchInput metricSpec. + * @member {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec|null|undefined} metricSpec + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @instance + */ + ToolParameterKVMatchInput.prototype.metricSpec = null; + + /** + * ToolParameterKVMatchInput instances. + * @member {Array.} instances + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @instance + */ + ToolParameterKVMatchInput.prototype.instances = $util.emptyArray; + + /** + * Creates a new ToolParameterKVMatchInput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput} ToolParameterKVMatchInput instance + */ + ToolParameterKVMatchInput.create = function create(properties) { + return new ToolParameterKVMatchInput(properties); + }; + + /** + * Encodes the specified ToolParameterKVMatchInput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput} message ToolParameterKVMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricSpec != null && Object.hasOwnProperty.call(message, "metricSpec")) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.encode(message.metricSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.encode(message.instances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolParameterKVMatchInput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInput} message ToolParameterKVMatchInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKVMatchInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @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.ToolParameterKVMatchInput} ToolParameterKVMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchInput.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.ToolParameterKVMatchInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKVMatchInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput} ToolParameterKVMatchInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKVMatchInput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKVMatchInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.verify(message.metricSpec); + if (error) + return "metricSpec." + error; + } + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + return null; + }; + + /** + * Creates a ToolParameterKVMatchInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput} ToolParameterKVMatchInput + */ + ToolParameterKVMatchInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput(); + if (object.metricSpec != null) { + if (typeof object.metricSpec !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.metricSpec: object expected"); + message.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.fromObject(object.metricSpec); + } + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput.instances: object expected"); + message.instances[i] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.fromObject(object.instances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolParameterKVMatchInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput} message ToolParameterKVMatchInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKVMatchInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.instances = []; + if (options.defaults) + object.metricSpec = null; + if (message.metricSpec != null && message.hasOwnProperty("metricSpec")) + object.metricSpec = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.toObject(message.metricSpec, options); + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.toObject(message.instances[j], options); + } + return object; + }; + + /** + * Converts this ToolParameterKVMatchInput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKVMatchInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKVMatchInput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKVMatchInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput"; + }; + + return ToolParameterKVMatchInput; + })(); + + v1beta1.ToolParameterKVMatchSpec = (function() { + + /** + * Properties of a ToolParameterKVMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKVMatchSpec + * @property {boolean|null} [useStrictStringMatch] ToolParameterKVMatchSpec useStrictStringMatch + */ + + /** + * Constructs a new ToolParameterKVMatchSpec. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKVMatchSpec. + * @implements IToolParameterKVMatchSpec + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec=} [properties] Properties to set + */ + function ToolParameterKVMatchSpec(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]]; + } + + /** + * ToolParameterKVMatchSpec useStrictStringMatch. + * @member {boolean} useStrictStringMatch + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @instance + */ + ToolParameterKVMatchSpec.prototype.useStrictStringMatch = false; + + /** + * Creates a new ToolParameterKVMatchSpec instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec} ToolParameterKVMatchSpec instance + */ + ToolParameterKVMatchSpec.create = function create(properties) { + return new ToolParameterKVMatchSpec(properties); + }; + + /** + * Encodes the specified ToolParameterKVMatchSpec message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec} message ToolParameterKVMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useStrictStringMatch != null && Object.hasOwnProperty.call(message, "useStrictStringMatch")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useStrictStringMatch); + return writer; + }; + + /** + * Encodes the specified ToolParameterKVMatchSpec message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchSpec} message ToolParameterKVMatchSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKVMatchSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @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.ToolParameterKVMatchSpec} ToolParameterKVMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchSpec.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.ToolParameterKVMatchSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useStrictStringMatch = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKVMatchSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec} ToolParameterKVMatchSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKVMatchSpec message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKVMatchSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useStrictStringMatch != null && message.hasOwnProperty("useStrictStringMatch")) + if (typeof message.useStrictStringMatch !== "boolean") + return "useStrictStringMatch: boolean expected"; + return null; + }; + + /** + * Creates a ToolParameterKVMatchSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec} ToolParameterKVMatchSpec + */ + ToolParameterKVMatchSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec(); + if (object.useStrictStringMatch != null) + message.useStrictStringMatch = Boolean(object.useStrictStringMatch); + return message; + }; + + /** + * Creates a plain object from a ToolParameterKVMatchSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec} message ToolParameterKVMatchSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKVMatchSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.useStrictStringMatch = false; + if (message.useStrictStringMatch != null && message.hasOwnProperty("useStrictStringMatch")) + object.useStrictStringMatch = message.useStrictStringMatch; + return object; + }; + + /** + * Converts this ToolParameterKVMatchSpec to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKVMatchSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKVMatchSpec + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKVMatchSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKVMatchSpec"; + }; + + return ToolParameterKVMatchSpec; + })(); + + v1beta1.ToolParameterKVMatchInstance = (function() { + + /** + * Properties of a ToolParameterKVMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKVMatchInstance + * @property {string|null} [prediction] ToolParameterKVMatchInstance prediction + * @property {string|null} [reference] ToolParameterKVMatchInstance reference + */ + + /** + * Constructs a new ToolParameterKVMatchInstance. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKVMatchInstance. + * @implements IToolParameterKVMatchInstance + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance=} [properties] Properties to set + */ + function ToolParameterKVMatchInstance(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]]; + } + + /** + * ToolParameterKVMatchInstance prediction. + * @member {string|null|undefined} prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @instance + */ + ToolParameterKVMatchInstance.prototype.prediction = null; + + /** + * ToolParameterKVMatchInstance reference. + * @member {string|null|undefined} reference + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @instance + */ + ToolParameterKVMatchInstance.prototype.reference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolParameterKVMatchInstance _prediction. + * @member {"prediction"|undefined} _prediction + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @instance + */ + Object.defineProperty(ToolParameterKVMatchInstance.prototype, "_prediction", { + get: $util.oneOfGetter($oneOfFields = ["prediction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ToolParameterKVMatchInstance _reference. + * @member {"reference"|undefined} _reference + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @instance + */ + Object.defineProperty(ToolParameterKVMatchInstance.prototype, "_reference", { + get: $util.oneOfGetter($oneOfFields = ["reference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolParameterKVMatchInstance instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance} ToolParameterKVMatchInstance instance + */ + ToolParameterKVMatchInstance.create = function create(properties) { + return new ToolParameterKVMatchInstance(properties); + }; + + /** + * Encodes the specified ToolParameterKVMatchInstance message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance} message ToolParameterKVMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.prediction != null && Object.hasOwnProperty.call(message, "prediction")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.prediction); + if (message.reference != null && Object.hasOwnProperty.call(message, "reference")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reference); + return writer; + }; + + /** + * Encodes the specified ToolParameterKVMatchInstance message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchInstance} message ToolParameterKVMatchInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKVMatchInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @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.ToolParameterKVMatchInstance} ToolParameterKVMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchInstance.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.ToolParameterKVMatchInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.prediction = reader.string(); + break; + } + case 2: { + message.reference = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKVMatchInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance} ToolParameterKVMatchInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKVMatchInstance message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKVMatchInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + properties._prediction = 1; + if (!$util.isString(message.prediction)) + return "prediction: string expected"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + properties._reference = 1; + if (!$util.isString(message.reference)) + return "reference: string expected"; + } + return null; + }; + + /** + * Creates a ToolParameterKVMatchInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance} ToolParameterKVMatchInstance + */ + ToolParameterKVMatchInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance(); + if (object.prediction != null) + message.prediction = String(object.prediction); + if (object.reference != null) + message.reference = String(object.reference); + return message; + }; + + /** + * Creates a plain object from a ToolParameterKVMatchInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance} message ToolParameterKVMatchInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKVMatchInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.prediction != null && message.hasOwnProperty("prediction")) { + object.prediction = message.prediction; + if (options.oneofs) + object._prediction = "prediction"; + } + if (message.reference != null && message.hasOwnProperty("reference")) { + object.reference = message.reference; + if (options.oneofs) + object._reference = "reference"; + } + return object; + }; + + /** + * Converts this ToolParameterKVMatchInstance to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKVMatchInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKVMatchInstance + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKVMatchInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInstance"; + }; + + return ToolParameterKVMatchInstance; + })(); + + v1beta1.ToolParameterKVMatchResults = (function() { + + /** + * Properties of a ToolParameterKVMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKVMatchResults + * @property {Array.|null} [toolParameterKvMatchMetricValues] ToolParameterKVMatchResults toolParameterKvMatchMetricValues + */ + + /** + * Constructs a new ToolParameterKVMatchResults. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKVMatchResults. + * @implements IToolParameterKVMatchResults + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults=} [properties] Properties to set + */ + function ToolParameterKVMatchResults(properties) { + this.toolParameterKvMatchMetricValues = []; + 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]]; + } + + /** + * ToolParameterKVMatchResults toolParameterKvMatchMetricValues. + * @member {Array.} toolParameterKvMatchMetricValues + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @instance + */ + ToolParameterKVMatchResults.prototype.toolParameterKvMatchMetricValues = $util.emptyArray; + + /** + * Creates a new ToolParameterKVMatchResults instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults} ToolParameterKVMatchResults instance + */ + ToolParameterKVMatchResults.create = function create(properties) { + return new ToolParameterKVMatchResults(properties); + }; + + /** + * Encodes the specified ToolParameterKVMatchResults message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults} message ToolParameterKVMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchResults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.toolParameterKvMatchMetricValues != null && message.toolParameterKvMatchMetricValues.length) + for (var i = 0; i < message.toolParameterKvMatchMetricValues.length; ++i) + $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.encode(message.toolParameterKvMatchMetricValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ToolParameterKVMatchResults message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchResults} message ToolParameterKVMatchResults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchResults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKVMatchResults message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @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.ToolParameterKVMatchResults} ToolParameterKVMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchResults.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.ToolParameterKVMatchResults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.toolParameterKvMatchMetricValues && message.toolParameterKvMatchMetricValues.length)) + message.toolParameterKvMatchMetricValues = []; + message.toolParameterKvMatchMetricValues.push($root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKVMatchResults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults} ToolParameterKVMatchResults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchResults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKVMatchResults message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKVMatchResults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.toolParameterKvMatchMetricValues != null && message.hasOwnProperty("toolParameterKvMatchMetricValues")) { + if (!Array.isArray(message.toolParameterKvMatchMetricValues)) + return "toolParameterKvMatchMetricValues: array expected"; + for (var i = 0; i < message.toolParameterKvMatchMetricValues.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.verify(message.toolParameterKvMatchMetricValues[i]); + if (error) + return "toolParameterKvMatchMetricValues." + error; + } + } + return null; + }; + + /** + * Creates a ToolParameterKVMatchResults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults} ToolParameterKVMatchResults + */ + ToolParameterKVMatchResults.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults(); + if (object.toolParameterKvMatchMetricValues) { + if (!Array.isArray(object.toolParameterKvMatchMetricValues)) + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.toolParameterKvMatchMetricValues: array expected"); + message.toolParameterKvMatchMetricValues = []; + for (var i = 0; i < object.toolParameterKvMatchMetricValues.length; ++i) { + if (typeof object.toolParameterKvMatchMetricValues[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults.toolParameterKvMatchMetricValues: object expected"); + message.toolParameterKvMatchMetricValues[i] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.fromObject(object.toolParameterKvMatchMetricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ToolParameterKVMatchResults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults} message ToolParameterKVMatchResults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKVMatchResults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.toolParameterKvMatchMetricValues = []; + if (message.toolParameterKvMatchMetricValues && message.toolParameterKvMatchMetricValues.length) { + object.toolParameterKvMatchMetricValues = []; + for (var j = 0; j < message.toolParameterKvMatchMetricValues.length; ++j) + object.toolParameterKvMatchMetricValues[j] = $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.toObject(message.toolParameterKvMatchMetricValues[j], options); + } + return object; + }; + + /** + * Converts this ToolParameterKVMatchResults to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKVMatchResults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKVMatchResults + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKVMatchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKVMatchResults"; + }; + + return ToolParameterKVMatchResults; + })(); + + v1beta1.ToolParameterKVMatchMetricValue = (function() { + + /** + * Properties of a ToolParameterKVMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IToolParameterKVMatchMetricValue + * @property {number|null} [score] ToolParameterKVMatchMetricValue score + */ + + /** + * Constructs a new ToolParameterKVMatchMetricValue. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a ToolParameterKVMatchMetricValue. + * @implements IToolParameterKVMatchMetricValue + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue=} [properties] Properties to set + */ + function ToolParameterKVMatchMetricValue(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]]; + } + + /** + * ToolParameterKVMatchMetricValue score. + * @member {number|null|undefined} score + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @instance + */ + ToolParameterKVMatchMetricValue.prototype.score = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ToolParameterKVMatchMetricValue _score. + * @member {"score"|undefined} _score + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @instance + */ + Object.defineProperty(ToolParameterKVMatchMetricValue.prototype, "_score", { + get: $util.oneOfGetter($oneOfFields = ["score"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ToolParameterKVMatchMetricValue instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue} ToolParameterKVMatchMetricValue instance + */ + ToolParameterKVMatchMetricValue.create = function create(properties) { + return new ToolParameterKVMatchMetricValue(properties); + }; + + /** + * Encodes the specified ToolParameterKVMatchMetricValue message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue} message ToolParameterKVMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + return writer; + }; + + /** + * Encodes the specified ToolParameterKVMatchMetricValue message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.IToolParameterKVMatchMetricValue} message ToolParameterKVMatchMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ToolParameterKVMatchMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ToolParameterKVMatchMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @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.ToolParameterKVMatchMetricValue} ToolParameterKVMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchMetricValue.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.ToolParameterKVMatchMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.score = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ToolParameterKVMatchMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue} ToolParameterKVMatchMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ToolParameterKVMatchMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ToolParameterKVMatchMetricValue message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ToolParameterKVMatchMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.score != null && message.hasOwnProperty("score")) { + properties._score = 1; + if (typeof message.score !== "number") + return "score: number expected"; + } + return null; + }; + + /** + * Creates a ToolParameterKVMatchMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue} ToolParameterKVMatchMetricValue + */ + ToolParameterKVMatchMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue(); + if (object.score != null) + message.score = Number(object.score); + return message; + }; + + /** + * Creates a plain object from a ToolParameterKVMatchMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue} message ToolParameterKVMatchMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ToolParameterKVMatchMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.score != null && message.hasOwnProperty("score")) { + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (options.oneofs) + object._score = "score"; + } + return object; + }; + + /** + * Converts this ToolParameterKVMatchMetricValue to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @instance + * @returns {Object.} JSON object + */ + ToolParameterKVMatchMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ToolParameterKVMatchMetricValue + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ToolParameterKVMatchMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.ToolParameterKVMatchMetricValue"; + }; + + return ToolParameterKVMatchMetricValue; + })(); + v1beta1.Event = (function() { /** diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 1c43b250712..a6e994b89f8 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -31919,6 +31919,2793 @@ } } }, + "EvaluationService": { + "options": { + "(google.api.default_host)": "aiplatform.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "EvaluateInstances": { + "requestType": "EvaluateInstancesRequest", + "responseType": "EvaluateInstancesResponse", + "options": { + "(google.api.http).post": "/v1beta1/{location=projects/*/locations/*}:evaluateInstances", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{location=projects/*/locations/*}:evaluateInstances", + "body": "*" + } + } + ] + } + } + }, + "PairwiseChoice": { + "values": { + "PAIRWISE_CHOICE_UNSPECIFIED": 0, + "BASELINE": 1, + "CANDIDATE": 2, + "TIE": 3 + } + }, + "EvaluateInstancesRequest": { + "oneofs": { + "metricInputs": { + "oneof": [ + "exactMatchInput", + "bleuInput", + "rougeInput", + "fluencyInput", + "coherenceInput", + "safetyInput", + "groundednessInput", + "fulfillmentInput", + "responseRecallInput", + "summarizationQualityInput", + "pairwiseSummarizationQualityInput", + "summarizationHelpfulnessInput", + "summarizationVerbosityInput", + "questionAnsweringQualityInput", + "pairwiseQuestionAnsweringQualityInput", + "questionAnsweringRelevanceInput", + "questionAnsweringHelpfulnessInput", + "questionAnsweringCorrectnessInput", + "ragContextRecallInput", + "toolCallValidInput", + "toolNameMatchInput", + "toolParameterKeyMatchInput", + "toolParameterKvMatchInput" + ] + } + }, + "fields": { + "exactMatchInput": { + "type": "ExactMatchInput", + "id": 2 + }, + "bleuInput": { + "type": "BleuInput", + "id": 3 + }, + "rougeInput": { + "type": "RougeInput", + "id": 4 + }, + "fluencyInput": { + "type": "FluencyInput", + "id": 5 + }, + "coherenceInput": { + "type": "CoherenceInput", + "id": 6 + }, + "safetyInput": { + "type": "SafetyInput", + "id": 8 + }, + "groundednessInput": { + "type": "GroundednessInput", + "id": 9 + }, + "fulfillmentInput": { + "type": "FulfillmentInput", + "id": 12 + }, + "responseRecallInput": { + "type": "ResponseRecallInput", + "id": 13 + }, + "summarizationQualityInput": { + "type": "SummarizationQualityInput", + "id": 7 + }, + "pairwiseSummarizationQualityInput": { + "type": "PairwiseSummarizationQualityInput", + "id": 23 + }, + "summarizationHelpfulnessInput": { + "type": "SummarizationHelpfulnessInput", + "id": 14 + }, + "summarizationVerbosityInput": { + "type": "SummarizationVerbosityInput", + "id": 15 + }, + "questionAnsweringQualityInput": { + "type": "QuestionAnsweringQualityInput", + "id": 10 + }, + "pairwiseQuestionAnsweringQualityInput": { + "type": "PairwiseQuestionAnsweringQualityInput", + "id": 24 + }, + "questionAnsweringRelevanceInput": { + "type": "QuestionAnsweringRelevanceInput", + "id": 16 + }, + "questionAnsweringHelpfulnessInput": { + "type": "QuestionAnsweringHelpfulnessInput", + "id": 17 + }, + "questionAnsweringCorrectnessInput": { + "type": "QuestionAnsweringCorrectnessInput", + "id": 18 + }, + "ragContextRecallInput": { + "type": "RagContextRecallInput", + "id": 11 + }, + "toolCallValidInput": { + "type": "ToolCallValidInput", + "id": 19 + }, + "toolNameMatchInput": { + "type": "ToolNameMatchInput", + "id": 20 + }, + "toolParameterKeyMatchInput": { + "type": "ToolParameterKeyMatchInput", + "id": 21 + }, + "toolParameterKvMatchInput": { + "type": "ToolParameterKVMatchInput", + "id": 22 + }, + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + } + } + }, + "EvaluateInstancesResponse": { + "oneofs": { + "evaluationResults": { + "oneof": [ + "exactMatchResults", + "bleuResults", + "rougeResults", + "fluencyResult", + "coherenceResult", + "safetyResult", + "groundednessResult", + "fulfillmentResult", + "responseRecallResult", + "summarizationQualityResult", + "pairwiseSummarizationQualityResult", + "summarizationHelpfulnessResult", + "summarizationVerbosityResult", + "questionAnsweringQualityResult", + "pairwiseQuestionAnsweringQualityResult", + "questionAnsweringRelevanceResult", + "questionAnsweringHelpfulnessResult", + "questionAnsweringCorrectnessResult", + "ragContextRecallResult", + "toolCallValidResults", + "toolNameMatchResults", + "toolParameterKeyMatchResults", + "toolParameterKvMatchResults" + ] + } + }, + "fields": { + "exactMatchResults": { + "type": "ExactMatchResults", + "id": 1 + }, + "bleuResults": { + "type": "BleuResults", + "id": 2 + }, + "rougeResults": { + "type": "RougeResults", + "id": 3 + }, + "fluencyResult": { + "type": "FluencyResult", + "id": 4 + }, + "coherenceResult": { + "type": "CoherenceResult", + "id": 5 + }, + "safetyResult": { + "type": "SafetyResult", + "id": 7 + }, + "groundednessResult": { + "type": "GroundednessResult", + "id": 8 + }, + "fulfillmentResult": { + "type": "FulfillmentResult", + "id": 11 + }, + "responseRecallResult": { + "type": "ResponseRecallResult", + "id": 12 + }, + "summarizationQualityResult": { + "type": "SummarizationQualityResult", + "id": 6 + }, + "pairwiseSummarizationQualityResult": { + "type": "PairwiseSummarizationQualityResult", + "id": 22 + }, + "summarizationHelpfulnessResult": { + "type": "SummarizationHelpfulnessResult", + "id": 13 + }, + "summarizationVerbosityResult": { + "type": "SummarizationVerbosityResult", + "id": 14 + }, + "questionAnsweringQualityResult": { + "type": "QuestionAnsweringQualityResult", + "id": 9 + }, + "pairwiseQuestionAnsweringQualityResult": { + "type": "PairwiseQuestionAnsweringQualityResult", + "id": 23 + }, + "questionAnsweringRelevanceResult": { + "type": "QuestionAnsweringRelevanceResult", + "id": 15 + }, + "questionAnsweringHelpfulnessResult": { + "type": "QuestionAnsweringHelpfulnessResult", + "id": 16 + }, + "questionAnsweringCorrectnessResult": { + "type": "QuestionAnsweringCorrectnessResult", + "id": 17 + }, + "ragContextRecallResult": { + "type": "RagContextRecallResult", + "id": 10 + }, + "toolCallValidResults": { + "type": "ToolCallValidResults", + "id": 18 + }, + "toolNameMatchResults": { + "type": "ToolNameMatchResults", + "id": 19 + }, + "toolParameterKeyMatchResults": { + "type": "ToolParameterKeyMatchResults", + "id": 20 + }, + "toolParameterKvMatchResults": { + "type": "ToolParameterKVMatchResults", + "id": 21 + } + } + }, + "ExactMatchInput": { + "fields": { + "metricSpec": { + "type": "ExactMatchSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "ExactMatchInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ExactMatchInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ExactMatchSpec": { + "fields": {} + }, + "ExactMatchResults": { + "fields": { + "exactMatchMetricValues": { + "rule": "repeated", + "type": "ExactMatchMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ExactMatchMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "BleuInput": { + "fields": { + "metricSpec": { + "type": "BleuSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "BleuInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BleuInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "BleuSpec": { + "fields": {} + }, + "BleuResults": { + "fields": { + "bleuMetricValues": { + "rule": "repeated", + "type": "BleuMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BleuMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "RougeInput": { + "fields": { + "metricSpec": { + "type": "RougeSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "RougeInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RougeInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "RougeSpec": { + "fields": { + "rougeType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "useStemmer": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "splitSummaries": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RougeResults": { + "fields": { + "rougeMetricValues": { + "rule": "repeated", + "type": "RougeMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "RougeMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "CoherenceInput": { + "fields": { + "metricSpec": { + "type": "CoherenceSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "CoherenceInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CoherenceInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "CoherenceSpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CoherenceResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "FluencyInput": { + "fields": { + "metricSpec": { + "type": "FluencySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "FluencyInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FluencyInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "FluencySpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FluencyResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "SafetyInput": { + "fields": { + "metricSpec": { + "type": "SafetySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "SafetyInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SafetyInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "SafetySpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SafetyResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "GroundednessInput": { + "fields": { + "metricSpec": { + "type": "GroundednessSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "GroundednessInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GroundednessInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_context": { + "oneof": [ + "context" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "GroundednessSpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GroundednessResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "FulfillmentInput": { + "fields": { + "metricSpec": { + "type": "FulfillmentSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "FulfillmentInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FulfillmentInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "FulfillmentSpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FulfillmentResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ResponseRecallInput": { + "fields": { + "metricSpec": { + "type": "ResponseRecallSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "ResponseRecallInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ResponseRecallInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ResponseRecallSpec": { + "fields": { + "version": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResponseRecallResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "SummarizationQualityInput": { + "fields": { + "metricSpec": { + "type": "SummarizationQualitySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "SummarizationQualityInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SummarizationQualityInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "SummarizationQualitySpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SummarizationQualityResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "PairwiseSummarizationQualityInput": { + "fields": { + "metricSpec": { + "type": "PairwiseSummarizationQualitySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "PairwiseSummarizationQualityInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PairwiseSummarizationQualityInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_baselinePrediction": { + "oneof": [ + "baselinePrediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "baselinePrediction": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "PairwiseSummarizationQualitySpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PairwiseSummarizationQualityResult": { + "oneofs": { + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "pairwiseChoice": { + "type": "PairwiseChoice", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "SummarizationHelpfulnessInput": { + "fields": { + "metricSpec": { + "type": "SummarizationHelpfulnessSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "SummarizationHelpfulnessInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SummarizationHelpfulnessInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "SummarizationHelpfulnessSpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SummarizationHelpfulnessResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "SummarizationVerbosityInput": { + "fields": { + "metricSpec": { + "type": "SummarizationVerbositySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "SummarizationVerbosityInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SummarizationVerbosityInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "SummarizationVerbositySpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SummarizationVerbosityResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringQualityInput": { + "fields": { + "metricSpec": { + "type": "QuestionAnsweringQualitySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "QuestionAnsweringQualityInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "QuestionAnsweringQualityInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringQualitySpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QuestionAnsweringQualityResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "PairwiseQuestionAnsweringQualityInput": { + "fields": { + "metricSpec": { + "type": "PairwiseQuestionAnsweringQualitySpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "PairwiseQuestionAnsweringQualityInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "PairwiseQuestionAnsweringQualityInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_baselinePrediction": { + "oneof": [ + "baselinePrediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "baselinePrediction": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "PairwiseQuestionAnsweringQualitySpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PairwiseQuestionAnsweringQualityResult": { + "oneofs": { + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "pairwiseChoice": { + "type": "PairwiseChoice", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringRelevanceInput": { + "fields": { + "metricSpec": { + "type": "QuestionAnsweringRelevanceSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "QuestionAnsweringRelevanceInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "QuestionAnsweringRelevanceInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringRelevanceSpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QuestionAnsweringRelevanceResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringHelpfulnessInput": { + "fields": { + "metricSpec": { + "type": "QuestionAnsweringHelpfulnessSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "QuestionAnsweringHelpfulnessInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "QuestionAnsweringHelpfulnessInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringHelpfulnessSpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QuestionAnsweringHelpfulnessResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringCorrectnessInput": { + "fields": { + "metricSpec": { + "type": "QuestionAnsweringCorrectnessSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "QuestionAnsweringCorrectnessInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "QuestionAnsweringCorrectnessInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + }, + "_instruction": { + "oneof": [ + "instruction" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instruction": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "QuestionAnsweringCorrectnessSpec": { + "fields": { + "useReference": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "QuestionAnsweringCorrectnessResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "RagContextRecallInput": { + "fields": { + "metricSpec": { + "type": "RagContextRecallSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "RagContextRecallInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RagContextRecallInstance": { + "oneofs": { + "_reference": { + "oneof": [ + "reference" + ] + }, + "_context": { + "oneof": [ + "context" + ] + } + }, + "fields": { + "reference": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "context": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "RagContextRecallSpec": { + "fields": { + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RagContextRecallResult": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + }, + "_confidence": { + "oneof": [ + "confidence" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "explanation": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "confidence": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ToolCallValidInput": { + "fields": { + "metricSpec": { + "type": "ToolCallValidSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "ToolCallValidInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ToolCallValidSpec": { + "fields": {} + }, + "ToolCallValidInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ToolCallValidResults": { + "fields": { + "toolCallValidMetricValues": { + "rule": "repeated", + "type": "ToolCallValidMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ToolCallValidMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ToolNameMatchInput": { + "fields": { + "metricSpec": { + "type": "ToolNameMatchSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "ToolNameMatchInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ToolNameMatchSpec": { + "fields": {} + }, + "ToolNameMatchInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ToolNameMatchResults": { + "fields": { + "toolNameMatchMetricValues": { + "rule": "repeated", + "type": "ToolNameMatchMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ToolNameMatchMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ToolParameterKeyMatchInput": { + "fields": { + "metricSpec": { + "type": "ToolParameterKeyMatchSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "ToolParameterKeyMatchInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ToolParameterKeyMatchSpec": { + "fields": {} + }, + "ToolParameterKeyMatchInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ToolParameterKeyMatchResults": { + "fields": { + "toolParameterKeyMatchMetricValues": { + "rule": "repeated", + "type": "ToolParameterKeyMatchMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ToolParameterKeyMatchMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, + "ToolParameterKVMatchInput": { + "fields": { + "metricSpec": { + "type": "ToolParameterKVMatchSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instances": { + "rule": "repeated", + "type": "ToolParameterKVMatchInstance", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ToolParameterKVMatchSpec": { + "fields": { + "useStrictStringMatch": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ToolParameterKVMatchInstance": { + "oneofs": { + "_prediction": { + "oneof": [ + "prediction" + ] + }, + "_reference": { + "oneof": [ + "reference" + ] + } + }, + "fields": { + "prediction": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "reference": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + } + } + }, + "ToolParameterKVMatchResults": { + "fields": { + "toolParameterKvMatchMetricValues": { + "rule": "repeated", + "type": "ToolParameterKVMatchMetricValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ToolParameterKVMatchMetricValue": { + "oneofs": { + "_score": { + "oneof": [ + "score" + ] + } + }, + "fields": { + "score": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + } + }, "Event": { "fields": { "artifact": { diff --git a/packages/google-cloud-aiplatform/samples/README.md b/packages/google-cloud-aiplatform/samples/README.md index 4c498daab02..17126eb2e4c 100644 --- a/packages/google-cloud-aiplatform/samples/README.md +++ b/packages/google-cloud-aiplatform/samples/README.md @@ -312,6 +312,7 @@ * [Endpoint_service.mutate_deployed_model](#endpoint_service.mutate_deployed_model) * [Endpoint_service.undeploy_model](#endpoint_service.undeploy_model) * [Endpoint_service.update_endpoint](#endpoint_service.update_endpoint) + * [Evaluation_service.evaluate_instances](#evaluation_service.evaluate_instances) * [Feature_online_store_admin_service.create_feature_online_store](#feature_online_store_admin_service.create_feature_online_store) * [Feature_online_store_admin_service.create_feature_view](#feature_online_store_admin_service.create_feature_view) * [Feature_online_store_admin_service.delete_feature_online_store](#feature_online_store_admin_service.delete_feature_online_store) @@ -5679,6 +5680,23 @@ __Usage:__ +### Evaluation_service.evaluate_instances + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.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/evaluation_service.evaluate_instances.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.js` + + +----- + + + + ### Feature_online_store_admin_service.create_feature_online_store View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.create_feature_online_store.js). diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.js new file mode 100644 index 00000000000..4b11e2fdcca --- /dev/null +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/evaluation_service.evaluate_instances.js @@ -0,0 +1,160 @@ +// 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(location) { + // [START aiplatform_v1beta1_generated_EvaluationService_EvaluateInstances_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Auto metric instances. + * Instances and metric spec for exact match metric. + */ + // const exactMatchInput = {} + /** + * Instances and metric spec for bleu metric. + */ + // const bleuInput = {} + /** + * Instances and metric spec for rouge metric. + */ + // const rougeInput = {} + /** + * LLM-based metric instance. + * General text generation metrics, applicable to other categories. + * Input for fluency metric. + */ + // const fluencyInput = {} + /** + * Input for coherence metric. + */ + // const coherenceInput = {} + /** + * Input for safety metric. + */ + // const safetyInput = {} + /** + * Input for groundedness metric. + */ + // const groundednessInput = {} + /** + * Input for fulfillment metric. + */ + // const fulfillmentInput = {} + /** + * Input for response recall metric. + */ + // const responseRecallInput = {} + /** + * Input for summarization quality metric. + */ + // const summarizationQualityInput = {} + /** + * Input for pairwise summarization quality metric. + */ + // const pairwiseSummarizationQualityInput = {} + /** + * Input for summarization helpfulness metric. + */ + // const summarizationHelpfulnessInput = {} + /** + * Input for summarization verbosity metric. + */ + // const summarizationVerbosityInput = {} + /** + * Input for question answering quality metric. + */ + // const questionAnsweringQualityInput = {} + /** + * Input for pairwise question answering quality metric. + */ + // const pairwiseQuestionAnsweringQualityInput = {} + /** + * Input for question answering relevance metric. + */ + // const questionAnsweringRelevanceInput = {} + /** + * Input for question answering helpfulness + * metric. + */ + // const questionAnsweringHelpfulnessInput = {} + /** + * Input for question answering correctness + * metric. + */ + // const questionAnsweringCorrectnessInput = {} + /** + * Input for rag context recall metric. + */ + // const ragContextRecallInput = {} + /** + * Tool call metric instances. + * Input for tool call valid metric. + */ + // const toolCallValidInput = {} + /** + * Input for tool name match metric. + */ + // const toolNameMatchInput = {} + /** + * Input for tool parameter key match metric. + */ + // const toolParameterKeyMatchInput = {} + /** + * Input for tool parameter key value match metric. + */ + // const toolParameterKvMatchInput = {} + /** + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{location}` + */ + // const location = 'abc123' + + // Imports the Aiplatform library + const {EvaluationServiceClient} = require('@google-cloud/aiplatform').v1beta1; + + // Instantiates a client + const aiplatformClient = new EvaluationServiceClient(); + + async function callEvaluateInstances() { + // Construct request + const request = { + location, + }; + + // Run request + const response = await aiplatformClient.evaluateInstances(request); + console.log(response); + } + + callEvaluateInstances(); + // [END aiplatform_v1beta1_generated_EvaluationService_EvaluateInstances_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 91f730064f9..0f9a0c273e3 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 @@ -1507,6 +1507,138 @@ } } }, + { + "regionTag": "aiplatform_v1beta1_generated_EvaluationService_EvaluateInstances_async", + "title": "DatasetService evaluateInstances Sample", + "origin": "API_DEFINITION", + "description": " Evaluates instances based on a given metric.", + "canonical": true, + "file": "evaluation_service.evaluate_instances.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 152, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EvaluateInstances", + "fullName": "google.cloud.aiplatform.v1beta1.EvaluationService.EvaluateInstances", + "async": true, + "parameters": [ + { + "name": "exact_match_input", + "type": ".google.cloud.aiplatform.v1beta1.ExactMatchInput" + }, + { + "name": "bleu_input", + "type": ".google.cloud.aiplatform.v1beta1.BleuInput" + }, + { + "name": "rouge_input", + "type": ".google.cloud.aiplatform.v1beta1.RougeInput" + }, + { + "name": "fluency_input", + "type": ".google.cloud.aiplatform.v1beta1.FluencyInput" + }, + { + "name": "coherence_input", + "type": ".google.cloud.aiplatform.v1beta1.CoherenceInput" + }, + { + "name": "safety_input", + "type": ".google.cloud.aiplatform.v1beta1.SafetyInput" + }, + { + "name": "groundedness_input", + "type": ".google.cloud.aiplatform.v1beta1.GroundednessInput" + }, + { + "name": "fulfillment_input", + "type": ".google.cloud.aiplatform.v1beta1.FulfillmentInput" + }, + { + "name": "response_recall_input", + "type": ".google.cloud.aiplatform.v1beta1.ResponseRecallInput" + }, + { + "name": "summarization_quality_input", + "type": ".google.cloud.aiplatform.v1beta1.SummarizationQualityInput" + }, + { + "name": "pairwise_summarization_quality_input", + "type": ".google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput" + }, + { + "name": "summarization_helpfulness_input", + "type": ".google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput" + }, + { + "name": "summarization_verbosity_input", + "type": ".google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput" + }, + { + "name": "question_answering_quality_input", + "type": ".google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput" + }, + { + "name": "pairwise_question_answering_quality_input", + "type": ".google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput" + }, + { + "name": "question_answering_relevance_input", + "type": ".google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput" + }, + { + "name": "question_answering_helpfulness_input", + "type": ".google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput" + }, + { + "name": "question_answering_correctness_input", + "type": ".google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput" + }, + { + "name": "rag_context_recall_input", + "type": ".google.cloud.aiplatform.v1beta1.RagContextRecallInput" + }, + { + "name": "tool_call_valid_input", + "type": ".google.cloud.aiplatform.v1beta1.ToolCallValidInput" + }, + { + "name": "tool_name_match_input", + "type": ".google.cloud.aiplatform.v1beta1.ToolNameMatchInput" + }, + { + "name": "tool_parameter_key_match_input", + "type": ".google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput" + }, + { + "name": "tool_parameter_kv_match_input", + "type": ".google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput" + }, + { + "name": "location", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse", + "client": { + "shortName": "EvaluationServiceClient", + "fullName": "google.cloud.aiplatform.v1beta1.EvaluationServiceClient" + }, + "method": { + "shortName": "EvaluateInstances", + "fullName": "google.cloud.aiplatform.v1beta1.EvaluationService.EvaluateInstances", + "service": { + "shortName": "EvaluationService", + "fullName": "google.cloud.aiplatform.v1beta1.EvaluationService" + } + } + } + }, { "regionTag": "aiplatform_v1beta1_generated_FeatureOnlineStoreAdminService_CreateFeatureOnlineStore_async", "title": "DatasetService createFeatureOnlineStore Sample", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts new file mode 100644 index 00000000000..3169cd396b1 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client.ts @@ -0,0 +1,4053 @@ +// 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/evaluation_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './evaluation_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Vertex AI Online Evaluation Service. + * @class + * @memberof v1beta1 + */ +export class EvaluationServiceClient { + 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}; + evaluationServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of EvaluationServiceClient. + * + * @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 EvaluationServiceClient({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 EvaluationServiceClient; + 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}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.aiplatform.v1beta1.EvaluationService', + 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.evaluationServiceStub) { + return this.evaluationServiceStub; + } + + // Put together the "service stub" for + // google.cloud.aiplatform.v1beta1.EvaluationService. + this.evaluationServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.aiplatform.v1beta1.EvaluationService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.aiplatform.v1beta1 + .EvaluationService, + 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 evaluationServiceStubMethods = ['evaluateInstances']; + for (const methodName of evaluationServiceStubMethods) { + const callPromise = this.evaluationServiceStub.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.evaluationServiceStub; + } + + /** + * 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 -- + // ------------------- + /** + * Evaluates instances based on a given metric. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.aiplatform.v1beta1.ExactMatchInput} request.exactMatchInput + * Auto metric instances. + * Instances and metric spec for exact match metric. + * @param {google.cloud.aiplatform.v1beta1.BleuInput} request.bleuInput + * Instances and metric spec for bleu metric. + * @param {google.cloud.aiplatform.v1beta1.RougeInput} request.rougeInput + * Instances and metric spec for rouge metric. + * @param {google.cloud.aiplatform.v1beta1.FluencyInput} request.fluencyInput + * LLM-based metric instance. + * General text generation metrics, applicable to other categories. + * Input for fluency metric. + * @param {google.cloud.aiplatform.v1beta1.CoherenceInput} request.coherenceInput + * Input for coherence metric. + * @param {google.cloud.aiplatform.v1beta1.SafetyInput} request.safetyInput + * Input for safety metric. + * @param {google.cloud.aiplatform.v1beta1.GroundednessInput} request.groundednessInput + * Input for groundedness metric. + * @param {google.cloud.aiplatform.v1beta1.FulfillmentInput} request.fulfillmentInput + * Input for fulfillment metric. + * @param {google.cloud.aiplatform.v1beta1.ResponseRecallInput} request.responseRecallInput + * Input for response recall metric. + * @param {google.cloud.aiplatform.v1beta1.SummarizationQualityInput} request.summarizationQualityInput + * Input for summarization quality metric. + * @param {google.cloud.aiplatform.v1beta1.PairwiseSummarizationQualityInput} request.pairwiseSummarizationQualityInput + * Input for pairwise summarization quality metric. + * @param {google.cloud.aiplatform.v1beta1.SummarizationHelpfulnessInput} request.summarizationHelpfulnessInput + * Input for summarization helpfulness metric. + * @param {google.cloud.aiplatform.v1beta1.SummarizationVerbosityInput} request.summarizationVerbosityInput + * Input for summarization verbosity metric. + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringQualityInput} request.questionAnsweringQualityInput + * Input for question answering quality metric. + * @param {google.cloud.aiplatform.v1beta1.PairwiseQuestionAnsweringQualityInput} request.pairwiseQuestionAnsweringQualityInput + * Input for pairwise question answering quality metric. + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringRelevanceInput} request.questionAnsweringRelevanceInput + * Input for question answering relevance metric. + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringHelpfulnessInput} request.questionAnsweringHelpfulnessInput + * Input for question answering helpfulness + * metric. + * @param {google.cloud.aiplatform.v1beta1.QuestionAnsweringCorrectnessInput} request.questionAnsweringCorrectnessInput + * Input for question answering correctness + * metric. + * @param {google.cloud.aiplatform.v1beta1.RagContextRecallInput} request.ragContextRecallInput + * Input for rag context recall metric. + * @param {google.cloud.aiplatform.v1beta1.ToolCallValidInput} request.toolCallValidInput + * Tool call metric instances. + * Input for tool call valid metric. + * @param {google.cloud.aiplatform.v1beta1.ToolNameMatchInput} request.toolNameMatchInput + * Input for tool name match metric. + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKeyMatchInput} request.toolParameterKeyMatchInput + * Input for tool parameter key match metric. + * @param {google.cloud.aiplatform.v1beta1.ToolParameterKVMatchInput} request.toolParameterKvMatchInput + * Input for tool parameter key value match metric. + * @param {string} request.location + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{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 protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse|EvaluateInstancesResponse}. + * 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/evaluation_service.evaluate_instances.js + * region_tag:aiplatform_v1beta1_generated_EvaluationService_EvaluateInstances_async + */ + evaluateInstances( + request?: protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | undefined + ), + {} | undefined, + ] + >; + evaluateInstances( + request: protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + evaluateInstances( + request: protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, + callback: Callback< + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | null + | undefined, + {} | null | undefined + > + ): void; + evaluateInstances( + request?: protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse, + ( + | protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesRequest + | 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({ + location: request.location ?? '', + }); + this.initialize(); + return this.innerApiCalls.evaluateInstances(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 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.evaluationServiceStub && !this._terminated) { + return this.evaluationServiceStub.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/evaluation_service_client_config.json b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client_config.json new file mode 100644 index 00000000000..92e68bf54d6 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1beta1.EvaluationService": { + "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": { + "EvaluateInstances": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json new file mode 100644 index 00000000000..3eb8eb092f3 --- /dev/null +++ b/packages/google-cloud-aiplatform/src/v1beta1/evaluation_service_proto_list.json @@ -0,0 +1,147 @@ +[ + "../../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/evaluation_service.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/feature_online_store_admin_service_proto_list.json b/packages/google-cloud-aiplatform/src/v1beta1/feature_online_store_admin_service_proto_list.json index a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json index 36fc8e1984f..eca4c7c844d 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json +++ b/packages/google-cloud-aiplatform/src/v1beta1/gapic_metadata.json @@ -393,6 +393,30 @@ } } }, + "EvaluationService": { + "clients": { + "grpc": { + "libraryClient": "EvaluationServiceClient", + "rpcs": { + "EvaluateInstances": { + "methods": [ + "evaluateInstances" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "EvaluationServiceClient", + "rpcs": { + "EvaluateInstances": { + "methods": [ + "evaluateInstances" + ] + } + } + } + } + }, "FeatureOnlineStoreAdminService": { "clients": { "grpc": { diff --git a/packages/google-cloud-aiplatform/src/v1beta1/index.ts b/packages/google-cloud-aiplatform/src/v1beta1/index.ts index 3cd47e7b1a0..343513ee0da 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/index.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/index.ts @@ -19,6 +19,7 @@ export {DatasetServiceClient} from './dataset_service_client'; export {DeploymentResourcePoolServiceClient} from './deployment_resource_pool_service_client'; export {EndpointServiceClient} from './endpoint_service_client'; +export {EvaluationServiceClient} from './evaluation_service_client'; export {FeatureOnlineStoreAdminServiceClient} from './feature_online_store_admin_service_client'; export {FeatureOnlineStoreServiceClient} from './feature_online_store_service_client'; export {FeatureRegistryServiceClient} from './feature_registry_service_client'; 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 index a27a1ab44c2..3eb8eb092f3 100644 --- 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 index a27a1ab44c2..3eb8eb092f3 100644 --- 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", 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 a27a1ab44c2..3eb8eb092f3 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 @@ -23,6 +23,7 @@ "../../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/evaluation_service.proto", "../../protos/google/cloud/aiplatform/v1beta1/event.proto", "../../protos/google/cloud/aiplatform/v1beta1/execution.proto", "../../protos/google/cloud/aiplatform/v1beta1/explanation.proto", diff --git a/packages/google-cloud-aiplatform/test/gapic_evaluation_service_v1beta1.ts b/packages/google-cloud-aiplatform/test/gapic_evaluation_service_v1beta1.ts new file mode 100644 index 00000000000..1e5a6b13fee --- /dev/null +++ b/packages/google-cloud-aiplatform/test/gapic_evaluation_service_v1beta1.ts @@ -0,0 +1,4610 @@ +// 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 evaluationserviceModule 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.EvaluationServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient(); + 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 = + evaluationserviceModule.v1beta1.EvaluationServiceClient.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 = + evaluationserviceModule.v1beta1.EvaluationServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'aiplatform.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'aiplatform.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = evaluationserviceModule.v1beta1.EvaluationServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.evaluationServiceStub, undefined); + await client.initialize(); + assert(client.evaluationServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.evaluationServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.evaluationServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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('evaluateInstances', () => { + it('invokes evaluateInstances without error', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse() + ); + client.innerApiCalls.evaluateInstances = stubSimpleCall(expectedResponse); + const [response] = await client.evaluateInstances(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes evaluateInstances without error using callback', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesResponse() + ); + client.innerApiCalls.evaluateInstances = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.evaluateInstances( + request, + ( + err?: Error | null, + result?: protos.google.cloud.aiplatform.v1beta1.IEvaluateInstancesResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes evaluateInstances with error', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedHeaderRequestParams = `location=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.evaluateInstances = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.evaluateInstances(request), expectedError); + const actualRequest = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.evaluateInstances as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes evaluateInstances with closed client', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.aiplatform.v1beta1.EvaluateInstancesRequest', + ['location'] + ); + request.location = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.evaluateInstances(request), expectedError); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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 evaluationserviceModule.v1beta1.EvaluationServiceClient({ + 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) + ); + }); + }); + }); +});