From 5741c3084c54c6704da68cdbc15a37b31a411ce8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:01:58 -0400 Subject: [PATCH] feat: Allow v1 api calls for some dataset_service, llm_utility_service, and prediction_service apis without project and location (#7584) * feat: add reservation affinity proto feat: add spot field to Vertex Prediction's Dedicated Resources and Custom Training's Scheduling Strategy docs: update the description for the deprecated GPU (K80) PiperOrigin-RevId: 659693494 Source-Link: https://github.com/googleapis/googleapis/commit/f907e15b64bcadf7641051496c91e9b45fe47616 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9ad32e0787e98e0cc62ea4ac71f9b610663fe7e5 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiOWFkMzJlMDc4N2U5OGUwY2M2MmVhNGFjNzFmOWI2MTA2NjNmZTdlNSJ9 * feat: add evaluation service proto to v1 PiperOrigin-RevId: 660115183 Source-Link: https://github.com/googleapis/googleapis/commit/9d6389cd9abded025e2572c384ea92e6f7518c1a Source-Link: https://github.com/googleapis/googleapis-gen/commit/aa9597bea902797c046b8e8600d983a507b17bb2 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiYWE5NTk3YmVhOTAyNzk3YzA0NmI4ZTg2MDBkOTgzYTUwN2IxN2JiMiJ9 * feat: Allow v1 api calls for some dataset_service, llm_utility_service, and prediction_service apis without project and location PiperOrigin-RevId: 660169876 Source-Link: https://github.com/googleapis/googleapis/commit/1f17bcaf613c29342c1c3821030362cae2e0c6ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/23946986f5a6f4d41caad9831c425921047d484b Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiMjM5NDY5ODZmNWE2ZjRkNDFjYWFkOTgzMWM0MjU5MjEwNDdkNDg0YiJ9 --- AiPlatform/metadata/V1/CustomJob.php | Bin 4446 -> 4474 bytes AiPlatform/metadata/V1/DatasetService.php | Bin 11573 -> 12031 bytes AiPlatform/metadata/V1/EvaluationService.php | Bin 0 -> 18327 bytes AiPlatform/metadata/V1/LlmUtilityService.php | 10 +- AiPlatform/metadata/V1/MachineResources.php | 12 +- AiPlatform/metadata/V1/PredictionService.php | Bin 9233 -> 9450 bytes .../metadata/V1/ReservationAffinity.php | Bin 0 -> 1435 bytes .../evaluate_instances.php | 72 + .../get_iam_policy.php | 72 + .../EvaluationServiceClient/get_location.php | 57 + .../list_locations.php | 62 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + AiPlatform/src/V1/AcceleratorType.php | 3 +- AiPlatform/src/V1/BleuInput.php | 111 + AiPlatform/src/V1/BleuInstance.php | 121 + AiPlatform/src/V1/BleuMetricValue.php | 77 + AiPlatform/src/V1/BleuResults.php | 67 + AiPlatform/src/V1/BleuSpec.php | 68 + .../DeploymentResourcePoolServiceClient.php | 20 + .../src/V1/Client/EndpointServiceClient.php | 20 + .../src/V1/Client/EvaluationServiceClient.php | 394 ++++ .../V1/Client/IndexEndpointServiceClient.php | 20 + AiPlatform/src/V1/Client/JobServiceClient.php | 20 + .../src/V1/Client/NotebookServiceClient.php | 20 + .../PersistentResourceServiceClient.php | 20 + AiPlatform/src/V1/CoherenceInput.php | 121 + AiPlatform/src/V1/CoherenceInstance.php | 77 + AiPlatform/src/V1/CoherenceResult.php | 155 ++ AiPlatform/src/V1/CoherenceSpec.php | 67 + AiPlatform/src/V1/DedicatedResources.php | 38 + .../src/V1/EvaluateInstancesRequest.php | 857 +++++++ .../src/V1/EvaluateInstancesResponse.php | 822 +++++++ AiPlatform/src/V1/ExactMatchInput.php | 111 + AiPlatform/src/V1/ExactMatchInstance.php | 121 + AiPlatform/src/V1/ExactMatchMetricValue.php | 77 + AiPlatform/src/V1/ExactMatchResults.php | 67 + AiPlatform/src/V1/ExactMatchSpec.php | 34 + AiPlatform/src/V1/FluencyInput.php | 121 + AiPlatform/src/V1/FluencyInstance.php | 77 + AiPlatform/src/V1/FluencyResult.php | 155 ++ AiPlatform/src/V1/FluencySpec.php | 67 + AiPlatform/src/V1/FulfillmentInput.php | 121 + AiPlatform/src/V1/FulfillmentInstance.php | 121 + AiPlatform/src/V1/FulfillmentResult.php | 155 ++ AiPlatform/src/V1/FulfillmentSpec.php | 67 + .../GenerateContentResponse/UsageMetadata.php | 16 +- AiPlatform/src/V1/GroundednessInput.php | 121 + AiPlatform/src/V1/GroundednessInstance.php | 125 + AiPlatform/src/V1/GroundednessResult.php | 155 ++ AiPlatform/src/V1/GroundednessSpec.php | 67 + AiPlatform/src/V1/MachineSpec.php | 48 + AiPlatform/src/V1/PairwiseChoice.php | 68 + AiPlatform/src/V1/PairwiseMetricInput.php | 121 + AiPlatform/src/V1/PairwiseMetricInstance.php | 82 + AiPlatform/src/V1/PairwiseMetricResult.php | 101 + AiPlatform/src/V1/PairwiseMetricSpec.php | 77 + .../PairwiseQuestionAnsweringQualityInput.php | 121 + ...irwiseQuestionAnsweringQualityInstance.php | 253 ++ ...PairwiseQuestionAnsweringQualityResult.php | 145 ++ .../PairwiseQuestionAnsweringQualitySpec.php | 105 + .../V1/PairwiseSummarizationQualityInput.php | 121 + .../PairwiseSummarizationQualityInstance.php | 253 ++ .../V1/PairwiseSummarizationQualityResult.php | 145 ++ .../V1/PairwiseSummarizationQualitySpec.php | 105 + AiPlatform/src/V1/PointwiseMetricInput.php | 121 + AiPlatform/src/V1/PointwiseMetricInstance.php | 82 + AiPlatform/src/V1/PointwiseMetricResult.php | 111 + AiPlatform/src/V1/PointwiseMetricSpec.php | 77 + .../V1/QuestionAnsweringCorrectnessInput.php | 121 + .../QuestionAnsweringCorrectnessInstance.php | 209 ++ .../V1/QuestionAnsweringCorrectnessResult.php | 155 ++ .../V1/QuestionAnsweringCorrectnessSpec.php | 105 + .../V1/QuestionAnsweringHelpfulnessInput.php | 121 + .../QuestionAnsweringHelpfulnessInstance.php | 209 ++ .../V1/QuestionAnsweringHelpfulnessResult.php | 155 ++ .../V1/QuestionAnsweringHelpfulnessSpec.php | 105 + .../src/V1/QuestionAnsweringQualityInput.php | 121 + .../V1/QuestionAnsweringQualityInstance.php | 209 ++ .../src/V1/QuestionAnsweringQualityResult.php | 155 ++ .../src/V1/QuestionAnsweringQualitySpec.php | 105 + .../V1/QuestionAnsweringRelevanceInput.php | 121 + .../V1/QuestionAnsweringRelevanceInstance.php | 209 ++ .../V1/QuestionAnsweringRelevanceResult.php | 155 ++ .../src/V1/QuestionAnsweringRelevanceSpec.php | 105 + AiPlatform/src/V1/ReservationAffinity.php | 153 ++ .../src/V1/ReservationAffinity/Type.php | 70 + AiPlatform/src/V1/RougeInput.php | 111 + AiPlatform/src/V1/RougeInstance.php | 121 + AiPlatform/src/V1/RougeMetricValue.php | 77 + AiPlatform/src/V1/RougeResults.php | 67 + AiPlatform/src/V1/RougeSpec.php | 136 ++ AiPlatform/src/V1/SafetyInput.php | 121 + AiPlatform/src/V1/SafetyInstance.php | 77 + AiPlatform/src/V1/SafetyResult.php | 155 ++ AiPlatform/src/V1/SafetySpec.php | 67 + AiPlatform/src/V1/Scheduling/Strategy.php | 16 +- .../src/V1/SummarizationHelpfulnessInput.php | 121 + .../V1/SummarizationHelpfulnessInstance.php | 209 ++ .../src/V1/SummarizationHelpfulnessResult.php | 155 ++ .../src/V1/SummarizationHelpfulnessSpec.php | 105 + .../src/V1/SummarizationQualityInput.php | 121 + .../src/V1/SummarizationQualityInstance.php | 209 ++ .../src/V1/SummarizationQualityResult.php | 155 ++ .../src/V1/SummarizationQualitySpec.php | 105 + .../src/V1/SummarizationVerbosityInput.php | 121 + .../src/V1/SummarizationVerbosityInstance.php | 209 ++ .../src/V1/SummarizationVerbosityResult.php | 155 ++ .../src/V1/SummarizationVerbositySpec.php | 105 + AiPlatform/src/V1/ToolCallValidInput.php | 111 + AiPlatform/src/V1/ToolCallValidInstance.php | 121 + .../src/V1/ToolCallValidMetricValue.php | 77 + AiPlatform/src/V1/ToolCallValidResults.php | 67 + AiPlatform/src/V1/ToolCallValidSpec.php | 33 + AiPlatform/src/V1/ToolNameMatchInput.php | 111 + AiPlatform/src/V1/ToolNameMatchInstance.php | 121 + .../src/V1/ToolNameMatchMetricValue.php | 77 + AiPlatform/src/V1/ToolNameMatchResults.php | 67 + AiPlatform/src/V1/ToolNameMatchSpec.php | 33 + .../src/V1/ToolParameterKVMatchInput.php | 111 + .../src/V1/ToolParameterKVMatchInstance.php | 121 + .../V1/ToolParameterKVMatchMetricValue.php | 77 + .../src/V1/ToolParameterKVMatchResults.php | 67 + .../src/V1/ToolParameterKVMatchSpec.php | 67 + .../src/V1/ToolParameterKeyMatchInput.php | 111 + .../src/V1/ToolParameterKeyMatchInstance.php | 121 + .../V1/ToolParameterKeyMatchMetricValue.php | 77 + .../src/V1/ToolParameterKeyMatchResults.php | 67 + .../src/V1/ToolParameterKeyMatchSpec.php | 33 + AiPlatform/src/V1/gapic_metadata.json | 39 + .../dataset_service_rest_client_config.php | 76 + ...esource_pool_service_descriptor_config.php | 1 + .../endpoint_service_descriptor_config.php | 1 + .../evaluation_service_client_config.json | 52 + .../evaluation_service_descriptor_config.php | 116 + .../evaluation_service_rest_client_config.php | 2100 +++++++++++++++++ ...dex_endpoint_service_descriptor_config.php | 1 + .../job_service_descriptor_config.php | 1 + ...llm_utility_service_rest_client_config.php | 20 + .../notebook_service_descriptor_config.php | 1 + ...ent_resource_service_descriptor_config.php | 1 + .../prediction_service_rest_client_config.php | 20 + .../V1/Client/EvaluationServiceClientTest.php | 495 ++++ 143 files changed, 17337 insertions(+), 16 deletions(-) create mode 100644 AiPlatform/metadata/V1/EvaluationService.php create mode 100644 AiPlatform/metadata/V1/ReservationAffinity.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/evaluate_instances.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/get_iam_policy.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/get_location.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/list_locations.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/set_iam_policy.php create mode 100644 AiPlatform/samples/V1/EvaluationServiceClient/test_iam_permissions.php create mode 100644 AiPlatform/src/V1/BleuInput.php create mode 100644 AiPlatform/src/V1/BleuInstance.php create mode 100644 AiPlatform/src/V1/BleuMetricValue.php create mode 100644 AiPlatform/src/V1/BleuResults.php create mode 100644 AiPlatform/src/V1/BleuSpec.php create mode 100644 AiPlatform/src/V1/Client/EvaluationServiceClient.php create mode 100644 AiPlatform/src/V1/CoherenceInput.php create mode 100644 AiPlatform/src/V1/CoherenceInstance.php create mode 100644 AiPlatform/src/V1/CoherenceResult.php create mode 100644 AiPlatform/src/V1/CoherenceSpec.php create mode 100644 AiPlatform/src/V1/EvaluateInstancesRequest.php create mode 100644 AiPlatform/src/V1/EvaluateInstancesResponse.php create mode 100644 AiPlatform/src/V1/ExactMatchInput.php create mode 100644 AiPlatform/src/V1/ExactMatchInstance.php create mode 100644 AiPlatform/src/V1/ExactMatchMetricValue.php create mode 100644 AiPlatform/src/V1/ExactMatchResults.php create mode 100644 AiPlatform/src/V1/ExactMatchSpec.php create mode 100644 AiPlatform/src/V1/FluencyInput.php create mode 100644 AiPlatform/src/V1/FluencyInstance.php create mode 100644 AiPlatform/src/V1/FluencyResult.php create mode 100644 AiPlatform/src/V1/FluencySpec.php create mode 100644 AiPlatform/src/V1/FulfillmentInput.php create mode 100644 AiPlatform/src/V1/FulfillmentInstance.php create mode 100644 AiPlatform/src/V1/FulfillmentResult.php create mode 100644 AiPlatform/src/V1/FulfillmentSpec.php create mode 100644 AiPlatform/src/V1/GroundednessInput.php create mode 100644 AiPlatform/src/V1/GroundednessInstance.php create mode 100644 AiPlatform/src/V1/GroundednessResult.php create mode 100644 AiPlatform/src/V1/GroundednessSpec.php create mode 100644 AiPlatform/src/V1/PairwiseChoice.php create mode 100644 AiPlatform/src/V1/PairwiseMetricInput.php create mode 100644 AiPlatform/src/V1/PairwiseMetricInstance.php create mode 100644 AiPlatform/src/V1/PairwiseMetricResult.php create mode 100644 AiPlatform/src/V1/PairwiseMetricSpec.php create mode 100644 AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInput.php create mode 100644 AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInstance.php create mode 100644 AiPlatform/src/V1/PairwiseQuestionAnsweringQualityResult.php create mode 100644 AiPlatform/src/V1/PairwiseQuestionAnsweringQualitySpec.php create mode 100644 AiPlatform/src/V1/PairwiseSummarizationQualityInput.php create mode 100644 AiPlatform/src/V1/PairwiseSummarizationQualityInstance.php create mode 100644 AiPlatform/src/V1/PairwiseSummarizationQualityResult.php create mode 100644 AiPlatform/src/V1/PairwiseSummarizationQualitySpec.php create mode 100644 AiPlatform/src/V1/PointwiseMetricInput.php create mode 100644 AiPlatform/src/V1/PointwiseMetricInstance.php create mode 100644 AiPlatform/src/V1/PointwiseMetricResult.php create mode 100644 AiPlatform/src/V1/PointwiseMetricSpec.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringCorrectnessInput.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringCorrectnessInstance.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringCorrectnessResult.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringCorrectnessSpec.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringHelpfulnessInput.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringHelpfulnessInstance.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringHelpfulnessResult.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringHelpfulnessSpec.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringQualityInput.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringQualityInstance.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringQualityResult.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringQualitySpec.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringRelevanceInput.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringRelevanceInstance.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringRelevanceResult.php create mode 100644 AiPlatform/src/V1/QuestionAnsweringRelevanceSpec.php create mode 100644 AiPlatform/src/V1/ReservationAffinity.php create mode 100644 AiPlatform/src/V1/ReservationAffinity/Type.php create mode 100644 AiPlatform/src/V1/RougeInput.php create mode 100644 AiPlatform/src/V1/RougeInstance.php create mode 100644 AiPlatform/src/V1/RougeMetricValue.php create mode 100644 AiPlatform/src/V1/RougeResults.php create mode 100644 AiPlatform/src/V1/RougeSpec.php create mode 100644 AiPlatform/src/V1/SafetyInput.php create mode 100644 AiPlatform/src/V1/SafetyInstance.php create mode 100644 AiPlatform/src/V1/SafetyResult.php create mode 100644 AiPlatform/src/V1/SafetySpec.php create mode 100644 AiPlatform/src/V1/SummarizationHelpfulnessInput.php create mode 100644 AiPlatform/src/V1/SummarizationHelpfulnessInstance.php create mode 100644 AiPlatform/src/V1/SummarizationHelpfulnessResult.php create mode 100644 AiPlatform/src/V1/SummarizationHelpfulnessSpec.php create mode 100644 AiPlatform/src/V1/SummarizationQualityInput.php create mode 100644 AiPlatform/src/V1/SummarizationQualityInstance.php create mode 100644 AiPlatform/src/V1/SummarizationQualityResult.php create mode 100644 AiPlatform/src/V1/SummarizationQualitySpec.php create mode 100644 AiPlatform/src/V1/SummarizationVerbosityInput.php create mode 100644 AiPlatform/src/V1/SummarizationVerbosityInstance.php create mode 100644 AiPlatform/src/V1/SummarizationVerbosityResult.php create mode 100644 AiPlatform/src/V1/SummarizationVerbositySpec.php create mode 100644 AiPlatform/src/V1/ToolCallValidInput.php create mode 100644 AiPlatform/src/V1/ToolCallValidInstance.php create mode 100644 AiPlatform/src/V1/ToolCallValidMetricValue.php create mode 100644 AiPlatform/src/V1/ToolCallValidResults.php create mode 100644 AiPlatform/src/V1/ToolCallValidSpec.php create mode 100644 AiPlatform/src/V1/ToolNameMatchInput.php create mode 100644 AiPlatform/src/V1/ToolNameMatchInstance.php create mode 100644 AiPlatform/src/V1/ToolNameMatchMetricValue.php create mode 100644 AiPlatform/src/V1/ToolNameMatchResults.php create mode 100644 AiPlatform/src/V1/ToolNameMatchSpec.php create mode 100644 AiPlatform/src/V1/ToolParameterKVMatchInput.php create mode 100644 AiPlatform/src/V1/ToolParameterKVMatchInstance.php create mode 100644 AiPlatform/src/V1/ToolParameterKVMatchMetricValue.php create mode 100644 AiPlatform/src/V1/ToolParameterKVMatchResults.php create mode 100644 AiPlatform/src/V1/ToolParameterKVMatchSpec.php create mode 100644 AiPlatform/src/V1/ToolParameterKeyMatchInput.php create mode 100644 AiPlatform/src/V1/ToolParameterKeyMatchInstance.php create mode 100644 AiPlatform/src/V1/ToolParameterKeyMatchMetricValue.php create mode 100644 AiPlatform/src/V1/ToolParameterKeyMatchResults.php create mode 100644 AiPlatform/src/V1/ToolParameterKeyMatchSpec.php create mode 100644 AiPlatform/src/V1/resources/evaluation_service_client_config.json create mode 100644 AiPlatform/src/V1/resources/evaluation_service_descriptor_config.php create mode 100644 AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php create mode 100644 AiPlatform/tests/Unit/V1/Client/EvaluationServiceClientTest.php diff --git a/AiPlatform/metadata/V1/CustomJob.php b/AiPlatform/metadata/V1/CustomJob.php index 31bf916260e914cfd1b78f2cb1540771ab7f605d..2324c27ff25a8598120efb612aaf6177de258a15 100644 GIT binary patch delta 83 zcmV-Z0IdJsBKjh*Vgv-s844?t`~(}3W)QQH1f&W9q?0xe#{pfF{tq-M5DExPPgh?< pPg7J70vZAc0TK)f2vbx+PDDXcL=XcK2nqyKP)}441hYR79|1j66}12W delta 55 zcmV-70LcIPBHkjfVgv-Q844?t`~(}3W)QQH1f&W9h?6!C#{of;{tq+_3hoLUl`T2z*qoGSEf@&xH5rpb(xKTA6? z2Po-GE>u^VTqDP&V#S^UQ5hw!#G_wks1M~9!zF~aP0p7|;tRRu$dZ?so7!~w$z&$? z$@gXSq@%=zL_u1rLE^SBjrv-(LhmN?%Vx;6GTw3&h6?MH764hP@wth`*J z7mLy`k_8(9Ri+0vYVv+rQN{z4ugVq+`QCD5D@ZI#%_{-xvJ-+kT_}oA2*t%huO@fM zB{8;7-mmPy6F2+G-)3aF!Nespd84Ap}R*Yon zWmK{Q28;1zEhQPjC@ZBHb+E%AmfKF2QqpC=0Mr>;kTTgoQGar+k_Y3Z$;XsbnAS2* zeyx z^H(4TZMM*4MiqOYav^l(%tB2}letve1*%ZPBzy8gRR=+Y284^HnShb^Sha}p@Z>Nx b560@r^VK}~q6~%f5wQkzt=#4ZYN2cZF+#hoLUl`T2z*qoGNr@@&xH5#;VC*q@9?} zm2@UIC@D>jmJwzWnmf5uCW+trmLp4EVs2{F3yh4jCvQ?LU|cm>St*h+aB`heAd^t@WIp9u#@5L_$|{VBlQ$_R zateK9q9e@>_KeW)C4Zm|>e&YJ{-? E0QD7ci2wiq diff --git a/AiPlatform/metadata/V1/EvaluationService.php b/AiPlatform/metadata/V1/EvaluationService.php new file mode 100644 index 0000000000000000000000000000000000000000..aa0980f0d56182ed0f4983147664771c3f72a7f4 GIT binary patch literal 18327 zcmds9%WoUU8TU#_Y<+sKWb5JAnzm!vO{CgMnwE|nlX|kTC0SCOCLzL5)JWQdBI(_w zY$tFJJrqIF7Hxx~haQRoJ+uLO?4dvl6h#k3P!vVlLoWq#=&64|4?T6>JG(m^lCmu% z@k!>+{Jxp*`^`7Mot>GNUasxb;HPIR zx#;`OoP=Csi10o*_+PEQQFcp?A7FDO=bY;o+=?5x#j^Vz?%cGqRV@1mqa@32)hi{^ zM2A#Zu9VQkMTcRMvgc}5?2Ktgv~7j>2m2j#m7pfIM zoeujHLNuy4Q+81$Xs^z^i^`i>v{T%3t6qCmR}p8Bwvp8D&t7x6mouB2(y8;9j}y`j z#3>ixzaLoe+&-9SkF!dXl)jT8eJA%WkB@M`V$H?$CeC5>9Y3u+*diV%Y;YIw0%J-6 zkN1;3O8s*HMmdR5u7bIM8RxH}J9Xp-_96_Td&N>v*ewR79Zca`Js9n9tcmU`Uz%*( z(#bhe=_aX@BUKg;*_d-1WmM-7ofP7{2_lP2i^|i`?N#gBh}V9C)_&SldzBOy)icn$ zRj#8-={^T|k^)Sa0OnZ*0Wk;trRomyFoJ9V7wWKR!M)E7*sYijjdthRvPg>$u{>)myIR4|ztp=PE{ zW>z?k$=oKKj#}A41!rS5ethUg6P!Sa58FT4|y9^KXh6@wee!hHg1dh z!U6(^4rDUp6)XN-~^+0c!B7$za0Js=yGQ#01osO44GG8Z#0wVN62}y}44=^H3>JSZMFV+)Rif zdbbM4YE?Y9(ebs50?#e+Y;b}a__E1)E21XWO}L`KT!EvK6cNai6mrT4$;W6EaT$&V zSilrY#d5iTb(g!z8#zP~Crya!xZ(`1cbilbO%#Ac{Y9p@;no0`aJ|SZ_colOEvywi z{0IxO!n^2x1o1h=Xo)XE1GgjiSK&yxTA~?z z)WT3**^8fMI{ueA3unadK5smhA^s%R<5M?yg=|0cs*(0n{~CZXjkxe@SPUZj1`Mg{ z0t=IRIq<33?kmR0EYufRwUJ6#Vc@xyDhvU`WQuuiB_bn4z&e4+3<1Gpicu#}p%FsN zK%bBr3}lpvm5Zi;bFINpa8DLsAQT%MhDjEq=#pwf0^tsExxrD`ENtu$lN%D^CJaUN z1_xro#W>DIO84NBj8b!pOdw`W9TTByYWZC_t1%eL5AI8*;$AYDOqi1T zL;4ewQDaO)5GHqwWK5XTkwkA$l_0!-O!Bm6P|+Z=hwCts5Fy;eaZ38jCKtw3h(smQ zM!Y%j$%%uuB5fi%L}ISN2%Ur#A;K{IQ6|WYdWlTGQi?E4GJgqBMT`hgrf-^pN;wjO zZh{k+3sR5>bS8F;V?C-ExFiX!Y{2Qb6(LH55vF^LuQE|1OqNI+*ehrnloG`wphX`x9Mz#|x9(x|TT(KO2mpnT0l814+3o*nh3dKp4 z!A?H1PXN?BwCU27J}$I~*~LR2SeAVpx;%teJIQJTU2f^3Sc?{ZnC*q`LRdH315l8K zQv=W!S|goFRbVjug}c*!9mbHduEX6$+>40*BAqo3wh-|q)%;jh*AZ!BXDSUxwNLF4 zc+$t&1JT}g(89F0*(2~&fj&un&w?(w?qgrm#qpde2avj91g|F}XjDGTGFt&-vD<Q*nu>}vWe09m@ zV`qU!mnwt%HAZzhb}f4px=CF90PXJLc#^jh7Ej!;e!qs7%EZDJ9)je>gGc)<=%MH$ z+)FUT4Cvx*T(zSxiGaTV1Mvr~MEs`~^vM?v7WElj)Qw@20Ab{3;fP4Pe4*L+S|Aak zN%uMoCZ3oH5KF76^Uy01NbBrjIE+=Yk5|FySbUO=#rL6K7Gn`==sdyzbPs=ys<5|f z!T`#RPSUbcwX)@I(u7Zf&+{Wq_%c7zHiiXLKenJpU8lA)x(JxxfO-8e0NF$Uj7db= zSI6Ep=#Ty0p7YN_x6-Z#uD=hxywHI={zn#cE6eisb)Dah-zQk@(Ce9m*NuWj7+0M> z4Sms{+w*w}AZ%0vm*0aPR_4Gx{tF8R)ddBXaprY?H|9VUBlP}4!uv+8t%5}J&O0!y zduWb?JqCyIs1DFQ_HE4|_5h9)c+u1Z45+pYN$Q(mt0fOSct5vbKv}X(mR-I9JKX2F}$dG+aFf!v#%iqDv7*4zGh_ za>_or{2L2WCRontMd+`I6~WR@74HJ0!=&$uQF0038CrubU+hQGll7grj{ma-CnJ+JuNDDA?4Q+lsAr}#tl@b(Z5;XG%MMJ>W@0#T8j^tZ&zZoN6eXa`#JYJ z7MyD2qyx{pf3)Cuq%rbS4x`?Rj(V+sQR@opuEXZ!%vsBtRo{u=kFG%K?4=Zthq zu~}L6XP>DNZ%2%3APIQjgd^E5@c}BLDBI6=jqpO!wVCZ20SY>?^5?+snvYe^I~!VSszW+DU5wxTv00Y^#slMa|@ z-bI!@n~?JhraHe7O7TXn+$YC>Yr)gaeEwNgpLp&(op6WTf4~OAx^6HSXYIy_;V^hL zF$~(k!VJmS<_drbR8WkG1l+B2t(5+p5fZ<`n|ifRN`7BAb`=hMHb|-LUV3Dt zR4^YMDHYHbNU16P1t6u;t4B#n1@^#6`D+V?WBc704|BSC+W0{v1`|^6>xs$vIip66 z9|BNk50T|V@muN*7>d=Wk(_{Id=msd#kpGx z3V3e?Iqs?KyI>otvSTnJ_Q%AErq994tBKqqYKV^nCFp(^Vl4~5^n037T9DaiW&-X-HF!w7I<57RV^HY(6?JB~6~MWp5a*@ua=1bMhfOBfNhNTlUcHPZ4& zQRQ(*S{jT;x)PqJ+E=6{aHB};3bYdGKj5#Ogel?aC-r!hy{sGCZ5*ZIU}5BMCHFBJ zPmDHbo0_bT!= zoNiLC1wvhV4f=$rVIPz2({OwxlUsc)w>DRpSzOM|%oSc;T3eZ$$<62HW(N-0J$Qq7 zW^L|9ZfS17vU{OxCbKk~o6W4x4RqLtp>sVqH_&k-zdR$s?<2AQgtyKm&S2Wc z*)~y}-v=>n%!Qg-?4V~V`>ntK`@@cxQZJHASl$=sNT;zBe+O@J_opsRiQn+w57LPB zA-s+vZCx6_`Eh1UxekL}J|T{vev+Bo34)rRo|?LQ_b%7L;^9=W9_+CDV4fAX!DR8O z%qe_!)gYO($9RYEmS65mdfCc~^~N=JJBPRc10R9iuBunfV9U6pVQXs}SJnS~)G@w5 zZf_ literal 0 HcmV?d00001 diff --git a/AiPlatform/metadata/V1/LlmUtilityService.php b/AiPlatform/metadata/V1/LlmUtilityService.php index 1a1b04b59a69..23ecd05194df 100644 --- a/AiPlatform/metadata/V1/LlmUtilityService.php +++ b/AiPlatform/metadata/V1/LlmUtilityService.php @@ -23,7 +23,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Struct::initOnce(); $pool->internalAddGeneratedFile( ' - + 4google/cloud/aiplatform/v1/llm_utility_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/aiplatform/v1/content.proto3google/cloud/aiplatform/v1/prediction_service.protogoogle/protobuf/struct.proto" ComputeTokensRequest< endpoint ( B*AA$ @@ -37,10 +37,10 @@ public static function initOnce() { token_ids ( role ( BA"T ComputeTokensResponse; - tokens_info ( 2&.google.cloud.aiplatform.v1.TokensInfo2 -LlmUtilityService - CountTokens..google.cloud.aiplatform.v1.CountTokensRequest/.google.cloud.aiplatform.v1.CountTokensResponse"Aendpoint,instances"=/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens:*ZL"G/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens:* - ComputeTokens0.google.cloud.aiplatform.v1.ComputeTokensRequest1.google.cloud.aiplatform.v1.ComputeTokensResponse"Aendpoint,instances"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens:*ZN"I/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens:*MAaiplatform.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB + tokens_info ( 2&.google.cloud.aiplatform.v1.TokensInfo2 +LlmUtilityService + CountTokens..google.cloud.aiplatform.v1.CountTokensRequest/.google.cloud.aiplatform.v1.CountTokensResponse"Aendpoint,instances"=/v1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens:*ZL"G/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens:*Z+"&/v1/{endpoint=endpoints/*}:countTokens:*Z5"0/v1/{endpoint=publishers/*/models/*}:countTokens:* + ComputeTokens0.google.cloud.aiplatform.v1.ComputeTokensRequest1.google.cloud.aiplatform.v1.ComputeTokensResponse"Aendpoint,instances"?/v1/{endpoint=projects/*/locations/*/endpoints/*}:computeTokens:*ZN"I/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens:*Z-"(/v1/{endpoint=endpoints/*}:computeTokens:*Z7"2/v1/{endpoint=publishers/*/models/*}:computeTokens:*MAaiplatform.googleapis.comA.https://www.googleapis.com/auth/cloud-platformB com.google.cloud.aiplatform.v1BLlmUtilityServiceProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbGoogle.Cloud.AIPlatform.V1Google\\Cloud\\AIPlatform\\V1Google::Cloud::AIPlatform::V1bproto3' , true); diff --git a/AiPlatform/metadata/V1/MachineResources.php b/AiPlatform/metadata/V1/MachineResources.php index cfb116767575..30228054f736 100644 --- a/AiPlatform/metadata/V1/MachineResources.php +++ b/AiPlatform/metadata/V1/MachineResources.php @@ -16,21 +16,23 @@ public static function initOnce() { } \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Cloud\Aiplatform\V1\AcceleratorType::initOnce(); + \GPBMetadata\Google\Cloud\Aiplatform\V1\ReservationAffinity::initOnce(); $pool->internalAddGeneratedFile( ' - - -2google/cloud/aiplatform/v1/machine_resources.protogoogle.cloud.aiplatform.v11google/cloud/aiplatform/v1/accelerator_type.proto" + +2google/cloud/aiplatform/v1/machine_resources.protogoogle.cloud.aiplatform.v11google/cloud/aiplatform/v1/accelerator_type.proto5google/cloud/aiplatform/v1/reservation_affinity.proto" MachineSpec machine_type ( BAJ accelerator_type (2+.google.cloud.aiplatform.v1.AcceleratorTypeBA accelerator_count ( - tpu_topology ( BA" + tpu_topology ( BAU +reservation_affinity ( 2/.google.cloud.aiplatform.v1.ReservationAffinityBAA" DedicatedResourcesE machine_spec ( 2\'.google.cloud.aiplatform.v1.MachineSpecBAA! min_replica_count (BAA max_replica_count (BAX -autoscaling_metric_specs ( 21.google.cloud.aiplatform.v1.AutoscalingMetricSpecBA"T +autoscaling_metric_specs ( 21.google.cloud.aiplatform.v1.AutoscalingMetricSpecBA +spot (BA"T AutomaticResources min_replica_count (BA max_replica_count (BA" diff --git a/AiPlatform/metadata/V1/PredictionService.php b/AiPlatform/metadata/V1/PredictionService.php index 31efe26992a17bb37412667a0cabef6e11da0926..7339925478359dc25e303a3f7c24fde11ac0aaeb 100644 GIT binary patch delta 204 zcmbQ}@yc^U5DUvm2QK5uj;zuX(`elat)nFyIlea1;@R=zYA`2NPiBCSH zAjB=SmYGX5xTGjGF?aGm`AVr3I82_vH2I+7JpL#nC0%4=7D@_F{-G$$XQO0}B)r)` H=^-NkO;||U delta 86 zcmaFmIniT75DUvkJ1*nNj;zuX(D2Xvn pnmj>aGMmtDCN9z7$%@J%lX(@gn6`oCnC3A~)=-+a*+O{}BLK8f8ZQ6< diff --git a/AiPlatform/metadata/V1/ReservationAffinity.php b/AiPlatform/metadata/V1/ReservationAffinity.php new file mode 100644 index 0000000000000000000000000000000000000000..dcde449b830960e0da664654f36ffed20ed8daa0 GIT binary patch literal 1435 zcmbVM&2G~`5GDy!Vh<&9dq^vRmQtxH0!QKJ;?g3gNux-RL~W>4WXak%<7C0{TI+SB zw93nHJGu1kF?rh1$KA)kyP42T1`*{!_?K?Xz+s~Lk?#|q3c7hu+T^#CEqBVmY7 zm!M{fiLMZqPZ0Gz>flhwj1JzVp{+7f;?YZ4;30O27lOpOdDe}5N3p~zpyNAG-p2{1 zI=dS%*^om#XV+CdlKrt-z5wnM&#FV{a2g24yYi@E3_&b9t1RXHG_8W8E-oh=4dVvM zLo9d%+3Xl|5E1teV%`d1w)nDE^v(>Zbwa@#)L=v=lySpYR<#7VEmXEQx!9FaaVwr5 z(X?=LFj&-iB4tuuFjGAD(9e75^?&I@+fKstSXTN{R{Es6y_G_efGUZ_bQ4+ae95DY z6#~&L3vJ1xH`Hj0X#k}h&Xw0+ywY#asjmRldos3G_+jR?A}V}_X(=yp?kh`9GtkrVY#4F0VJ!WIA^j%*mmX{H6c9hHsiJ*jr+i7l}qM>bgI`Z nyU3(1DsetLocation($formattedLocation); + + // Call the API and handle any network failures. + try { + /** @var EvaluateInstancesResponse $response */ + $response = $evaluationServiceClient->evaluateInstances($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedLocation = EvaluationServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + evaluate_instances_sample($formattedLocation); +} +// [END aiplatform_v1_generated_EvaluationService_EvaluateInstances_sync] diff --git a/AiPlatform/samples/V1/EvaluationServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/EvaluationServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..82d29e437ba7 --- /dev/null +++ b/AiPlatform/samples/V1/EvaluationServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $evaluationServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END aiplatform_v1_generated_EvaluationService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/EvaluationServiceClient/get_location.php b/AiPlatform/samples/V1/EvaluationServiceClient/get_location.php new file mode 100644 index 000000000000..f4ed60b5e4db --- /dev/null +++ b/AiPlatform/samples/V1/EvaluationServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_EvaluationService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/EvaluationServiceClient/list_locations.php b/AiPlatform/samples/V1/EvaluationServiceClient/list_locations.php new file mode 100644 index 000000000000..053c9c7cbe66 --- /dev/null +++ b/AiPlatform/samples/V1/EvaluationServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_EvaluationService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/EvaluationServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/EvaluationServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..d58116314326 --- /dev/null +++ b/AiPlatform/samples/V1/EvaluationServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $evaluationServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END aiplatform_v1_generated_EvaluationService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/EvaluationServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/EvaluationServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..f83eab16b842 --- /dev/null +++ b/AiPlatform/samples/V1/EvaluationServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $evaluationServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END aiplatform_v1_generated_EvaluationService_TestIamPermissions_sync] diff --git a/AiPlatform/src/V1/AcceleratorType.php b/AiPlatform/src/V1/AcceleratorType.php index bd9880da7d47..c1230d435c4f 100644 --- a/AiPlatform/src/V1/AcceleratorType.php +++ b/AiPlatform/src/V1/AcceleratorType.php @@ -20,7 +20,8 @@ class AcceleratorType */ const ACCELERATOR_TYPE_UNSPECIFIED = 0; /** - * Nvidia Tesla K80 GPU. + * Deprecated: Nvidia Tesla K80 GPU has reached end of support, + * see https://cloud.google.com/compute/docs/eol/k80-eol. * * Generated from protobuf enum NVIDIA_TESLA_K80 = 1 [deprecated = true]; */ diff --git a/AiPlatform/src/V1/BleuInput.php b/AiPlatform/src/V1/BleuInput.php new file mode 100644 index 000000000000..66dd21bdc43b --- /dev/null +++ b/AiPlatform/src/V1/BleuInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.BleuInput + */ +class BleuInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for bleu score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated bleu instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\BleuSpec $metric_spec + * Required. Spec for bleu score metric. + * @type array<\Google\Cloud\AIPlatform\V1\BleuInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated bleu instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for bleu score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\BleuSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for bleu score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\BleuSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\BleuSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated bleu instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated bleu instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\BleuInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\BleuInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BleuInstance.php b/AiPlatform/src/V1/BleuInstance.php new file mode 100644 index 000000000000..1d02d8d428fa --- /dev/null +++ b/AiPlatform/src/V1/BleuInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.BleuInstance + */ +class BleuInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BleuMetricValue.php b/AiPlatform/src/V1/BleuMetricValue.php new file mode 100644 index 000000000000..d18cc2617802 --- /dev/null +++ b/AiPlatform/src/V1/BleuMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.BleuMetricValue + */ +class BleuMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Bleu score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Bleu score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Bleu score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Bleu score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BleuResults.php b/AiPlatform/src/V1/BleuResults.php new file mode 100644 index 000000000000..1fccdfba4802 --- /dev/null +++ b/AiPlatform/src/V1/BleuResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.BleuResults + */ +class BleuResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Bleu metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $bleu_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\BleuMetricValue>|\Google\Protobuf\Internal\RepeatedField $bleu_metric_values + * Output only. Bleu metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Bleu metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBleuMetricValues() + { + return $this->bleu_metric_values; + } + + /** + * Output only. Bleu metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.BleuMetricValue bleu_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\BleuMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBleuMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\BleuMetricValue::class); + $this->bleu_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/BleuSpec.php b/AiPlatform/src/V1/BleuSpec.php new file mode 100644 index 000000000000..4edc4918e2fa --- /dev/null +++ b/AiPlatform/src/V1/BleuSpec.php @@ -0,0 +1,68 @@ +google.cloud.aiplatform.v1.BleuSpec + */ +class BleuSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use_effective_order to compute bleu score. + * + * Generated from protobuf field bool use_effective_order = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_effective_order = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_effective_order + * Optional. Whether to use_effective_order to compute bleu score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use_effective_order to compute bleu score. + * + * Generated from protobuf field bool use_effective_order = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseEffectiveOrder() + { + return $this->use_effective_order; + } + + /** + * Optional. Whether to use_effective_order to compute bleu score. + * + * Generated from protobuf field bool use_effective_order = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseEffectiveOrder($var) + { + GPBUtil::checkBool($var); + $this->use_effective_order = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Client/DeploymentResourcePoolServiceClient.php b/AiPlatform/src/V1/Client/DeploymentResourcePoolServiceClient.php index 407ff66c9f38..06ed4ee3b4e0 100644 --- a/AiPlatform/src/V1/Client/DeploymentResourcePoolServiceClient.php +++ b/AiPlatform/src/V1/Client/DeploymentResourcePoolServiceClient.php @@ -229,6 +229,25 @@ public static function projectName(string $project): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -236,6 +255,7 @@ public static function projectName(string $project): string * - deploymentResourcePool: projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool} * - location: projects/{project}/locations/{location} * - project: projects/{project} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is diff --git a/AiPlatform/src/V1/Client/EndpointServiceClient.php b/AiPlatform/src/V1/Client/EndpointServiceClient.php index 3745f6f09496..42ca14637f1c 100644 --- a/AiPlatform/src/V1/Client/EndpointServiceClient.php +++ b/AiPlatform/src/V1/Client/EndpointServiceClient.php @@ -338,6 +338,25 @@ public static function projectLocationPublisherModelName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -350,6 +369,7 @@ public static function projectLocationPublisherModelName( * - network: projects/{project}/global/networks/{network} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is diff --git a/AiPlatform/src/V1/Client/EvaluationServiceClient.php b/AiPlatform/src/V1/Client/EvaluationServiceClient.php new file mode 100644 index 000000000000..2bfaad2291a9 --- /dev/null +++ b/AiPlatform/src/V1/Client/EvaluationServiceClient.php @@ -0,0 +1,394 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/evaluation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/evaluation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/evaluation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/evaluation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Evaluates instances based on a given metric. + * + * The async variant is {@see EvaluationServiceClient::evaluateInstancesAsync()} . + * + * @example samples/V1/EvaluationServiceClient/evaluate_instances.php + * + * @param EvaluateInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EvaluateInstancesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function evaluateInstances( + EvaluateInstancesRequest $request, + array $callOptions = [] + ): EvaluateInstancesResponse { + return $this->startApiCall('EvaluateInstances', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see EvaluationServiceClient::getLocationAsync()} . + * + * @example samples/V1/EvaluationServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see EvaluationServiceClient::listLocationsAsync()} . + * + * @example samples/V1/EvaluationServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see EvaluationServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/EvaluationServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see EvaluationServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/EvaluationServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * 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. + * + * The async variant is {@see EvaluationServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/EvaluationServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions( + TestIamPermissionsRequest $request, + array $callOptions = [] + ): TestIamPermissionsResponse { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/AiPlatform/src/V1/Client/IndexEndpointServiceClient.php b/AiPlatform/src/V1/Client/IndexEndpointServiceClient.php index 6d9980bde7cc..006557862e02 100644 --- a/AiPlatform/src/V1/Client/IndexEndpointServiceClient.php +++ b/AiPlatform/src/V1/Client/IndexEndpointServiceClient.php @@ -233,6 +233,25 @@ public static function locationName(string $project, string $location): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -240,6 +259,7 @@ public static function locationName(string $project, string $location): string * - index: projects/{project}/locations/{location}/indexes/{index} * - indexEndpoint: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint} * - location: projects/{project}/locations/{location} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is diff --git a/AiPlatform/src/V1/Client/JobServiceClient.php b/AiPlatform/src/V1/Client/JobServiceClient.php index 0f36dc668d52..53f0c09b104c 100644 --- a/AiPlatform/src/V1/Client/JobServiceClient.php +++ b/AiPlatform/src/V1/Client/JobServiceClient.php @@ -582,6 +582,25 @@ public static function projectLocationPublisherModelName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a tensorboard * resource. @@ -643,6 +662,7 @@ public static function trialName(string $project, string $location, string $stud * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard} * - trial: projects/{project}/locations/{location}/studies/{study}/trials/{trial} * diff --git a/AiPlatform/src/V1/Client/NotebookServiceClient.php b/AiPlatform/src/V1/Client/NotebookServiceClient.php index bffd1f350aef..d22d9652abcd 100644 --- a/AiPlatform/src/V1/Client/NotebookServiceClient.php +++ b/AiPlatform/src/V1/Client/NotebookServiceClient.php @@ -291,6 +291,25 @@ public static function notebookRuntimeTemplateName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a schedule * resource. @@ -338,6 +357,7 @@ public static function subnetworkName(string $project, string $region, string $s * - notebookExecutionJob: projects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job} * - notebookRuntime: projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime} * - notebookRuntimeTemplate: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * - schedule: projects/{project}/locations/{location}/schedules/{schedule} * - subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork} * diff --git a/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php b/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php index 95176a9fa93b..ada16e3ce842 100644 --- a/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php +++ b/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php @@ -228,6 +228,25 @@ public static function persistentResourceName(string $project, string $location, ]); } + /** + * Formats a string containing the fully-qualified path to represent a reservation + * resource. + * + * @param string $projectIdOrNumber + * @param string $zone + * @param string $reservationName + * + * @return string The formatted reservation resource. + */ + public static function reservationName(string $projectIdOrNumber, string $zone, string $reservationName): string + { + return self::getPathTemplate('reservation')->render([ + 'project_id_or_number' => $projectIdOrNumber, + 'zone' => $zone, + 'reservation_name' => $reservationName, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -235,6 +254,7 @@ public static function persistentResourceName(string $project, string $location, * - location: projects/{project}/locations/{location} * - network: projects/{project}/global/networks/{network} * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} + * - reservation: projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name} * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is diff --git a/AiPlatform/src/V1/CoherenceInput.php b/AiPlatform/src/V1/CoherenceInput.php new file mode 100644 index 000000000000..d3143c729063 --- /dev/null +++ b/AiPlatform/src/V1/CoherenceInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.CoherenceInput + */ +class CoherenceInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for coherence score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Coherence instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\CoherenceSpec $metric_spec + * Required. Spec for coherence score metric. + * @type \Google\Cloud\AIPlatform\V1\CoherenceInstance $instance + * Required. Coherence instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for coherence score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\CoherenceSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for coherence score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\CoherenceSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CoherenceSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Coherence instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\CoherenceInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Coherence instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\CoherenceInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CoherenceInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CoherenceInstance.php b/AiPlatform/src/V1/CoherenceInstance.php new file mode 100644 index 000000000000..ed7312e18c73 --- /dev/null +++ b/AiPlatform/src/V1/CoherenceInstance.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.CoherenceInstance + */ +class CoherenceInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CoherenceResult.php b/AiPlatform/src/V1/CoherenceResult.php new file mode 100644 index 000000000000..9ec343244719 --- /dev/null +++ b/AiPlatform/src/V1/CoherenceResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.CoherenceResult + */ +class CoherenceResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Coherence score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for coherence score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for coherence score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Coherence score. + * @type string $explanation + * Output only. Explanation for coherence score. + * @type float $confidence + * Output only. Confidence for coherence score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Coherence score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Coherence score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for coherence score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for coherence score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for coherence score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for coherence score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CoherenceSpec.php b/AiPlatform/src/V1/CoherenceSpec.php new file mode 100644 index 000000000000..e901171f9dbc --- /dev/null +++ b/AiPlatform/src/V1/CoherenceSpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.CoherenceSpec + */ +class CoherenceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DedicatedResources.php b/AiPlatform/src/V1/DedicatedResources.php index fb3935c5e29e..9e4bbc97a1f2 100644 --- a/AiPlatform/src/V1/DedicatedResources.php +++ b/AiPlatform/src/V1/DedicatedResources.php @@ -77,6 +77,13 @@ class DedicatedResources extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.aiplatform.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; */ private $autoscaling_metric_specs; + /** + * Optional. If true, schedule the deployment workload on [spot + * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). + * + * Generated from protobuf field bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $spot = false; /** * Constructor. @@ -129,6 +136,9 @@ class DedicatedResources extends \Google\Protobuf\Internal\Message * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and * [autoscaling_metric_specs.target][google.cloud.aiplatform.v1.AutoscalingMetricSpec.target] * to `80`. + * @type bool $spot + * Optional. If true, schedule the deployment workload on [spot + * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). * } */ public function __construct($data = NULL) { @@ -324,5 +334,33 @@ public function setAutoscalingMetricSpecs($var) return $this; } + /** + * Optional. If true, schedule the deployment workload on [spot + * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). + * + * Generated from protobuf field bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSpot() + { + return $this->spot; + } + + /** + * Optional. If true, schedule the deployment workload on [spot + * VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). + * + * Generated from protobuf field bool spot = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSpot($var) + { + GPBUtil::checkBool($var); + $this->spot = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/EvaluateInstancesRequest.php b/AiPlatform/src/V1/EvaluateInstancesRequest.php new file mode 100644 index 000000000000..9e465cecb463 --- /dev/null +++ b/AiPlatform/src/V1/EvaluateInstancesRequest.php @@ -0,0 +1,857 @@ +google.cloud.aiplatform.v1.EvaluateInstancesRequest + */ +class EvaluateInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $location = ''; + protected $metric_inputs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ExactMatchInput $exact_match_input + * Auto metric instances. + * Instances and metric spec for exact match metric. + * @type \Google\Cloud\AIPlatform\V1\BleuInput $bleu_input + * Instances and metric spec for bleu metric. + * @type \Google\Cloud\AIPlatform\V1\RougeInput $rouge_input + * Instances and metric spec for rouge metric. + * @type \Google\Cloud\AIPlatform\V1\FluencyInput $fluency_input + * LLM-based metric instance. + * General text generation metrics, applicable to other categories. + * Input for fluency metric. + * @type \Google\Cloud\AIPlatform\V1\CoherenceInput $coherence_input + * Input for coherence metric. + * @type \Google\Cloud\AIPlatform\V1\SafetyInput $safety_input + * Input for safety metric. + * @type \Google\Cloud\AIPlatform\V1\GroundednessInput $groundedness_input + * Input for groundedness metric. + * @type \Google\Cloud\AIPlatform\V1\FulfillmentInput $fulfillment_input + * Input for fulfillment metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationQualityInput $summarization_quality_input + * Input for summarization quality metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInput $pairwise_summarization_quality_input + * Input for pairwise summarization quality metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInput $summarization_helpfulness_input + * Input for summarization helpfulness metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInput $summarization_verbosity_input + * Input for summarization verbosity metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInput $question_answering_quality_input + * Input for question answering quality metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInput $pairwise_question_answering_quality_input + * Input for pairwise question answering quality metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInput $question_answering_relevance_input + * Input for question answering relevance metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInput $question_answering_helpfulness_input + * Input for question answering helpfulness + * metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInput $question_answering_correctness_input + * Input for question answering correctness + * metric. + * @type \Google\Cloud\AIPlatform\V1\PointwiseMetricInput $pointwise_metric_input + * Input for pointwise metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseMetricInput $pairwise_metric_input + * Input for pairwise metric. + * @type \Google\Cloud\AIPlatform\V1\ToolCallValidInput $tool_call_valid_input + * Tool call metric instances. + * Input for tool call valid metric. + * @type \Google\Cloud\AIPlatform\V1\ToolNameMatchInput $tool_name_match_input + * Input for tool name match metric. + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInput $tool_parameter_key_match_input + * Input for tool parameter key match metric. + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInput $tool_parameter_kv_match_input + * Input for tool parameter key value match metric. + * @type string $location + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{location}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Auto metric instances. + * Instances and metric spec for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchInput exact_match_input = 2; + * @return \Google\Cloud\AIPlatform\V1\ExactMatchInput|null + */ + public function getExactMatchInput() + { + return $this->readOneof(2); + } + + public function hasExactMatchInput() + { + return $this->hasOneof(2); + } + + /** + * Auto metric instances. + * Instances and metric spec for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchInput exact_match_input = 2; + * @param \Google\Cloud\AIPlatform\V1\ExactMatchInput $var + * @return $this + */ + public function setExactMatchInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ExactMatchInput::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Instances and metric spec for bleu metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuInput bleu_input = 3; + * @return \Google\Cloud\AIPlatform\V1\BleuInput|null + */ + public function getBleuInput() + { + return $this->readOneof(3); + } + + public function hasBleuInput() + { + return $this->hasOneof(3); + } + + /** + * Instances and metric spec for bleu metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuInput bleu_input = 3; + * @param \Google\Cloud\AIPlatform\V1\BleuInput $var + * @return $this + */ + public function setBleuInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\BleuInput::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Instances and metric spec for rouge metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeInput rouge_input = 4; + * @return \Google\Cloud\AIPlatform\V1\RougeInput|null + */ + public function getRougeInput() + { + return $this->readOneof(4); + } + + public function hasRougeInput() + { + return $this->hasOneof(4); + } + + /** + * Instances and metric spec for rouge metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeInput rouge_input = 4; + * @param \Google\Cloud\AIPlatform\V1\RougeInput $var + * @return $this + */ + public function setRougeInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RougeInput::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * LLM-based metric instance. + * General text generation metrics, applicable to other categories. + * Input for fluency metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyInput fluency_input = 5; + * @return \Google\Cloud\AIPlatform\V1\FluencyInput|null + */ + public function getFluencyInput() + { + return $this->readOneof(5); + } + + public function hasFluencyInput() + { + return $this->hasOneof(5); + } + + /** + * LLM-based metric instance. + * General text generation metrics, applicable to other categories. + * Input for fluency metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyInput fluency_input = 5; + * @param \Google\Cloud\AIPlatform\V1\FluencyInput $var + * @return $this + */ + public function setFluencyInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FluencyInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Input for coherence metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceInput coherence_input = 6; + * @return \Google\Cloud\AIPlatform\V1\CoherenceInput|null + */ + public function getCoherenceInput() + { + return $this->readOneof(6); + } + + public function hasCoherenceInput() + { + return $this->hasOneof(6); + } + + /** + * Input for coherence metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceInput coherence_input = 6; + * @param \Google\Cloud\AIPlatform\V1\CoherenceInput $var + * @return $this + */ + public function setCoherenceInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CoherenceInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Input for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyInput safety_input = 8; + * @return \Google\Cloud\AIPlatform\V1\SafetyInput|null + */ + public function getSafetyInput() + { + return $this->readOneof(8); + } + + public function hasSafetyInput() + { + return $this->hasOneof(8); + } + + /** + * Input for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyInput safety_input = 8; + * @param \Google\Cloud\AIPlatform\V1\SafetyInput $var + * @return $this + */ + public function setSafetyInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SafetyInput::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Input for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessInput groundedness_input = 9; + * @return \Google\Cloud\AIPlatform\V1\GroundednessInput|null + */ + public function getGroundednessInput() + { + return $this->readOneof(9); + } + + public function hasGroundednessInput() + { + return $this->hasOneof(9); + } + + /** + * Input for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessInput groundedness_input = 9; + * @param \Google\Cloud\AIPlatform\V1\GroundednessInput $var + * @return $this + */ + public function setGroundednessInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GroundednessInput::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Input for fulfillment metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentInput fulfillment_input = 12; + * @return \Google\Cloud\AIPlatform\V1\FulfillmentInput|null + */ + public function getFulfillmentInput() + { + return $this->readOneof(12); + } + + public function hasFulfillmentInput() + { + return $this->hasOneof(12); + } + + /** + * Input for fulfillment metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentInput fulfillment_input = 12; + * @param \Google\Cloud\AIPlatform\V1\FulfillmentInput $var + * @return $this + */ + public function setFulfillmentInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FulfillmentInput::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Input for summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityInput summarization_quality_input = 7; + * @return \Google\Cloud\AIPlatform\V1\SummarizationQualityInput|null + */ + public function getSummarizationQualityInput() + { + return $this->readOneof(7); + } + + public function hasSummarizationQualityInput() + { + return $this->hasOneof(7); + } + + /** + * Input for summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityInput summarization_quality_input = 7; + * @param \Google\Cloud\AIPlatform\V1\SummarizationQualityInput $var + * @return $this + */ + public function setSummarizationQualityInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationQualityInput::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Input for pairwise summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityInput pairwise_summarization_quality_input = 23; + * @return \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInput|null + */ + public function getPairwiseSummarizationQualityInput() + { + return $this->readOneof(23); + } + + public function hasPairwiseSummarizationQualityInput() + { + return $this->hasOneof(23); + } + + /** + * Input for pairwise summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityInput pairwise_summarization_quality_input = 23; + * @param \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInput $var + * @return $this + */ + public function setPairwiseSummarizationQualityInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInput::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Input for summarization helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessInput summarization_helpfulness_input = 14; + * @return \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInput|null + */ + public function getSummarizationHelpfulnessInput() + { + return $this->readOneof(14); + } + + public function hasSummarizationHelpfulnessInput() + { + return $this->hasOneof(14); + } + + /** + * Input for summarization helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessInput summarization_helpfulness_input = 14; + * @param \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInput $var + * @return $this + */ + public function setSummarizationHelpfulnessInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInput::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Input for summarization verbosity metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityInput summarization_verbosity_input = 15; + * @return \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInput|null + */ + public function getSummarizationVerbosityInput() + { + return $this->readOneof(15); + } + + public function hasSummarizationVerbosityInput() + { + return $this->hasOneof(15); + } + + /** + * Input for summarization verbosity metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityInput summarization_verbosity_input = 15; + * @param \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInput $var + * @return $this + */ + public function setSummarizationVerbosityInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInput::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Input for question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityInput question_answering_quality_input = 10; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInput|null + */ + public function getQuestionAnsweringQualityInput() + { + return $this->readOneof(10); + } + + public function hasQuestionAnsweringQualityInput() + { + return $this->hasOneof(10); + } + + /** + * Input for question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityInput question_answering_quality_input = 10; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInput $var + * @return $this + */ + public function setQuestionAnsweringQualityInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInput::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Input for pairwise question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInput pairwise_question_answering_quality_input = 24; + * @return \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInput|null + */ + public function getPairwiseQuestionAnsweringQualityInput() + { + return $this->readOneof(24); + } + + public function hasPairwiseQuestionAnsweringQualityInput() + { + return $this->hasOneof(24); + } + + /** + * Input for pairwise question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInput pairwise_question_answering_quality_input = 24; + * @param \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInput $var + * @return $this + */ + public function setPairwiseQuestionAnsweringQualityInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInput::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Input for question answering relevance metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInput question_answering_relevance_input = 16; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInput|null + */ + public function getQuestionAnsweringRelevanceInput() + { + return $this->readOneof(16); + } + + public function hasQuestionAnsweringRelevanceInput() + { + return $this->hasOneof(16); + } + + /** + * Input for question answering relevance metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInput question_answering_relevance_input = 16; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInput $var + * @return $this + */ + public function setQuestionAnsweringRelevanceInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInput::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Input for question answering helpfulness + * metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInput question_answering_helpfulness_input = 17; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInput|null + */ + public function getQuestionAnsweringHelpfulnessInput() + { + return $this->readOneof(17); + } + + public function hasQuestionAnsweringHelpfulnessInput() + { + return $this->hasOneof(17); + } + + /** + * Input for question answering helpfulness + * metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInput question_answering_helpfulness_input = 17; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInput $var + * @return $this + */ + public function setQuestionAnsweringHelpfulnessInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInput::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Input for question answering correctness + * metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInput question_answering_correctness_input = 18; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInput|null + */ + public function getQuestionAnsweringCorrectnessInput() + { + return $this->readOneof(18); + } + + public function hasQuestionAnsweringCorrectnessInput() + { + return $this->hasOneof(18); + } + + /** + * Input for question answering correctness + * metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInput question_answering_correctness_input = 18; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInput $var + * @return $this + */ + public function setQuestionAnsweringCorrectnessInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInput::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Input for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricInput pointwise_metric_input = 28; + * @return \Google\Cloud\AIPlatform\V1\PointwiseMetricInput|null + */ + public function getPointwiseMetricInput() + { + return $this->readOneof(28); + } + + public function hasPointwiseMetricInput() + { + return $this->hasOneof(28); + } + + /** + * Input for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricInput pointwise_metric_input = 28; + * @param \Google\Cloud\AIPlatform\V1\PointwiseMetricInput $var + * @return $this + */ + public function setPointwiseMetricInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PointwiseMetricInput::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Input for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricInput pairwise_metric_input = 29; + * @return \Google\Cloud\AIPlatform\V1\PairwiseMetricInput|null + */ + public function getPairwiseMetricInput() + { + return $this->readOneof(29); + } + + public function hasPairwiseMetricInput() + { + return $this->hasOneof(29); + } + + /** + * Input for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricInput pairwise_metric_input = 29; + * @param \Google\Cloud\AIPlatform\V1\PairwiseMetricInput $var + * @return $this + */ + public function setPairwiseMetricInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseMetricInput::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Tool call metric instances. + * Input for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidInput tool_call_valid_input = 19; + * @return \Google\Cloud\AIPlatform\V1\ToolCallValidInput|null + */ + public function getToolCallValidInput() + { + return $this->readOneof(19); + } + + public function hasToolCallValidInput() + { + return $this->hasOneof(19); + } + + /** + * Tool call metric instances. + * Input for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidInput tool_call_valid_input = 19; + * @param \Google\Cloud\AIPlatform\V1\ToolCallValidInput $var + * @return $this + */ + public function setToolCallValidInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolCallValidInput::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Input for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchInput tool_name_match_input = 20; + * @return \Google\Cloud\AIPlatform\V1\ToolNameMatchInput|null + */ + public function getToolNameMatchInput() + { + return $this->readOneof(20); + } + + public function hasToolNameMatchInput() + { + return $this->hasOneof(20); + } + + /** + * Input for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchInput tool_name_match_input = 20; + * @param \Google\Cloud\AIPlatform\V1\ToolNameMatchInput $var + * @return $this + */ + public function setToolNameMatchInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolNameMatchInput::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Input for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchInput tool_parameter_key_match_input = 21; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInput|null + */ + public function getToolParameterKeyMatchInput() + { + return $this->readOneof(21); + } + + public function hasToolParameterKeyMatchInput() + { + return $this->hasOneof(21); + } + + /** + * Input for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchInput tool_parameter_key_match_input = 21; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInput $var + * @return $this + */ + public function setToolParameterKeyMatchInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInput::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Input for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchInput tool_parameter_kv_match_input = 22; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInput|null + */ + public function getToolParameterKvMatchInput() + { + return $this->readOneof(22); + } + + public function hasToolParameterKvMatchInput() + { + return $this->hasOneof(22); + } + + /** + * Input for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchInput tool_parameter_kv_match_input = 22; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInput $var + * @return $this + */ + public function setToolParameterKvMatchInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInput::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Required. The resource name of the Location to evaluate the instances. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * @return string + */ + public function getMetricInputs() + { + return $this->whichOneof("metric_inputs"); + } + +} + diff --git a/AiPlatform/src/V1/EvaluateInstancesResponse.php b/AiPlatform/src/V1/EvaluateInstancesResponse.php new file mode 100644 index 000000000000..7a033ce7ab7a --- /dev/null +++ b/AiPlatform/src/V1/EvaluateInstancesResponse.php @@ -0,0 +1,822 @@ +google.cloud.aiplatform.v1.EvaluateInstancesResponse + */ +class EvaluateInstancesResponse extends \Google\Protobuf\Internal\Message +{ + protected $evaluation_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ExactMatchResults $exact_match_results + * Auto metric evaluation results. + * Results for exact match metric. + * @type \Google\Cloud\AIPlatform\V1\BleuResults $bleu_results + * Results for bleu metric. + * @type \Google\Cloud\AIPlatform\V1\RougeResults $rouge_results + * Results for rouge metric. + * @type \Google\Cloud\AIPlatform\V1\FluencyResult $fluency_result + * LLM-based metric evaluation result. + * General text generation metrics, applicable to other categories. + * Result for fluency metric. + * @type \Google\Cloud\AIPlatform\V1\CoherenceResult $coherence_result + * Result for coherence metric. + * @type \Google\Cloud\AIPlatform\V1\SafetyResult $safety_result + * Result for safety metric. + * @type \Google\Cloud\AIPlatform\V1\GroundednessResult $groundedness_result + * Result for groundedness metric. + * @type \Google\Cloud\AIPlatform\V1\FulfillmentResult $fulfillment_result + * Result for fulfillment metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationQualityResult $summarization_quality_result + * Summarization only metrics. + * Result for summarization quality metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityResult $pairwise_summarization_quality_result + * Result for pairwise summarization quality metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessResult $summarization_helpfulness_result + * Result for summarization helpfulness metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationVerbosityResult $summarization_verbosity_result + * Result for summarization verbosity metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityResult $question_answering_quality_result + * Question answering only metrics. + * Result for question answering quality metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityResult $pairwise_question_answering_quality_result + * Result for pairwise question answering quality metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceResult $question_answering_relevance_result + * Result for question answering relevance metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessResult $question_answering_helpfulness_result + * Result for question answering helpfulness metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessResult $question_answering_correctness_result + * Result for question answering correctness metric. + * @type \Google\Cloud\AIPlatform\V1\PointwiseMetricResult $pointwise_metric_result + * Generic metrics. + * Result for pointwise metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseMetricResult $pairwise_metric_result + * Result for pairwise metric. + * @type \Google\Cloud\AIPlatform\V1\ToolCallValidResults $tool_call_valid_results + * Tool call metrics. + * Results for tool call valid metric. + * @type \Google\Cloud\AIPlatform\V1\ToolNameMatchResults $tool_name_match_results + * Results for tool name match metric. + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchResults $tool_parameter_key_match_results + * Results for tool parameter key match metric. + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchResults $tool_parameter_kv_match_results + * Results for tool parameter key value match metric. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Auto metric evaluation results. + * Results for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchResults exact_match_results = 1; + * @return \Google\Cloud\AIPlatform\V1\ExactMatchResults|null + */ + public function getExactMatchResults() + { + return $this->readOneof(1); + } + + public function hasExactMatchResults() + { + return $this->hasOneof(1); + } + + /** + * Auto metric evaluation results. + * Results for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchResults exact_match_results = 1; + * @param \Google\Cloud\AIPlatform\V1\ExactMatchResults $var + * @return $this + */ + public function setExactMatchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ExactMatchResults::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Results for bleu metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuResults bleu_results = 2; + * @return \Google\Cloud\AIPlatform\V1\BleuResults|null + */ + public function getBleuResults() + { + return $this->readOneof(2); + } + + public function hasBleuResults() + { + return $this->hasOneof(2); + } + + /** + * Results for bleu metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BleuResults bleu_results = 2; + * @param \Google\Cloud\AIPlatform\V1\BleuResults $var + * @return $this + */ + public function setBleuResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\BleuResults::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Results for rouge metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeResults rouge_results = 3; + * @return \Google\Cloud\AIPlatform\V1\RougeResults|null + */ + public function getRougeResults() + { + return $this->readOneof(3); + } + + public function hasRougeResults() + { + return $this->hasOneof(3); + } + + /** + * Results for rouge metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeResults rouge_results = 3; + * @param \Google\Cloud\AIPlatform\V1\RougeResults $var + * @return $this + */ + public function setRougeResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RougeResults::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * LLM-based metric evaluation result. + * General text generation metrics, applicable to other categories. + * Result for fluency metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyResult fluency_result = 4; + * @return \Google\Cloud\AIPlatform\V1\FluencyResult|null + */ + public function getFluencyResult() + { + return $this->readOneof(4); + } + + public function hasFluencyResult() + { + return $this->hasOneof(4); + } + + /** + * LLM-based metric evaluation result. + * General text generation metrics, applicable to other categories. + * Result for fluency metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyResult fluency_result = 4; + * @param \Google\Cloud\AIPlatform\V1\FluencyResult $var + * @return $this + */ + public function setFluencyResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FluencyResult::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Result for coherence metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceResult coherence_result = 5; + * @return \Google\Cloud\AIPlatform\V1\CoherenceResult|null + */ + public function getCoherenceResult() + { + return $this->readOneof(5); + } + + public function hasCoherenceResult() + { + return $this->hasOneof(5); + } + + /** + * Result for coherence metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CoherenceResult coherence_result = 5; + * @param \Google\Cloud\AIPlatform\V1\CoherenceResult $var + * @return $this + */ + public function setCoherenceResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CoherenceResult::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Result for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyResult safety_result = 7; + * @return \Google\Cloud\AIPlatform\V1\SafetyResult|null + */ + public function getSafetyResult() + { + return $this->readOneof(7); + } + + public function hasSafetyResult() + { + return $this->hasOneof(7); + } + + /** + * Result for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyResult safety_result = 7; + * @param \Google\Cloud\AIPlatform\V1\SafetyResult $var + * @return $this + */ + public function setSafetyResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SafetyResult::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Result for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessResult groundedness_result = 8; + * @return \Google\Cloud\AIPlatform\V1\GroundednessResult|null + */ + public function getGroundednessResult() + { + return $this->readOneof(8); + } + + public function hasGroundednessResult() + { + return $this->hasOneof(8); + } + + /** + * Result for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessResult groundedness_result = 8; + * @param \Google\Cloud\AIPlatform\V1\GroundednessResult $var + * @return $this + */ + public function setGroundednessResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GroundednessResult::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Result for fulfillment metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentResult fulfillment_result = 11; + * @return \Google\Cloud\AIPlatform\V1\FulfillmentResult|null + */ + public function getFulfillmentResult() + { + return $this->readOneof(11); + } + + public function hasFulfillmentResult() + { + return $this->hasOneof(11); + } + + /** + * Result for fulfillment metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentResult fulfillment_result = 11; + * @param \Google\Cloud\AIPlatform\V1\FulfillmentResult $var + * @return $this + */ + public function setFulfillmentResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FulfillmentResult::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Summarization only metrics. + * Result for summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityResult summarization_quality_result = 6; + * @return \Google\Cloud\AIPlatform\V1\SummarizationQualityResult|null + */ + public function getSummarizationQualityResult() + { + return $this->readOneof(6); + } + + public function hasSummarizationQualityResult() + { + return $this->hasOneof(6); + } + + /** + * Summarization only metrics. + * Result for summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityResult summarization_quality_result = 6; + * @param \Google\Cloud\AIPlatform\V1\SummarizationQualityResult $var + * @return $this + */ + public function setSummarizationQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationQualityResult::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Result for pairwise summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityResult pairwise_summarization_quality_result = 22; + * @return \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityResult|null + */ + public function getPairwiseSummarizationQualityResult() + { + return $this->readOneof(22); + } + + public function hasPairwiseSummarizationQualityResult() + { + return $this->hasOneof(22); + } + + /** + * Result for pairwise summarization quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityResult pairwise_summarization_quality_result = 22; + * @param \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityResult $var + * @return $this + */ + public function setPairwiseSummarizationQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityResult::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Result for summarization helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessResult summarization_helpfulness_result = 13; + * @return \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessResult|null + */ + public function getSummarizationHelpfulnessResult() + { + return $this->readOneof(13); + } + + public function hasSummarizationHelpfulnessResult() + { + return $this->hasOneof(13); + } + + /** + * Result for summarization helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessResult summarization_helpfulness_result = 13; + * @param \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessResult $var + * @return $this + */ + public function setSummarizationHelpfulnessResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessResult::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Result for summarization verbosity metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityResult summarization_verbosity_result = 14; + * @return \Google\Cloud\AIPlatform\V1\SummarizationVerbosityResult|null + */ + public function getSummarizationVerbosityResult() + { + return $this->readOneof(14); + } + + public function hasSummarizationVerbosityResult() + { + return $this->hasOneof(14); + } + + /** + * Result for summarization verbosity metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityResult summarization_verbosity_result = 14; + * @param \Google\Cloud\AIPlatform\V1\SummarizationVerbosityResult $var + * @return $this + */ + public function setSummarizationVerbosityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationVerbosityResult::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Question answering only metrics. + * Result for question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityResult question_answering_quality_result = 9; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityResult|null + */ + public function getQuestionAnsweringQualityResult() + { + return $this->readOneof(9); + } + + public function hasQuestionAnsweringQualityResult() + { + return $this->hasOneof(9); + } + + /** + * Question answering only metrics. + * Result for question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityResult question_answering_quality_result = 9; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityResult $var + * @return $this + */ + public function setQuestionAnsweringQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityResult::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Result for pairwise question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResult pairwise_question_answering_quality_result = 23; + * @return \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityResult|null + */ + public function getPairwiseQuestionAnsweringQualityResult() + { + return $this->readOneof(23); + } + + public function hasPairwiseQuestionAnsweringQualityResult() + { + return $this->hasOneof(23); + } + + /** + * Result for pairwise question answering quality metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResult pairwise_question_answering_quality_result = 23; + * @param \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityResult $var + * @return $this + */ + public function setPairwiseQuestionAnsweringQualityResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityResult::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Result for question answering relevance metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceResult question_answering_relevance_result = 15; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceResult|null + */ + public function getQuestionAnsweringRelevanceResult() + { + return $this->readOneof(15); + } + + public function hasQuestionAnsweringRelevanceResult() + { + return $this->hasOneof(15); + } + + /** + * Result for question answering relevance metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceResult question_answering_relevance_result = 15; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceResult $var + * @return $this + */ + public function setQuestionAnsweringRelevanceResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceResult::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Result for question answering helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessResult question_answering_helpfulness_result = 16; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessResult|null + */ + public function getQuestionAnsweringHelpfulnessResult() + { + return $this->readOneof(16); + } + + public function hasQuestionAnsweringHelpfulnessResult() + { + return $this->hasOneof(16); + } + + /** + * Result for question answering helpfulness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessResult question_answering_helpfulness_result = 16; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessResult $var + * @return $this + */ + public function setQuestionAnsweringHelpfulnessResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessResult::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Result for question answering correctness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessResult question_answering_correctness_result = 17; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessResult|null + */ + public function getQuestionAnsweringCorrectnessResult() + { + return $this->readOneof(17); + } + + public function hasQuestionAnsweringCorrectnessResult() + { + return $this->hasOneof(17); + } + + /** + * Result for question answering correctness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessResult question_answering_correctness_result = 17; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessResult $var + * @return $this + */ + public function setQuestionAnsweringCorrectnessResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessResult::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Generic metrics. + * Result for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 27; + * @return \Google\Cloud\AIPlatform\V1\PointwiseMetricResult|null + */ + public function getPointwiseMetricResult() + { + return $this->readOneof(27); + } + + public function hasPointwiseMetricResult() + { + return $this->hasOneof(27); + } + + /** + * Generic metrics. + * Result for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricResult pointwise_metric_result = 27; + * @param \Google\Cloud\AIPlatform\V1\PointwiseMetricResult $var + * @return $this + */ + public function setPointwiseMetricResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PointwiseMetricResult::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Result for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 28; + * @return \Google\Cloud\AIPlatform\V1\PairwiseMetricResult|null + */ + public function getPairwiseMetricResult() + { + return $this->readOneof(28); + } + + public function hasPairwiseMetricResult() + { + return $this->hasOneof(28); + } + + /** + * Result for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricResult pairwise_metric_result = 28; + * @param \Google\Cloud\AIPlatform\V1\PairwiseMetricResult $var + * @return $this + */ + public function setPairwiseMetricResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseMetricResult::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Tool call metrics. + * Results for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidResults tool_call_valid_results = 18; + * @return \Google\Cloud\AIPlatform\V1\ToolCallValidResults|null + */ + public function getToolCallValidResults() + { + return $this->readOneof(18); + } + + public function hasToolCallValidResults() + { + return $this->hasOneof(18); + } + + /** + * Tool call metrics. + * Results for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidResults tool_call_valid_results = 18; + * @param \Google\Cloud\AIPlatform\V1\ToolCallValidResults $var + * @return $this + */ + public function setToolCallValidResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolCallValidResults::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Results for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchResults tool_name_match_results = 19; + * @return \Google\Cloud\AIPlatform\V1\ToolNameMatchResults|null + */ + public function getToolNameMatchResults() + { + return $this->readOneof(19); + } + + public function hasToolNameMatchResults() + { + return $this->hasOneof(19); + } + + /** + * Results for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchResults tool_name_match_results = 19; + * @param \Google\Cloud\AIPlatform\V1\ToolNameMatchResults $var + * @return $this + */ + public function setToolNameMatchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolNameMatchResults::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Results for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchResults tool_parameter_key_match_results = 20; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchResults|null + */ + public function getToolParameterKeyMatchResults() + { + return $this->readOneof(20); + } + + public function hasToolParameterKeyMatchResults() + { + return $this->hasOneof(20); + } + + /** + * Results for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchResults tool_parameter_key_match_results = 20; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchResults $var + * @return $this + */ + public function setToolParameterKeyMatchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchResults::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Results for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchResults tool_parameter_kv_match_results = 21; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchResults|null + */ + public function getToolParameterKvMatchResults() + { + return $this->readOneof(21); + } + + public function hasToolParameterKvMatchResults() + { + return $this->hasOneof(21); + } + + /** + * Results for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchResults tool_parameter_kv_match_results = 21; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchResults $var + * @return $this + */ + public function setToolParameterKvMatchResults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchResults::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * @return string + */ + public function getEvaluationResults() + { + return $this->whichOneof("evaluation_results"); + } + +} + diff --git a/AiPlatform/src/V1/ExactMatchInput.php b/AiPlatform/src/V1/ExactMatchInput.php new file mode 100644 index 000000000000..ab4bd7148700 --- /dev/null +++ b/AiPlatform/src/V1/ExactMatchInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.ExactMatchInput + */ +class ExactMatchInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated exact match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ExactMatchSpec $metric_spec + * Required. Spec for exact match metric. + * @type array<\Google\Cloud\AIPlatform\V1\ExactMatchInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated exact match instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ExactMatchSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for exact match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ExactMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ExactMatchSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ExactMatchSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated exact match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated exact match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ExactMatchInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ExactMatchInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ExactMatchInstance.php b/AiPlatform/src/V1/ExactMatchInstance.php new file mode 100644 index 000000000000..fa35f0d23e68 --- /dev/null +++ b/AiPlatform/src/V1/ExactMatchInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.ExactMatchInstance + */ +class ExactMatchInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ExactMatchMetricValue.php b/AiPlatform/src/V1/ExactMatchMetricValue.php new file mode 100644 index 000000000000..11592ba31803 --- /dev/null +++ b/AiPlatform/src/V1/ExactMatchMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ExactMatchMetricValue + */ +class ExactMatchMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Exact match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Exact match score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Exact match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Exact match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ExactMatchResults.php b/AiPlatform/src/V1/ExactMatchResults.php new file mode 100644 index 000000000000..a033f4b0dd8f --- /dev/null +++ b/AiPlatform/src/V1/ExactMatchResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ExactMatchResults + */ +class ExactMatchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Exact match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $exact_match_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ExactMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $exact_match_metric_values + * Output only. Exact match metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Exact match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExactMatchMetricValues() + { + return $this->exact_match_metric_values; + } + + /** + * Output only. Exact match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ExactMatchMetricValue exact_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\ExactMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExactMatchMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ExactMatchMetricValue::class); + $this->exact_match_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ExactMatchSpec.php b/AiPlatform/src/V1/ExactMatchSpec.php new file mode 100644 index 000000000000..1b6cf679d5ba --- /dev/null +++ b/AiPlatform/src/V1/ExactMatchSpec.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.ExactMatchSpec + */ +class ExactMatchSpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/FluencyInput.php b/AiPlatform/src/V1/FluencyInput.php new file mode 100644 index 000000000000..faae936a4249 --- /dev/null +++ b/AiPlatform/src/V1/FluencyInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.FluencyInput + */ +class FluencyInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for fluency score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Fluency instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\FluencySpec $metric_spec + * Required. Spec for fluency score metric. + * @type \Google\Cloud\AIPlatform\V1\FluencyInstance $instance + * Required. Fluency instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for fluency score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\FluencySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for fluency score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\FluencySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FluencySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Fluency instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\FluencyInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Fluency instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FluencyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\FluencyInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FluencyInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FluencyInstance.php b/AiPlatform/src/V1/FluencyInstance.php new file mode 100644 index 000000000000..7189886474b3 --- /dev/null +++ b/AiPlatform/src/V1/FluencyInstance.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.FluencyInstance + */ +class FluencyInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FluencyResult.php b/AiPlatform/src/V1/FluencyResult.php new file mode 100644 index 000000000000..aeda2ddb0b81 --- /dev/null +++ b/AiPlatform/src/V1/FluencyResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.FluencyResult + */ +class FluencyResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Fluency score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for fluency score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for fluency score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Fluency score. + * @type string $explanation + * Output only. Explanation for fluency score. + * @type float $confidence + * Output only. Confidence for fluency score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Fluency score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Fluency score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for fluency score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for fluency score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for fluency score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for fluency score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FluencySpec.php b/AiPlatform/src/V1/FluencySpec.php new file mode 100644 index 000000000000..93bf3556320f --- /dev/null +++ b/AiPlatform/src/V1/FluencySpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.FluencySpec + */ +class FluencySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FulfillmentInput.php b/AiPlatform/src/V1/FulfillmentInput.php new file mode 100644 index 000000000000..6804af1f7c3d --- /dev/null +++ b/AiPlatform/src/V1/FulfillmentInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.FulfillmentInput + */ +class FulfillmentInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for fulfillment score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Fulfillment instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\FulfillmentSpec $metric_spec + * Required. Spec for fulfillment score metric. + * @type \Google\Cloud\AIPlatform\V1\FulfillmentInstance $instance + * Required. Fulfillment instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for fulfillment score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\FulfillmentSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for fulfillment score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\FulfillmentSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FulfillmentSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Fulfillment instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\FulfillmentInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Fulfillment instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FulfillmentInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\FulfillmentInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FulfillmentInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FulfillmentInstance.php b/AiPlatform/src/V1/FulfillmentInstance.php new file mode 100644 index 000000000000..8db8293b42f2 --- /dev/null +++ b/AiPlatform/src/V1/FulfillmentInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.FulfillmentInstance + */ +class FulfillmentInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Inference instruction prompt to compare prediction with. + * + * Generated from protobuf field optional string instruction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $instruction + * Required. Inference instruction prompt to compare prediction with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Inference instruction prompt to compare prediction with. + * + * Generated from protobuf field optional string instruction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. Inference instruction prompt to compare prediction with. + * + * Generated from protobuf field optional string instruction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FulfillmentResult.php b/AiPlatform/src/V1/FulfillmentResult.php new file mode 100644 index 000000000000..45961e5dbc09 --- /dev/null +++ b/AiPlatform/src/V1/FulfillmentResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.FulfillmentResult + */ +class FulfillmentResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Fulfillment score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for fulfillment score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for fulfillment score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Fulfillment score. + * @type string $explanation + * Output only. Explanation for fulfillment score. + * @type float $confidence + * Output only. Confidence for fulfillment score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Fulfillment score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Fulfillment score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for fulfillment score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for fulfillment score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for fulfillment score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for fulfillment score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FulfillmentSpec.php b/AiPlatform/src/V1/FulfillmentSpec.php new file mode 100644 index 000000000000..30f2a6dbd1bc --- /dev/null +++ b/AiPlatform/src/V1/FulfillmentSpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.FulfillmentSpec + */ +class FulfillmentSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GenerateContentResponse/UsageMetadata.php b/AiPlatform/src/V1/GenerateContentResponse/UsageMetadata.php index e7029f72cd4e..2fe733e6891c 100644 --- a/AiPlatform/src/V1/GenerateContentResponse/UsageMetadata.php +++ b/AiPlatform/src/V1/GenerateContentResponse/UsageMetadata.php @@ -16,7 +16,9 @@ class UsageMetadata extends \Google\Protobuf\Internal\Message { /** - * Number of tokens in the request. + * Number of tokens in the request. When `cached_content` is set, this is + * still the total effective prompt size meaning this includes the number of + * tokens in the cached content. * * Generated from protobuf field int32 prompt_token_count = 1; */ @@ -39,7 +41,9 @@ class UsageMetadata extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $prompt_token_count - * Number of tokens in the request. + * Number of tokens in the request. When `cached_content` is set, this is + * still the total effective prompt size meaning this includes the number of + * tokens in the cached content. * @type int $candidates_token_count * Number of tokens in the response(s). * @type int $total_token_count @@ -51,7 +55,9 @@ public function __construct($data = NULL) { } /** - * Number of tokens in the request. + * Number of tokens in the request. When `cached_content` is set, this is + * still the total effective prompt size meaning this includes the number of + * tokens in the cached content. * * Generated from protobuf field int32 prompt_token_count = 1; * @return int @@ -62,7 +68,9 @@ public function getPromptTokenCount() } /** - * Number of tokens in the request. + * Number of tokens in the request. When `cached_content` is set, this is + * still the total effective prompt size meaning this includes the number of + * tokens in the cached content. * * Generated from protobuf field int32 prompt_token_count = 1; * @param int $var diff --git a/AiPlatform/src/V1/GroundednessInput.php b/AiPlatform/src/V1/GroundednessInput.php new file mode 100644 index 000000000000..adeeb3891551 --- /dev/null +++ b/AiPlatform/src/V1/GroundednessInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.GroundednessInput + */ +class GroundednessInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Groundedness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GroundednessSpec $metric_spec + * Required. Spec for groundedness metric. + * @type \Google\Cloud\AIPlatform\V1\GroundednessInstance $instance + * Required. Groundedness instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\GroundednessSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for groundedness metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\GroundednessSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GroundednessSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Groundedness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\GroundednessInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Groundedness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GroundednessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\GroundednessInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GroundednessInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GroundednessInstance.php b/AiPlatform/src/V1/GroundednessInstance.php new file mode 100644 index 000000000000..4fb74ef3fb24 --- /dev/null +++ b/AiPlatform/src/V1/GroundednessInstance.php @@ -0,0 +1,125 @@ +google.cloud.aiplatform.v1.GroundednessInstance + */ +class GroundednessInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Background information provided in context used to compare + * against the prediction. + * + * Generated from protobuf field optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $context + * Required. Background information provided in context used to compare + * against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Background information provided in context used to compare + * against the prediction. + * + * Generated from protobuf field optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Background information provided in context used to compare + * against the prediction. + * + * Generated from protobuf field optional string context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GroundednessResult.php b/AiPlatform/src/V1/GroundednessResult.php new file mode 100644 index 000000000000..6d486cf335a9 --- /dev/null +++ b/AiPlatform/src/V1/GroundednessResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.GroundednessResult + */ +class GroundednessResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Groundedness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for groundedness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for groundedness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Groundedness score. + * @type string $explanation + * Output only. Explanation for groundedness score. + * @type float $confidence + * Output only. Confidence for groundedness score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Groundedness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Groundedness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for groundedness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for groundedness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for groundedness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for groundedness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GroundednessSpec.php b/AiPlatform/src/V1/GroundednessSpec.php new file mode 100644 index 000000000000..3460d420a1cd --- /dev/null +++ b/AiPlatform/src/V1/GroundednessSpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.GroundednessSpec + */ +class GroundednessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/MachineSpec.php b/AiPlatform/src/V1/MachineSpec.php index f6b9d1df94ae..d44d4189cfa5 100644 --- a/AiPlatform/src/V1/MachineSpec.php +++ b/AiPlatform/src/V1/MachineSpec.php @@ -51,6 +51,13 @@ class MachineSpec extends \Google\Protobuf\Internal\Message * Generated from protobuf field string tpu_topology = 4 [(.google.api.field_behavior) = IMMUTABLE]; */ protected $tpu_topology = ''; + /** + * Optional. Immutable. Configuration controlling how this resource pool + * consumes reservation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $reservation_affinity = null; /** * Constructor. @@ -78,6 +85,9 @@ class MachineSpec extends \Google\Protobuf\Internal\Message * @type string $tpu_topology * Immutable. The topology of the TPUs. Corresponds to the TPU topologies * available from GKE. (Example: tpu_topology: "2x2x1"). + * @type \Google\Cloud\AIPlatform\V1\ReservationAffinity $reservation_affinity + * Optional. Immutable. Configuration controlling how this resource pool + * consumes reservation. * } */ public function __construct($data = NULL) { @@ -213,5 +223,43 @@ public function setTpuTopology($var) return $this; } + /** + * Optional. Immutable. Configuration controlling how this resource pool + * consumes reservation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\ReservationAffinity|null + */ + public function getReservationAffinity() + { + return $this->reservation_affinity; + } + + public function hasReservationAffinity() + { + return isset($this->reservation_affinity); + } + + public function clearReservationAffinity() + { + unset($this->reservation_affinity); + } + + /** + * Optional. Immutable. Configuration controlling how this resource pool + * consumes reservation. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity reservation_affinity = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\ReservationAffinity $var + * @return $this + */ + public function setReservationAffinity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ReservationAffinity::class); + $this->reservation_affinity = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/PairwiseChoice.php b/AiPlatform/src/V1/PairwiseChoice.php new file mode 100644 index 000000000000..97f458e91c0b --- /dev/null +++ b/AiPlatform/src/V1/PairwiseChoice.php @@ -0,0 +1,68 @@ +google.cloud.aiplatform.v1.PairwiseChoice + */ +class PairwiseChoice +{ + /** + * Unspecified prediction choice. + * + * Generated from protobuf enum PAIRWISE_CHOICE_UNSPECIFIED = 0; + */ + const PAIRWISE_CHOICE_UNSPECIFIED = 0; + /** + * Baseline prediction wins + * + * Generated from protobuf enum BASELINE = 1; + */ + const BASELINE = 1; + /** + * Candidate prediction wins + * + * Generated from protobuf enum CANDIDATE = 2; + */ + const CANDIDATE = 2; + /** + * Winner cannot be determined + * + * Generated from protobuf enum TIE = 3; + */ + const TIE = 3; + + private static $valueToName = [ + self::PAIRWISE_CHOICE_UNSPECIFIED => 'PAIRWISE_CHOICE_UNSPECIFIED', + self::BASELINE => 'BASELINE', + self::CANDIDATE => 'CANDIDATE', + self::TIE => 'TIE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/AiPlatform/src/V1/PairwiseMetricInput.php b/AiPlatform/src/V1/PairwiseMetricInput.php new file mode 100644 index 000000000000..adcedd42bf4e --- /dev/null +++ b/AiPlatform/src/V1/PairwiseMetricInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.PairwiseMetricInput + */ +class PairwiseMetricInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Pairwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\PairwiseMetricSpec $metric_spec + * Required. Spec for pairwise metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseMetricInstance $instance + * Required. Pairwise metric instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseMetricSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for pairwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseMetricSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseMetricSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Pairwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseMetricInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Pairwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseMetricInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseMetricInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseMetricInstance.php b/AiPlatform/src/V1/PairwiseMetricInstance.php new file mode 100644 index 000000000000..075739b4e095 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseMetricInstance.php @@ -0,0 +1,82 @@ +google.cloud.aiplatform.v1.PairwiseMetricInstance + */ +class PairwiseMetricInstance extends \Google\Protobuf\Internal\Message +{ + protected $instance; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $json_instance + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PairwiseMetricSpec.instance_prompt_template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PairwiseMetricSpec.instance_prompt_template. + * + * Generated from protobuf field string json_instance = 1; + * @return string + */ + public function getJsonInstance() + { + return $this->readOneof(1); + } + + public function hasJsonInstance() + { + return $this->hasOneof(1); + } + + /** + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PairwiseMetricSpec.instance_prompt_template. + * + * Generated from protobuf field string json_instance = 1; + * @param string $var + * @return $this + */ + public function setJsonInstance($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInstance() + { + return $this->whichOneof("instance"); + } + +} + diff --git a/AiPlatform/src/V1/PairwiseMetricResult.php b/AiPlatform/src/V1/PairwiseMetricResult.php new file mode 100644 index 000000000000..3c978bad7c8b --- /dev/null +++ b/AiPlatform/src/V1/PairwiseMetricResult.php @@ -0,0 +1,101 @@ +google.cloud.aiplatform.v1.PairwiseMetricResult + */ +class PairwiseMetricResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Pairwise metric choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pairwise_choice = 0; + /** + * Output only. Explanation for pairwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $pairwise_choice + * Output only. Pairwise metric choice. + * @type string $explanation + * Output only. Explanation for pairwise metric score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Pairwise metric choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPairwiseChoice() + { + return $this->pairwise_choice; + } + + /** + * Output only. Pairwise metric choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPairwiseChoice($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\PairwiseChoice::class); + $this->pairwise_choice = $var; + + return $this; + } + + /** + * Output only. Explanation for pairwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for pairwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseMetricSpec.php b/AiPlatform/src/V1/PairwiseMetricSpec.php new file mode 100644 index 000000000000..56af352345c4 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseMetricSpec.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.PairwiseMetricSpec + */ +class PairwiseMetricSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Metric prompt template for pairwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_prompt_template = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_prompt_template + * Required. Metric prompt template for pairwise metric. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Metric prompt template for pairwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMetricPromptTemplate() + { + return isset($this->metric_prompt_template) ? $this->metric_prompt_template : ''; + } + + public function hasMetricPromptTemplate() + { + return isset($this->metric_prompt_template); + } + + public function clearMetricPromptTemplate() + { + unset($this->metric_prompt_template); + } + + /** + * Required. Metric prompt template for pairwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMetricPromptTemplate($var) + { + GPBUtil::checkString($var, True); + $this->metric_prompt_template = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInput.php b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInput.php new file mode 100644 index 000000000000..b143cafecba6 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInput + */ +class PairwiseQuestionAnsweringQualityInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for pairwise question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Pairwise question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualitySpec $metric_spec + * Required. Spec for pairwise question answering quality score metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInstance $instance + * Required. Pairwise question answering quality instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for pairwise question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualitySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for pairwise question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualitySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualitySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Pairwise question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Pairwise question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseQuestionAnsweringQualityInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInstance.php b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInstance.php new file mode 100644 index 000000000000..055090ec445a --- /dev/null +++ b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityInstance.php @@ -0,0 +1,253 @@ +google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityInstance + */ +class PairwiseQuestionAnsweringQualityInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $baseline_prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the candidate model. + * @type string $baseline_prediction + * Required. Output of the baseline model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to answer the question. + * @type string $instruction + * Required. Question Answering prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBaselinePrediction() + { + return isset($this->baseline_prediction) ? $this->baseline_prediction : ''; + } + + public function hasBaselinePrediction() + { + return isset($this->baseline_prediction); + } + + public function clearBaselinePrediction() + { + unset($this->baseline_prediction); + } + + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBaselinePrediction($var) + { + GPBUtil::checkString($var, True); + $this->baseline_prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityResult.php b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityResult.php new file mode 100644 index 000000000000..3742232c1dab --- /dev/null +++ b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualityResult.php @@ -0,0 +1,145 @@ +google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualityResult + */ +class PairwiseQuestionAnsweringQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Pairwise question answering prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pairwise_choice = 0; + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $pairwise_choice + * Output only. Pairwise question answering prediction choice. + * @type string $explanation + * Output only. Explanation for question answering quality score. + * @type float $confidence + * Output only. Confidence for question answering quality score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Pairwise question answering prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPairwiseChoice() + { + return $this->pairwise_choice; + } + + /** + * Output only. Pairwise question answering prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPairwiseChoice($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\PairwiseChoice::class); + $this->pairwise_choice = $var; + + return $this; + } + + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseQuestionAnsweringQualitySpec.php b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualitySpec.php new file mode 100644 index 000000000000..87136217f63f --- /dev/null +++ b/AiPlatform/src/V1/PairwiseQuestionAnsweringQualitySpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.PairwiseQuestionAnsweringQualitySpec + */ +class PairwiseQuestionAnsweringQualitySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute question answering + * quality. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseSummarizationQualityInput.php b/AiPlatform/src/V1/PairwiseSummarizationQualityInput.php new file mode 100644 index 000000000000..908d2e2c7766 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseSummarizationQualityInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.PairwiseSummarizationQualityInput + */ +class PairwiseSummarizationQualityInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for pairwise summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Pairwise summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualitySpec $metric_spec + * Required. Spec for pairwise summarization quality score metric. + * @type \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInstance $instance + * Required. Pairwise summarization quality instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for pairwise summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualitySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for pairwise summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualitySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualitySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Pairwise summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Pairwise summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PairwiseSummarizationQualityInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseSummarizationQualityInstance.php b/AiPlatform/src/V1/PairwiseSummarizationQualityInstance.php new file mode 100644 index 000000000000..7ded359c4025 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseSummarizationQualityInstance.php @@ -0,0 +1,253 @@ +google.cloud.aiplatform.v1.PairwiseSummarizationQualityInstance + */ +class PairwiseSummarizationQualityInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $baseline_prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the candidate model. + * @type string $baseline_prediction + * Required. Output of the baseline model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to be summarized. + * @type string $instruction + * Required. Summarization prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the candidate model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBaselinePrediction() + { + return isset($this->baseline_prediction) ? $this->baseline_prediction : ''; + } + + public function hasBaselinePrediction() + { + return isset($this->baseline_prediction); + } + + public function clearBaselinePrediction() + { + unset($this->baseline_prediction); + } + + /** + * Required. Output of the baseline model. + * + * Generated from protobuf field optional string baseline_prediction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBaselinePrediction($var) + { + GPBUtil::checkString($var, True); + $this->baseline_prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseSummarizationQualityResult.php b/AiPlatform/src/V1/PairwiseSummarizationQualityResult.php new file mode 100644 index 000000000000..d6481d838e45 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseSummarizationQualityResult.php @@ -0,0 +1,145 @@ +google.cloud.aiplatform.v1.PairwiseSummarizationQualityResult + */ +class PairwiseSummarizationQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Pairwise summarization prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pairwise_choice = 0; + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $pairwise_choice + * Output only. Pairwise summarization prediction choice. + * @type string $explanation + * Output only. Explanation for summarization quality score. + * @type float $confidence + * Output only. Confidence for summarization quality score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Pairwise summarization prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPairwiseChoice() + { + return $this->pairwise_choice; + } + + /** + * Output only. Pairwise summarization prediction choice. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PairwiseChoice pairwise_choice = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPairwiseChoice($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\PairwiseChoice::class); + $this->pairwise_choice = $var; + + return $this; + } + + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PairwiseSummarizationQualitySpec.php b/AiPlatform/src/V1/PairwiseSummarizationQualitySpec.php new file mode 100644 index 000000000000..c8c5b77703e8 --- /dev/null +++ b/AiPlatform/src/V1/PairwiseSummarizationQualitySpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.PairwiseSummarizationQualitySpec + */ +class PairwiseSummarizationQualitySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute pairwise + * summarization quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute pairwise + * summarization quality. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute pairwise + * summarization quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute pairwise + * summarization quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PointwiseMetricInput.php b/AiPlatform/src/V1/PointwiseMetricInput.php new file mode 100644 index 000000000000..c13448e27933 --- /dev/null +++ b/AiPlatform/src/V1/PointwiseMetricInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.PointwiseMetricInput + */ +class PointwiseMetricInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Pointwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\PointwiseMetricSpec $metric_spec + * Required. Spec for pointwise metric. + * @type \Google\Cloud\AIPlatform\V1\PointwiseMetricInstance $instance + * Required. Pointwise metric instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PointwiseMetricSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for pointwise metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PointwiseMetricSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PointwiseMetricSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Pointwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PointwiseMetricInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Pointwise metric instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PointwiseMetricInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PointwiseMetricInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PointwiseMetricInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PointwiseMetricInstance.php b/AiPlatform/src/V1/PointwiseMetricInstance.php new file mode 100644 index 000000000000..324af9ab274c --- /dev/null +++ b/AiPlatform/src/V1/PointwiseMetricInstance.php @@ -0,0 +1,82 @@ +google.cloud.aiplatform.v1.PointwiseMetricInstance + */ +class PointwiseMetricInstance extends \Google\Protobuf\Internal\Message +{ + protected $instance; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $json_instance + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PointwiseMetricSpec.instance_prompt_template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PointwiseMetricSpec.instance_prompt_template. + * + * Generated from protobuf field string json_instance = 1; + * @return string + */ + public function getJsonInstance() + { + return $this->readOneof(1); + } + + public function hasJsonInstance() + { + return $this->hasOneof(1); + } + + /** + * Instance specified as a json string. String key-value pairs are expected + * in the json_instance to render + * PointwiseMetricSpec.instance_prompt_template. + * + * Generated from protobuf field string json_instance = 1; + * @param string $var + * @return $this + */ + public function setJsonInstance($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInstance() + { + return $this->whichOneof("instance"); + } + +} + diff --git a/AiPlatform/src/V1/PointwiseMetricResult.php b/AiPlatform/src/V1/PointwiseMetricResult.php new file mode 100644 index 000000000000..84e8b73623e2 --- /dev/null +++ b/AiPlatform/src/V1/PointwiseMetricResult.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.PointwiseMetricResult + */ +class PointwiseMetricResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Pointwise metric score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for pointwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Pointwise metric score. + * @type string $explanation + * Output only. Explanation for pointwise metric score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Pointwise metric score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Pointwise metric score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for pointwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for pointwise metric score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PointwiseMetricSpec.php b/AiPlatform/src/V1/PointwiseMetricSpec.php new file mode 100644 index 000000000000..e014c5d5d2b7 --- /dev/null +++ b/AiPlatform/src/V1/PointwiseMetricSpec.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.PointwiseMetricSpec + */ +class PointwiseMetricSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Metric prompt template for pointwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_prompt_template = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_prompt_template + * Required. Metric prompt template for pointwise metric. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Metric prompt template for pointwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMetricPromptTemplate() + { + return isset($this->metric_prompt_template) ? $this->metric_prompt_template : ''; + } + + public function hasMetricPromptTemplate() + { + return isset($this->metric_prompt_template); + } + + public function clearMetricPromptTemplate() + { + unset($this->metric_prompt_template); + } + + /** + * Required. Metric prompt template for pointwise metric. + * + * Generated from protobuf field optional string metric_prompt_template = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMetricPromptTemplate($var) + { + GPBUtil::checkString($var, True); + $this->metric_prompt_template = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringCorrectnessInput.php b/AiPlatform/src/V1/QuestionAnsweringCorrectnessInput.php new file mode 100644 index 000000000000..a949530eff8a --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringCorrectnessInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInput + */ +class QuestionAnsweringCorrectnessInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for question answering correctness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Question answering correctness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessSpec $metric_spec + * Required. Spec for question answering correctness score metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInstance $instance + * Required. Question answering correctness instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for question answering correctness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for question answering correctness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Question answering correctness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Question answering correctness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringCorrectnessInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringCorrectnessInstance.php b/AiPlatform/src/V1/QuestionAnsweringCorrectnessInstance.php new file mode 100644 index 000000000000..4f51c238adca --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringCorrectnessInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessInstance + */ +class QuestionAnsweringCorrectnessInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Optional. Text provided as context to answer the question. + * @type string $instruction + * Required. The question asked and other instruction in the inference prompt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringCorrectnessResult.php b/AiPlatform/src/V1/QuestionAnsweringCorrectnessResult.php new file mode 100644 index 000000000000..6b2d898e729d --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringCorrectnessResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessResult + */ +class QuestionAnsweringCorrectnessResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Question Answering Correctness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for question answering correctness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for question answering correctness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Question Answering Correctness score. + * @type string $explanation + * Output only. Explanation for question answering correctness score. + * @type float $confidence + * Output only. Confidence for question answering correctness score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Question Answering Correctness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Question Answering Correctness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for question answering correctness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for question answering correctness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for question answering correctness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for question answering correctness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringCorrectnessSpec.php b/AiPlatform/src/V1/QuestionAnsweringCorrectnessSpec.php new file mode 100644 index 000000000000..97cc332cea45 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringCorrectnessSpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.QuestionAnsweringCorrectnessSpec + */ +class QuestionAnsweringCorrectnessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute question answering + * correctness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute question answering + * correctness. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * correctness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * correctness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInput.php b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInput.php new file mode 100644 index 000000000000..e4961b3e0d38 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInput + */ +class QuestionAnsweringHelpfulnessInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for question answering helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Question answering helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessSpec $metric_spec + * Required. Spec for question answering helpfulness score metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInstance $instance + * Required. Question answering helpfulness instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for question answering helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for question answering helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Question answering helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Question answering helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringHelpfulnessInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInstance.php b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInstance.php new file mode 100644 index 000000000000..3162337ddf0d --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessInstance + */ +class QuestionAnsweringHelpfulnessInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Optional. Text provided as context to answer the question. + * @type string $instruction + * Required. The question asked and other instruction in the inference prompt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringHelpfulnessResult.php b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessResult.php new file mode 100644 index 000000000000..38cc28b655b7 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessResult + */ +class QuestionAnsweringHelpfulnessResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Question Answering Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for question answering helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for question answering helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Question Answering Helpfulness score. + * @type string $explanation + * Output only. Explanation for question answering helpfulness score. + * @type float $confidence + * Output only. Confidence for question answering helpfulness score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Question Answering Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Question Answering Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for question answering helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for question answering helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for question answering helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for question answering helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringHelpfulnessSpec.php b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessSpec.php new file mode 100644 index 000000000000..d22134d633b4 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringHelpfulnessSpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.QuestionAnsweringHelpfulnessSpec + */ +class QuestionAnsweringHelpfulnessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute question answering + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute question answering + * helpfulness. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringQualityInput.php b/AiPlatform/src/V1/QuestionAnsweringQualityInput.php new file mode 100644 index 000000000000..632ba22c0434 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringQualityInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.QuestionAnsweringQualityInput + */ +class QuestionAnsweringQualityInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualitySpec $metric_spec + * Required. Spec for question answering quality score metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInstance $instance + * Required. Question answering quality instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualitySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for question answering quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualitySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualitySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Question answering quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringQualityInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringQualityInstance.php b/AiPlatform/src/V1/QuestionAnsweringQualityInstance.php new file mode 100644 index 000000000000..eb9af7ba0d9b --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringQualityInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.QuestionAnsweringQualityInstance + */ +class QuestionAnsweringQualityInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to answer the question. + * @type string $instruction + * Required. Question Answering prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. Question Answering prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringQualityResult.php b/AiPlatform/src/V1/QuestionAnsweringQualityResult.php new file mode 100644 index 000000000000..0394b26c5af4 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringQualityResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.QuestionAnsweringQualityResult + */ +class QuestionAnsweringQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Question Answering Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Question Answering Quality score. + * @type string $explanation + * Output only. Explanation for question answering quality score. + * @type float $confidence + * Output only. Confidence for question answering quality score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Question Answering Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Question Answering Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for question answering quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for question answering quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringQualitySpec.php b/AiPlatform/src/V1/QuestionAnsweringQualitySpec.php new file mode 100644 index 000000000000..843394092a44 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringQualitySpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.QuestionAnsweringQualitySpec + */ +class QuestionAnsweringQualitySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute question answering + * quality. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringRelevanceInput.php b/AiPlatform/src/V1/QuestionAnsweringRelevanceInput.php new file mode 100644 index 000000000000..11d58333ea8b --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringRelevanceInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInput + */ +class QuestionAnsweringRelevanceInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for question answering relevance score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Question answering relevance instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceSpec $metric_spec + * Required. Spec for question answering relevance score metric. + * @type \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInstance $instance + * Required. Question answering relevance instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for question answering relevance score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for question answering relevance score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Question answering relevance instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Question answering relevance instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\QuestionAnsweringRelevanceInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringRelevanceInstance.php b/AiPlatform/src/V1/QuestionAnsweringRelevanceInstance.php new file mode 100644 index 000000000000..bfc85e0393db --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringRelevanceInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.QuestionAnsweringRelevanceInstance + */ +class QuestionAnsweringRelevanceInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Optional. Text provided as context to answer the question. + * @type string $instruction + * Required. The question asked and other instruction in the inference prompt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. Text provided as context to answer the question. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. The question asked and other instruction in the inference prompt. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringRelevanceResult.php b/AiPlatform/src/V1/QuestionAnsweringRelevanceResult.php new file mode 100644 index 000000000000..9c2d78843689 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringRelevanceResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.QuestionAnsweringRelevanceResult + */ +class QuestionAnsweringRelevanceResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Question Answering Relevance score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for question answering relevance score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for question answering relevance score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Question Answering Relevance score. + * @type string $explanation + * Output only. Explanation for question answering relevance score. + * @type float $confidence + * Output only. Confidence for question answering relevance score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Question Answering Relevance score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Question Answering Relevance score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for question answering relevance score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for question answering relevance score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for question answering relevance score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for question answering relevance score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/QuestionAnsweringRelevanceSpec.php b/AiPlatform/src/V1/QuestionAnsweringRelevanceSpec.php new file mode 100644 index 000000000000..3f5dd12f7f75 --- /dev/null +++ b/AiPlatform/src/V1/QuestionAnsweringRelevanceSpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.QuestionAnsweringRelevanceSpec + */ +class QuestionAnsweringRelevanceSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute question answering + * relevance. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute question answering + * relevance. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * relevance. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute question answering + * relevance. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ReservationAffinity.php b/AiPlatform/src/V1/ReservationAffinity.php new file mode 100644 index 000000000000..8eaf3427e715 --- /dev/null +++ b/AiPlatform/src/V1/ReservationAffinity.php @@ -0,0 +1,153 @@ +google.cloud.aiplatform.v1.ReservationAffinity + */ +class ReservationAffinity extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies the reservation affinity type. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reservation_affinity_type = 0; + /** + * Optional. Corresponds to the label key of a reservation resource. To target + * a SPECIFIC_RESERVATION by name, use + * `compute.googleapis.com/reservation-name` as the key and specify the name + * of your reservation as its value. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key = ''; + /** + * Optional. Corresponds to the label values of a reservation resource. This + * must be the full resource name of the reservation. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reservation_affinity_type + * Required. Specifies the reservation affinity type. + * @type string $key + * Optional. Corresponds to the label key of a reservation resource. To target + * a SPECIFIC_RESERVATION by name, use + * `compute.googleapis.com/reservation-name` as the key and specify the name + * of your reservation as its value. + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Optional. Corresponds to the label values of a reservation resource. This + * must be the full resource name of the reservation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ReservationAffinity::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies the reservation affinity type. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReservationAffinityType() + { + return $this->reservation_affinity_type; + } + + /** + * Required. Specifies the reservation affinity type. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ReservationAffinity.Type reservation_affinity_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReservationAffinityType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\ReservationAffinity\Type::class); + $this->reservation_affinity_type = $var; + + return $this; + } + + /** + * Optional. Corresponds to the label key of a reservation resource. To target + * a SPECIFIC_RESERVATION by name, use + * `compute.googleapis.com/reservation-name` as the key and specify the name + * of your reservation as its value. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Optional. Corresponds to the label key of a reservation resource. To target + * a SPECIFIC_RESERVATION by name, use + * `compute.googleapis.com/reservation-name` as the key and specify the name + * of your reservation as its value. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Optional. Corresponds to the label values of a reservation resource. This + * must be the full resource name of the reservation. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Optional. Corresponds to the label values of a reservation resource. This + * must be the full resource name of the reservation. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ReservationAffinity/Type.php b/AiPlatform/src/V1/ReservationAffinity/Type.php new file mode 100644 index 000000000000..d47597a320f6 --- /dev/null +++ b/AiPlatform/src/V1/ReservationAffinity/Type.php @@ -0,0 +1,70 @@ +google.cloud.aiplatform.v1.ReservationAffinity.Type + */ +class Type +{ + /** + * Default value. This should not be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Do not consume from any reserved capacity, only use on-demand. + * + * Generated from protobuf enum NO_RESERVATION = 1; + */ + const NO_RESERVATION = 1; + /** + * Consume any reservation available, falling back to on-demand. + * + * Generated from protobuf enum ANY_RESERVATION = 2; + */ + const ANY_RESERVATION = 2; + /** + * Consume from a specific reservation. When chosen, the reservation + * must be identified via the `key` and `values` fields. + * + * Generated from protobuf enum SPECIFIC_RESERVATION = 3; + */ + const SPECIFIC_RESERVATION = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NO_RESERVATION => 'NO_RESERVATION', + self::ANY_RESERVATION => 'ANY_RESERVATION', + self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/RougeInput.php b/AiPlatform/src/V1/RougeInput.php new file mode 100644 index 000000000000..6ccfdad893b3 --- /dev/null +++ b/AiPlatform/src/V1/RougeInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.RougeInput + */ +class RougeInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for rouge score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated rouge instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RougeSpec $metric_spec + * Required. Spec for rouge score metric. + * @type array<\Google\Cloud\AIPlatform\V1\RougeInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated rouge instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for rouge score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\RougeSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for rouge score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RougeSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\RougeSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RougeSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated rouge instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated rouge instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\RougeInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RougeInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RougeInstance.php b/AiPlatform/src/V1/RougeInstance.php new file mode 100644 index 000000000000..0d94edf7478c --- /dev/null +++ b/AiPlatform/src/V1/RougeInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.RougeInstance + */ +class RougeInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RougeMetricValue.php b/AiPlatform/src/V1/RougeMetricValue.php new file mode 100644 index 000000000000..73052a1d66dc --- /dev/null +++ b/AiPlatform/src/V1/RougeMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.RougeMetricValue + */ +class RougeMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Rouge score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Rouge score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Rouge score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Rouge score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RougeResults.php b/AiPlatform/src/V1/RougeResults.php new file mode 100644 index 000000000000..c16c21d5210d --- /dev/null +++ b/AiPlatform/src/V1/RougeResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.RougeResults + */ +class RougeResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Rouge metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $rouge_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\RougeMetricValue>|\Google\Protobuf\Internal\RepeatedField $rouge_metric_values + * Output only. Rouge metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Rouge metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRougeMetricValues() + { + return $this->rouge_metric_values; + } + + /** + * Output only. Rouge metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RougeMetricValue rouge_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\RougeMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRougeMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RougeMetricValue::class); + $this->rouge_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RougeSpec.php b/AiPlatform/src/V1/RougeSpec.php new file mode 100644 index 000000000000..1c7573199a25 --- /dev/null +++ b/AiPlatform/src/V1/RougeSpec.php @@ -0,0 +1,136 @@ +google.cloud.aiplatform.v1.RougeSpec + */ +class RougeSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum. + * + * Generated from protobuf field string rouge_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rouge_type = ''; + /** + * Optional. Whether to use stemmer to compute rouge score. + * + * Generated from protobuf field bool use_stemmer = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_stemmer = false; + /** + * Optional. Whether to split summaries while using rougeLsum. + * + * Generated from protobuf field bool split_summaries = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $split_summaries = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rouge_type + * Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum. + * @type bool $use_stemmer + * Optional. Whether to use stemmer to compute rouge score. + * @type bool $split_summaries + * Optional. Whether to split summaries while using rougeLsum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum. + * + * Generated from protobuf field string rouge_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRougeType() + { + return $this->rouge_type; + } + + /** + * Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum. + * + * Generated from protobuf field string rouge_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRougeType($var) + { + GPBUtil::checkString($var, True); + $this->rouge_type = $var; + + return $this; + } + + /** + * Optional. Whether to use stemmer to compute rouge score. + * + * Generated from protobuf field bool use_stemmer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseStemmer() + { + return $this->use_stemmer; + } + + /** + * Optional. Whether to use stemmer to compute rouge score. + * + * Generated from protobuf field bool use_stemmer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseStemmer($var) + { + GPBUtil::checkBool($var); + $this->use_stemmer = $var; + + return $this; + } + + /** + * Optional. Whether to split summaries while using rougeLsum. + * + * Generated from protobuf field bool split_summaries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSplitSummaries() + { + return $this->split_summaries; + } + + /** + * Optional. Whether to split summaries while using rougeLsum. + * + * Generated from protobuf field bool split_summaries = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSplitSummaries($var) + { + GPBUtil::checkBool($var); + $this->split_summaries = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SafetyInput.php b/AiPlatform/src/V1/SafetyInput.php new file mode 100644 index 000000000000..6ab4bfe1df5c --- /dev/null +++ b/AiPlatform/src/V1/SafetyInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.SafetyInput + */ +class SafetyInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Safety instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\SafetySpec $metric_spec + * Required. Spec for safety metric. + * @type \Google\Cloud\AIPlatform\V1\SafetyInstance $instance + * Required. Safety instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SafetySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for safety metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SafetySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SafetySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Safety instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SafetyInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Safety instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetyInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SafetyInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SafetyInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SafetyInstance.php b/AiPlatform/src/V1/SafetyInstance.php new file mode 100644 index 000000000000..629856bdcb64 --- /dev/null +++ b/AiPlatform/src/V1/SafetyInstance.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.SafetyInstance + */ +class SafetyInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SafetyResult.php b/AiPlatform/src/V1/SafetyResult.php new file mode 100644 index 000000000000..d535740d6480 --- /dev/null +++ b/AiPlatform/src/V1/SafetyResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.SafetyResult + */ +class SafetyResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Safety score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for safety score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for safety score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Safety score. + * @type string $explanation + * Output only. Explanation for safety score. + * @type float $confidence + * Output only. Confidence for safety score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Safety score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Safety score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for safety score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for safety score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for safety score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for safety score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SafetySpec.php b/AiPlatform/src/V1/SafetySpec.php new file mode 100644 index 000000000000..4f3cd928f8cf --- /dev/null +++ b/AiPlatform/src/V1/SafetySpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.SafetySpec + */ +class SafetySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Scheduling/Strategy.php b/AiPlatform/src/V1/Scheduling/Strategy.php index 2c027eb99eb4..f276ecd29137 100644 --- a/AiPlatform/src/V1/Scheduling/Strategy.php +++ b/AiPlatform/src/V1/Scheduling/Strategy.php @@ -32,14 +32,28 @@ class Strategy /** * Low cost by making potential use of spot resources. * - * Generated from protobuf enum LOW_COST = 2; + * Generated from protobuf enum LOW_COST = 2 [deprecated = true]; */ const LOW_COST = 2; + /** + * Standard provisioning strategy uses regular on-demand resources. + * + * Generated from protobuf enum STANDARD = 3; + */ + const STANDARD = 3; + /** + * Spot provisioning strategy uses spot resources. + * + * Generated from protobuf enum SPOT = 4; + */ + const SPOT = 4; private static $valueToName = [ self::STRATEGY_UNSPECIFIED => 'STRATEGY_UNSPECIFIED', self::ON_DEMAND => 'ON_DEMAND', self::LOW_COST => 'LOW_COST', + self::STANDARD => 'STANDARD', + self::SPOT => 'SPOT', ]; public static function name($value) diff --git a/AiPlatform/src/V1/SummarizationHelpfulnessInput.php b/AiPlatform/src/V1/SummarizationHelpfulnessInput.php new file mode 100644 index 000000000000..9e2b468a4c06 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationHelpfulnessInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.SummarizationHelpfulnessInput + */ +class SummarizationHelpfulnessInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for summarization helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Summarization helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessSpec $metric_spec + * Required. Spec for summarization helpfulness score metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInstance $instance + * Required. Summarization helpfulness instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for summarization helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for summarization helpfulness score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Summarization helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Summarization helpfulness instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationHelpfulnessInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationHelpfulnessInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationHelpfulnessInstance.php b/AiPlatform/src/V1/SummarizationHelpfulnessInstance.php new file mode 100644 index 000000000000..f06dc641819b --- /dev/null +++ b/AiPlatform/src/V1/SummarizationHelpfulnessInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.SummarizationHelpfulnessInstance + */ +class SummarizationHelpfulnessInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to be summarized. + * @type string $instruction + * Optional. Summarization prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationHelpfulnessResult.php b/AiPlatform/src/V1/SummarizationHelpfulnessResult.php new file mode 100644 index 000000000000..403a7a8cba18 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationHelpfulnessResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.SummarizationHelpfulnessResult + */ +class SummarizationHelpfulnessResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Summarization Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for summarization helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for summarization helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Summarization Helpfulness score. + * @type string $explanation + * Output only. Explanation for summarization helpfulness score. + * @type float $confidence + * Output only. Confidence for summarization helpfulness score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Summarization Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Summarization Helpfulness score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for summarization helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for summarization helpfulness score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for summarization helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for summarization helpfulness score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationHelpfulnessSpec.php b/AiPlatform/src/V1/SummarizationHelpfulnessSpec.php new file mode 100644 index 000000000000..121bbec29f6c --- /dev/null +++ b/AiPlatform/src/V1/SummarizationHelpfulnessSpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.SummarizationHelpfulnessSpec + */ +class SummarizationHelpfulnessSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute summarization + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute summarization + * helpfulness. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * helpfulness. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationQualityInput.php b/AiPlatform/src/V1/SummarizationQualityInput.php new file mode 100644 index 000000000000..a971892cf2e3 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationQualityInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.SummarizationQualityInput + */ +class SummarizationQualityInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\SummarizationQualitySpec $metric_spec + * Required. Spec for summarization quality score metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationQualityInstance $instance + * Required. Summarization quality instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationQualitySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for summarization quality score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualitySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationQualitySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationQualitySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationQualityInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Summarization quality instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationQualityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationQualityInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationQualityInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationQualityInstance.php b/AiPlatform/src/V1/SummarizationQualityInstance.php new file mode 100644 index 000000000000..5ad5f8900f4e --- /dev/null +++ b/AiPlatform/src/V1/SummarizationQualityInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.SummarizationQualityInstance + */ +class SummarizationQualityInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to be summarized. + * @type string $instruction + * Required. Summarization prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Required. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationQualityResult.php b/AiPlatform/src/V1/SummarizationQualityResult.php new file mode 100644 index 000000000000..3fc0e5be66c2 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationQualityResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.SummarizationQualityResult + */ +class SummarizationQualityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Summarization Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Summarization Quality score. + * @type string $explanation + * Output only. Explanation for summarization quality score. + * @type float $confidence + * Output only. Confidence for summarization quality score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Summarization Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Summarization Quality score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for summarization quality score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for summarization quality score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationQualitySpec.php b/AiPlatform/src/V1/SummarizationQualitySpec.php new file mode 100644 index 000000000000..75d337e09883 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationQualitySpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.SummarizationQualitySpec + */ +class SummarizationQualitySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute summarization + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute summarization + * quality. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * quality. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationVerbosityInput.php b/AiPlatform/src/V1/SummarizationVerbosityInput.php new file mode 100644 index 000000000000..db3f4c7712a7 --- /dev/null +++ b/AiPlatform/src/V1/SummarizationVerbosityInput.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.SummarizationVerbosityInput + */ +class SummarizationVerbosityInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for summarization verbosity score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbositySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Summarization verbosity instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\SummarizationVerbositySpec $metric_spec + * Required. Spec for summarization verbosity score metric. + * @type \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInstance $instance + * Required. Summarization verbosity instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for summarization verbosity score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbositySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationVerbositySpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for summarization verbosity score metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbositySpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationVerbositySpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationVerbositySpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Summarization verbosity instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInstance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. Summarization verbosity instance. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SummarizationVerbosityInstance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInstance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SummarizationVerbosityInstance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationVerbosityInstance.php b/AiPlatform/src/V1/SummarizationVerbosityInstance.php new file mode 100644 index 000000000000..632c1c73c3ac --- /dev/null +++ b/AiPlatform/src/V1/SummarizationVerbosityInstance.php @@ -0,0 +1,209 @@ +google.cloud.aiplatform.v1.SummarizationVerbosityInstance + */ +class SummarizationVerbosityInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reference = null; + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $context = null; + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $instruction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Optional. Ground truth used to compare against the prediction. + * @type string $context + * Required. Text to be summarized. + * @type string $instruction + * Optional. Summarization prompt for LLM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Optional. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContext() + { + return isset($this->context) ? $this->context : ''; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Required. Text to be summarized. + * + * Generated from protobuf field optional string context = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkString($var, True); + $this->context = $var; + + return $this; + } + + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInstruction() + { + return isset($this->instruction) ? $this->instruction : ''; + } + + public function hasInstruction() + { + return isset($this->instruction); + } + + public function clearInstruction() + { + unset($this->instruction); + } + + /** + * Optional. Summarization prompt for LLM. + * + * Generated from protobuf field optional string instruction = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInstruction($var) + { + GPBUtil::checkString($var, True); + $this->instruction = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationVerbosityResult.php b/AiPlatform/src/V1/SummarizationVerbosityResult.php new file mode 100644 index 000000000000..92fd7c92511f --- /dev/null +++ b/AiPlatform/src/V1/SummarizationVerbosityResult.php @@ -0,0 +1,155 @@ +google.cloud.aiplatform.v1.SummarizationVerbosityResult + */ +class SummarizationVerbosityResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Summarization Verbosity score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + /** + * Output only. Explanation for summarization verbosity score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $explanation = ''; + /** + * Output only. Confidence for summarization verbosity score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $confidence = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Summarization Verbosity score. + * @type string $explanation + * Output only. Explanation for summarization verbosity score. + * @type float $confidence + * Output only. Confidence for summarization verbosity score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Summarization Verbosity score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Summarization Verbosity score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Output only. Explanation for summarization verbosity score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExplanation() + { + return $this->explanation; + } + + /** + * Output only. Explanation for summarization verbosity score. + * + * Generated from protobuf field string explanation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExplanation($var) + { + GPBUtil::checkString($var, True); + $this->explanation = $var; + + return $this; + } + + /** + * Output only. Confidence for summarization verbosity score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getConfidence() + { + return isset($this->confidence) ? $this->confidence : 0.0; + } + + public function hasConfidence() + { + return isset($this->confidence); + } + + public function clearConfidence() + { + unset($this->confidence); + } + + /** + * Output only. Confidence for summarization verbosity score. + * + * Generated from protobuf field optional float confidence = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SummarizationVerbositySpec.php b/AiPlatform/src/V1/SummarizationVerbositySpec.php new file mode 100644 index 000000000000..5f6f8c21247b --- /dev/null +++ b/AiPlatform/src/V1/SummarizationVerbositySpec.php @@ -0,0 +1,105 @@ +google.cloud.aiplatform.v1.SummarizationVerbositySpec + */ +class SummarizationVerbositySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use instance.reference to compute summarization + * verbosity. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_reference = false; + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_reference + * Optional. Whether to use instance.reference to compute summarization + * verbosity. + * @type int $version + * Optional. Which version to use for evaluation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * verbosity. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseReference() + { + return $this->use_reference; + } + + /** + * Optional. Whether to use instance.reference to compute summarization + * verbosity. + * + * Generated from protobuf field bool use_reference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseReference($var) + { + GPBUtil::checkBool($var); + $this->use_reference = $var; + + return $this; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. Which version to use for evaluation. + * + * Generated from protobuf field int32 version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkInt32($var); + $this->version = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolCallValidInput.php b/AiPlatform/src/V1/ToolCallValidInput.php new file mode 100644 index 000000000000..a9b6ccd79443 --- /dev/null +++ b/AiPlatform/src/V1/ToolCallValidInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.ToolCallValidInput + */ +class ToolCallValidInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated tool call valid instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ToolCallValidSpec $metric_spec + * Required. Spec for tool call valid metric. + * @type array<\Google\Cloud\AIPlatform\V1\ToolCallValidInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated tool call valid instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ToolCallValidSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for tool call valid metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolCallValidSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ToolCallValidSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolCallValidSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated tool call valid instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated tool call valid instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolCallValidInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolCallValidInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolCallValidInstance.php b/AiPlatform/src/V1/ToolCallValidInstance.php new file mode 100644 index 000000000000..1b2554aeb732 --- /dev/null +++ b/AiPlatform/src/V1/ToolCallValidInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.ToolCallValidInstance + */ +class ToolCallValidInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolCallValidMetricValue.php b/AiPlatform/src/V1/ToolCallValidMetricValue.php new file mode 100644 index 000000000000..48b757dd6b08 --- /dev/null +++ b/AiPlatform/src/V1/ToolCallValidMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ToolCallValidMetricValue + */ +class ToolCallValidMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool call valid score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Tool call valid score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool call valid score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Tool call valid score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolCallValidResults.php b/AiPlatform/src/V1/ToolCallValidResults.php new file mode 100644 index 000000000000..91f7da60601d --- /dev/null +++ b/AiPlatform/src/V1/ToolCallValidResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ToolCallValidResults + */ +class ToolCallValidResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool call valid metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidMetricValue tool_call_valid_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tool_call_valid_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ToolCallValidMetricValue>|\Google\Protobuf\Internal\RepeatedField $tool_call_valid_metric_values + * Output only. Tool call valid metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool call valid metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidMetricValue tool_call_valid_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolCallValidMetricValues() + { + return $this->tool_call_valid_metric_values; + } + + /** + * Output only. Tool call valid metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolCallValidMetricValue tool_call_valid_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolCallValidMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolCallValidMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolCallValidMetricValue::class); + $this->tool_call_valid_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolCallValidSpec.php b/AiPlatform/src/V1/ToolCallValidSpec.php new file mode 100644 index 000000000000..5a26b5a864d0 --- /dev/null +++ b/AiPlatform/src/V1/ToolCallValidSpec.php @@ -0,0 +1,33 @@ +google.cloud.aiplatform.v1.ToolCallValidSpec + */ +class ToolCallValidSpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/ToolNameMatchInput.php b/AiPlatform/src/V1/ToolNameMatchInput.php new file mode 100644 index 000000000000..805d95438f06 --- /dev/null +++ b/AiPlatform/src/V1/ToolNameMatchInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.ToolNameMatchInput + */ +class ToolNameMatchInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated tool name match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ToolNameMatchSpec $metric_spec + * Required. Spec for tool name match metric. + * @type array<\Google\Cloud\AIPlatform\V1\ToolNameMatchInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated tool name match instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ToolNameMatchSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for tool name match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolNameMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ToolNameMatchSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolNameMatchSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated tool name match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated tool name match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolNameMatchInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolNameMatchInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolNameMatchInstance.php b/AiPlatform/src/V1/ToolNameMatchInstance.php new file mode 100644 index 000000000000..a594fb0fa1ba --- /dev/null +++ b/AiPlatform/src/V1/ToolNameMatchInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.ToolNameMatchInstance + */ +class ToolNameMatchInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolNameMatchMetricValue.php b/AiPlatform/src/V1/ToolNameMatchMetricValue.php new file mode 100644 index 000000000000..d1d83c463a57 --- /dev/null +++ b/AiPlatform/src/V1/ToolNameMatchMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ToolNameMatchMetricValue + */ +class ToolNameMatchMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool name match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Tool name match score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool name match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Tool name match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolNameMatchResults.php b/AiPlatform/src/V1/ToolNameMatchResults.php new file mode 100644 index 000000000000..2831460738d2 --- /dev/null +++ b/AiPlatform/src/V1/ToolNameMatchResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ToolNameMatchResults + */ +class ToolNameMatchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool name match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchMetricValue tool_name_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tool_name_match_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ToolNameMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $tool_name_match_metric_values + * Output only. Tool name match metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool name match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchMetricValue tool_name_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolNameMatchMetricValues() + { + return $this->tool_name_match_metric_values; + } + + /** + * Output only. Tool name match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolNameMatchMetricValue tool_name_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolNameMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolNameMatchMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolNameMatchMetricValue::class); + $this->tool_name_match_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolNameMatchSpec.php b/AiPlatform/src/V1/ToolNameMatchSpec.php new file mode 100644 index 000000000000..6b0d7ee95557 --- /dev/null +++ b/AiPlatform/src/V1/ToolNameMatchSpec.php @@ -0,0 +1,33 @@ +google.cloud.aiplatform.v1.ToolNameMatchSpec + */ +class ToolNameMatchSpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKVMatchInput.php b/AiPlatform/src/V1/ToolParameterKVMatchInput.php new file mode 100644 index 000000000000..186ae799db64 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKVMatchInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.ToolParameterKVMatchInput + */ +class ToolParameterKVMatchInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated tool parameter key value match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchSpec $metric_spec + * Required. Spec for tool parameter key value match metric. + * @type array<\Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated tool parameter key value match instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for tool parameter key value match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKVMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated tool parameter key value match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated tool parameter key value match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKVMatchInstance.php b/AiPlatform/src/V1/ToolParameterKVMatchInstance.php new file mode 100644 index 000000000000..88b7e78fceaa --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKVMatchInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.ToolParameterKVMatchInstance + */ +class ToolParameterKVMatchInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKVMatchMetricValue.php b/AiPlatform/src/V1/ToolParameterKVMatchMetricValue.php new file mode 100644 index 000000000000..845082141ab1 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKVMatchMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ToolParameterKVMatchMetricValue + */ +class ToolParameterKVMatchMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool parameter key value match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Tool parameter key value match score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool parameter key value match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Tool parameter key value match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKVMatchResults.php b/AiPlatform/src/V1/ToolParameterKVMatchResults.php new file mode 100644 index 000000000000..c9d12b0d293f --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKVMatchResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ToolParameterKVMatchResults + */ +class ToolParameterKVMatchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool parameter key value match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchMetricValue tool_parameter_kv_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tool_parameter_kv_match_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ToolParameterKVMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $tool_parameter_kv_match_metric_values + * Output only. Tool parameter key value match metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool parameter key value match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchMetricValue tool_parameter_kv_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolParameterKvMatchMetricValues() + { + return $this->tool_parameter_kv_match_metric_values; + } + + /** + * Output only. Tool parameter key value match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKVMatchMetricValue tool_parameter_kv_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolParameterKVMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolParameterKvMatchMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolParameterKVMatchMetricValue::class); + $this->tool_parameter_kv_match_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKVMatchSpec.php b/AiPlatform/src/V1/ToolParameterKVMatchSpec.php new file mode 100644 index 000000000000..5c02bbd3cb36 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKVMatchSpec.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ToolParameterKVMatchSpec + */ +class ToolParameterKVMatchSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use STRCIT string match on parameter values. + * + * Generated from protobuf field bool use_strict_string_match = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_strict_string_match = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_strict_string_match + * Optional. Whether to use STRCIT string match on parameter values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use STRCIT string match on parameter values. + * + * Generated from protobuf field bool use_strict_string_match = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseStrictStringMatch() + { + return $this->use_strict_string_match; + } + + /** + * Optional. Whether to use STRCIT string match on parameter values. + * + * Generated from protobuf field bool use_strict_string_match = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseStrictStringMatch($var) + { + GPBUtil::checkBool($var); + $this->use_strict_string_match = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKeyMatchInput.php b/AiPlatform/src/V1/ToolParameterKeyMatchInput.php new file mode 100644 index 000000000000..983806a885a8 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKeyMatchInput.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.ToolParameterKeyMatchInput + */ +class ToolParameterKeyMatchInput extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Spec for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_spec = null; + /** + * Required. Repeated tool parameter key match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchSpec $metric_spec + * Required. Spec for tool parameter key match metric. + * @type array<\Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * Required. Repeated tool parameter key match instances. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Spec for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchSpec|null + */ + public function getMetricSpec() + { + return $this->metric_spec; + } + + public function hasMetricSpec() + { + return isset($this->metric_spec); + } + + public function clearMetricSpec() + { + unset($this->metric_spec); + } + + /** + * Required. Spec for tool parameter key match metric. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ToolParameterKeyMatchSpec metric_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchSpec $var + * @return $this + */ + public function setMetricSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchSpec::class); + $this->metric_spec = $var; + + return $this; + } + + /** + * Required. Repeated tool parameter key match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Required. Repeated tool parameter key match instances. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchInstance instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchInstance::class); + $this->instances = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKeyMatchInstance.php b/AiPlatform/src/V1/ToolParameterKeyMatchInstance.php new file mode 100644 index 000000000000..4d61b6f0d15c --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKeyMatchInstance.php @@ -0,0 +1,121 @@ +google.cloud.aiplatform.v1.ToolParameterKeyMatchInstance + */ +class ToolParameterKeyMatchInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $prediction = null; + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $prediction + * Required. Output of the evaluated model. + * @type string $reference + * Required. Ground truth used to compare against the prediction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPrediction() + { + return isset($this->prediction) ? $this->prediction : ''; + } + + public function hasPrediction() + { + return isset($this->prediction); + } + + public function clearPrediction() + { + unset($this->prediction); + } + + /** + * Required. Output of the evaluated model. + * + * Generated from protobuf field optional string prediction = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPrediction($var) + { + GPBUtil::checkString($var, True); + $this->prediction = $var; + + return $this; + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReference() + { + return isset($this->reference) ? $this->reference : ''; + } + + public function hasReference() + { + return isset($this->reference); + } + + public function clearReference() + { + unset($this->reference); + } + + /** + * Required. Ground truth used to compare against the prediction. + * + * Generated from protobuf field optional string reference = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReference($var) + { + GPBUtil::checkString($var, True); + $this->reference = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKeyMatchMetricValue.php b/AiPlatform/src/V1/ToolParameterKeyMatchMetricValue.php new file mode 100644 index 000000000000..b4e7eb8e8556 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKeyMatchMetricValue.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValue + */ +class ToolParameterKeyMatchMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool parameter key match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $score + * Output only. Tool parameter key match score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool parameter key match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getScore() + { + return isset($this->score) ? $this->score : 0.0; + } + + public function hasScore() + { + return isset($this->score); + } + + public function clearScore() + { + unset($this->score); + } + + /** + * Output only. Tool parameter key match score. + * + * Generated from protobuf field optional float score = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKeyMatchResults.php b/AiPlatform/src/V1/ToolParameterKeyMatchResults.php new file mode 100644 index 000000000000..b99a98aa9211 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKeyMatchResults.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.ToolParameterKeyMatchResults + */ +class ToolParameterKeyMatchResults extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Tool parameter key match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValue tool_parameter_key_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tool_parameter_key_match_metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $tool_parameter_key_match_metric_values + * Output only. Tool parameter key match metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Tool parameter key match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValue tool_parameter_key_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getToolParameterKeyMatchMetricValues() + { + return $this->tool_parameter_key_match_metric_values; + } + + /** + * Output only. Tool parameter key match metric values. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ToolParameterKeyMatchMetricValue tool_parameter_key_match_metric_values = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setToolParameterKeyMatchMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ToolParameterKeyMatchMetricValue::class); + $this->tool_parameter_key_match_metric_values = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ToolParameterKeyMatchSpec.php b/AiPlatform/src/V1/ToolParameterKeyMatchSpec.php new file mode 100644 index 000000000000..82b29b2c2179 --- /dev/null +++ b/AiPlatform/src/V1/ToolParameterKeyMatchSpec.php @@ -0,0 +1,33 @@ +google.cloud.aiplatform.v1.ToolParameterKeyMatchSpec + */ +class ToolParameterKeyMatchSpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EvaluationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json index 2a666c6f8252..563d20931549 100644 --- a/AiPlatform/src/V1/gapic_metadata.json +++ b/AiPlatform/src/V1/gapic_metadata.json @@ -272,6 +272,45 @@ } } }, + "EvaluationService": { + "clients": { + "grpc": { + "libraryClient": "EvaluationServiceGapicClient", + "rpcs": { + "EvaluateInstances": { + "methods": [ + "evaluateInstances" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "FeatureOnlineStoreAdminService": { "clients": { "grpc": { diff --git a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php index 34dd1db6e1af..eaebbf63df80 100644 --- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php @@ -27,6 +27,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/datasets', 'body' => 'dataset', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/datasets', + 'body' => 'dataset', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -39,6 +46,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions', 'body' => 'dataset_version', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=datasets/*}/datasetVersions', + 'body' => 'dataset_version', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -50,6 +64,12 @@ 'DeleteDataset' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=datasets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -61,6 +81,12 @@ 'DeleteDatasetVersion' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=datasets/*/datasetVersions/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -106,6 +132,12 @@ 'GetDataset' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=datasets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -117,6 +149,12 @@ 'GetDatasetVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=datasets/*/datasetVersions/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -162,6 +200,12 @@ 'ListDatasetVersions' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/datasets/*}/datasetVersions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=datasets/*}/datasetVersions', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -173,6 +217,12 @@ 'ListDatasets' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/datasets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/datasets', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -195,6 +245,12 @@ 'RestoreDatasetVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/datasetVersions/*}:restore', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=datasets/*/datasetVersions/*}:restore', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -218,6 +274,16 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{dataset.name=projects/*/locations/*/datasets/*}', 'body' => 'dataset', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{dataset.name=datasets/*}', + 'body' => 'dataset', + 'queryParams' => [ + 'update_mask', + ], + ], + ], 'placeholders' => [ 'dataset.name' => [ 'getters' => [ @@ -234,6 +300,16 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{dataset_version.name=projects/*/locations/*/datasets/*/datasetVersions/*}', 'body' => 'dataset_version', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{dataset_version.name=datasets/*/datasetVersions/*}', + 'body' => 'dataset_version', + 'queryParams' => [ + 'update_mask', + ], + ], + ], 'placeholders' => [ 'dataset_version.name' => [ 'getters' => [ diff --git a/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php b/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php index 4c2e0f452f81..16d2d5b08c9d 100644 --- a/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php @@ -210,6 +210,7 @@ 'deploymentResourcePool' => 'projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}', 'location' => 'projects/{project}/locations/{location}', 'project' => 'projects/{project}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', ], ], ], diff --git a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php index 2c47c113c222..c517617c0ddc 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php @@ -245,6 +245,7 @@ 'network' => 'projects/{project}/global/networks/{network}', 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', ], ], ], diff --git a/AiPlatform/src/V1/resources/evaluation_service_client_config.json b/AiPlatform/src/V1/resources/evaluation_service_client_config.json new file mode 100644 index 000000000000..581364f16524 --- /dev/null +++ b/AiPlatform/src/V1/resources/evaluation_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.EvaluationService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "EvaluateInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AiPlatform/src/V1/resources/evaluation_service_descriptor_config.php b/AiPlatform/src/V1/resources/evaluation_service_descriptor_config.php new file mode 100644 index 000000000000..918b7d749c11 --- /dev/null +++ b/AiPlatform/src/V1/resources/evaluation_service_descriptor_config.php @@ -0,0 +1,116 @@ + [ + 'google.cloud.aiplatform.v1.EvaluationService' => [ + 'EvaluateInstances' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\EvaluateInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'location', + 'fieldAccessors' => [ + 'getLocation', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php b/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php new file mode 100644 index 000000000000..d898bddb3eb8 --- /dev/null +++ b/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php @@ -0,0 +1,2100 @@ + [ + 'google.cloud.aiplatform.v1.EvaluationService' => [ + 'EvaluateInstances' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{location=projects/*/locations/*}:evaluateInstances', + 'body' => '*', + 'placeholders' => [ + 'location' => [ + 'getters' => [ + 'getLocation', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/agents/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/apps/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/agents/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/apps/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/agents/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/apps/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/agents/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/apps/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookExecutionJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookExecutionJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:wait', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/agents/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/apps/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookExecutionJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php index 1dcf7f8004ff..77a1ce066ad1 100644 --- a/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php @@ -240,6 +240,7 @@ 'index' => 'projects/{project}/locations/{location}/indexes/{index}', 'indexEndpoint' => 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}', 'location' => 'projects/{project}/locations/{location}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', ], ], ], diff --git a/AiPlatform/src/V1/resources/job_service_descriptor_config.php b/AiPlatform/src/V1/resources/job_service_descriptor_config.php index 72fda4a1dd79..19e8d6612560 100644 --- a/AiPlatform/src/V1/resources/job_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/job_service_descriptor_config.php @@ -648,6 +648,7 @@ 'persistentResource' => 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}', 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', 'tensorboard' => 'projects/{project}/locations/{location}/tensorboards/{tensorboard}', 'trial' => 'projects/{project}/locations/{location}/studies/{study}/trials/{trial}', ], diff --git a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php index 28f2c8bcdc3f..5be13032fd32 100644 --- a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php @@ -33,6 +33,16 @@ 'uriTemplate' => '/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:computeTokens', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{endpoint=endpoints/*}:computeTokens', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{endpoint=publishers/*/models/*}:computeTokens', + 'body' => '*', + ], ], 'placeholders' => [ 'endpoint' => [ @@ -52,6 +62,16 @@ 'uriTemplate' => '/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{endpoint=endpoints/*}:countTokens', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{endpoint=publishers/*/models/*}:countTokens', + 'body' => '*', + ], ], 'placeholders' => [ 'endpoint' => [ diff --git a/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php index 9290937a300a..27061cadb5ad 100644 --- a/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php @@ -363,6 +363,7 @@ 'notebookExecutionJob' => 'projects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job}', 'notebookRuntime' => 'projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}', 'notebookRuntimeTemplate' => 'projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', 'schedule' => 'projects/{project}/locations/{location}/schedules/{schedule}', 'subnetwork' => 'projects/{project}/regions/{region}/subnetworks/{subnetwork}', ], diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php index 40f0f3b98b95..620d9dfb6561 100644 --- a/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php @@ -209,6 +209,7 @@ 'location' => 'projects/{project}/locations/{location}', 'network' => 'projects/{project}/global/networks/{network}', 'persistentResource' => 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}', + 'reservation' => 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}', ], ], ], diff --git a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php index d067ea6fce50..2b5614228e28 100644 --- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php @@ -69,6 +69,16 @@ 'uriTemplate' => '/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{model=endpoints/*}:generateContent', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{model=publishers/*/models/*}:generateContent', + 'body' => '*', + ], ], 'placeholders' => [ 'model' => [ @@ -145,6 +155,16 @@ 'uriTemplate' => '/v1/{model=projects/*/locations/*/publishers/*/models/*}:streamGenerateContent', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{model=endpoints/*}:streamGenerateContent', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{model=publishers/*/models/*}:streamGenerateContent', + 'body' => '*', + ], ], 'placeholders' => [ 'model' => [ diff --git a/AiPlatform/tests/Unit/V1/Client/EvaluationServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/EvaluationServiceClientTest.php new file mode 100644 index 000000000000..4ec7c6c995cc --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/EvaluationServiceClientTest.php @@ -0,0 +1,495 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return EvaluationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EvaluationServiceClient($options); + } + + /** @test */ + public function evaluateInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new EvaluateInstancesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new EvaluateInstancesRequest())->setLocation($formattedLocation); + $response = $gapicClient->evaluateInstances($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.EvaluationService/EvaluateInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function evaluateInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new EvaluateInstancesRequest())->setLocation($formattedLocation); + try { + $gapicClient->evaluateInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [$locationsElement]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest())->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest())->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest())->setResource($resource)->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest())->setResource($resource)->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function evaluateInstancesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new EvaluateInstancesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLocation = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new EvaluateInstancesRequest())->setLocation($formattedLocation); + $response = $gapicClient->evaluateInstancesAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.EvaluationService/EvaluateInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getLocation(); + $this->assertProtobufEquals($formattedLocation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +}