diff --git a/AiPlatform/metadata/V1/ApiAuth.php b/AiPlatform/metadata/V1/ApiAuth.php new file mode 100644 index 000000000000..e38fa18b4a5f Binary files /dev/null and b/AiPlatform/metadata/V1/ApiAuth.php differ diff --git a/AiPlatform/metadata/V1/Endpoint.php b/AiPlatform/metadata/V1/Endpoint.php index aacec71ee538..7656844790d0 100644 Binary files a/AiPlatform/metadata/V1/Endpoint.php and b/AiPlatform/metadata/V1/Endpoint.php differ diff --git a/AiPlatform/metadata/V1/EndpointService.php b/AiPlatform/metadata/V1/EndpointService.php index c257d9cd6243..4b959bc63f4a 100644 --- a/AiPlatform/metadata/V1/EndpointService.php +++ b/AiPlatform/metadata/V1/EndpointService.php @@ -25,7 +25,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -% +) 1google/cloud/aiplatform/v1/endpoint_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto)google/cloud/aiplatform/v1/endpoint.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" CreateEndpointRequest9 parent ( B)AA# @@ -51,7 +51,11 @@ public static function initOnce() { next_page_token ( " UpdateEndpointRequest; endpoint ( 2$.google.cloud.aiplatform.v1.EndpointBA4 - update_mask ( 2.google.protobuf.FieldMaskBA"Q + update_mask ( 2.google.protobuf.FieldMaskBA"_ + UpdateEndpointLongRunningRequest; +endpoint ( 2$.google.cloud.aiplatform.v1.EndpointBA"q +UpdateEndpointOperationMetadataN +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata"Q DeleteEndpointRequest8 name ( B*AA$ "aiplatform.googleapis.com/Endpoint" @@ -86,13 +90,15 @@ public static function initOnce() { MutateDeployedModelResponseA deployed_model ( 2).google.cloud.aiplatform.v1.DeployedModel"v $MutateDeployedModelOperationMetadataN -generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata2 +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata2 EndpointService CreateEndpoint1.google.cloud.aiplatform.v1.CreateEndpointRequest.google.longrunning.Operation"A+ EndpointCreateEndpointOperationMetadataAparent,endpointAparent,endpoint,endpoint_id9"-/v1/{parent=projects/*/locations/*}/endpoints:endpoint GetEndpoint..google.cloud.aiplatform.v1.GetEndpointRequest$.google.cloud.aiplatform.v1.Endpoint"Aparent/-/v1/{parent=projects/*/locations/*}/endpoints -UpdateEndpoint1.google.cloud.aiplatform.v1.UpdateEndpointRequest$.google.cloud.aiplatform.v1.Endpoint"_Aendpoint,update_maskB26/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:endpoint +UpdateEndpoint1.google.cloud.aiplatform.v1.UpdateEndpointRequest$.google.cloud.aiplatform.v1.Endpoint"_Aendpoint,update_maskB26/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:endpoint +UpdateEndpointLongRunning<.google.cloud.aiplatform.v1.UpdateEndpointLongRunningRequest.google.longrunning.Operation"A+ +EndpointUpdateEndpointOperationMetadataAendpointB"=/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update:* DeleteEndpoint1.google.cloud.aiplatform.v1.DeleteEndpointRequest.google.longrunning.Operation"oA0 google.protobuf.EmptyDeleteOperationMetadataAname/*-/v1/{name=projects/*/locations/*/endpoints/*} DeployModel..google.cloud.aiplatform.v1.DeployModelRequest.google.longrunning.Operation"A3 diff --git a/AiPlatform/metadata/V1/Io.php b/AiPlatform/metadata/V1/Io.php index f62df8908f35..3348a2605e57 100644 Binary files a/AiPlatform/metadata/V1/Io.php and b/AiPlatform/metadata/V1/Io.php differ diff --git a/AiPlatform/metadata/V1/NotebookExecutionJob.php b/AiPlatform/metadata/V1/NotebookExecutionJob.php index 1c18f5272f2b..5adfabbd3981 100644 Binary files a/AiPlatform/metadata/V1/NotebookExecutionJob.php and b/AiPlatform/metadata/V1/NotebookExecutionJob.php differ diff --git a/AiPlatform/metadata/V1/Tool.php b/AiPlatform/metadata/V1/Tool.php index a06e5fa4dc57..9ef43e267128 100644 Binary files a/AiPlatform/metadata/V1/Tool.php and b/AiPlatform/metadata/V1/Tool.php differ diff --git a/AiPlatform/metadata/V1/VertexRagData.php b/AiPlatform/metadata/V1/VertexRagData.php new file mode 100644 index 000000000000..35149e52949a Binary files /dev/null and b/AiPlatform/metadata/V1/VertexRagData.php differ diff --git a/AiPlatform/metadata/V1/VertexRagDataService.php b/AiPlatform/metadata/V1/VertexRagDataService.php new file mode 100644 index 000000000000..b046ef3ee7b2 Binary files /dev/null and b/AiPlatform/metadata/V1/VertexRagDataService.php differ diff --git a/AiPlatform/metadata/V1/VertexRagService.php b/AiPlatform/metadata/V1/VertexRagService.php new file mode 100644 index 000000000000..459ceeab3339 Binary files /dev/null and b/AiPlatform/metadata/V1/VertexRagService.php differ diff --git a/AiPlatform/samples/V1/EndpointServiceClient/update_endpoint_long_running.php b/AiPlatform/samples/V1/EndpointServiceClient/update_endpoint_long_running.php new file mode 100644 index 000000000000..f6247c96bdd8 --- /dev/null +++ b/AiPlatform/samples/V1/EndpointServiceClient/update_endpoint_long_running.php @@ -0,0 +1,86 @@ +setDisplayName($endpointDisplayName); + $request = (new UpdateEndpointLongRunningRequest()) + ->setEndpoint($endpoint); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $endpointServiceClient->updateEndpointLongRunning($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Endpoint $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $endpointDisplayName = '[DISPLAY_NAME]'; + + update_endpoint_long_running_sample($endpointDisplayName); +} +// [END aiplatform_v1_generated_EndpointService_UpdateEndpointLongRunning_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/create_rag_corpus.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/create_rag_corpus.php new file mode 100644 index 000000000000..d92131eaa217 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/create_rag_corpus.php @@ -0,0 +1,91 @@ +setDisplayName($ragCorpusDisplayName); + $request = (new CreateRagCorpusRequest()) + ->setParent($formattedParent) + ->setRagCorpus($ragCorpus); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vertexRagDataServiceClient->createRagCorpus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RagCorpus $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $formattedParent = VertexRagDataServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $ragCorpusDisplayName = '[DISPLAY_NAME]'; + + create_rag_corpus_sample($formattedParent, $ragCorpusDisplayName); +} +// [END aiplatform_v1_generated_VertexRagDataService_CreateRagCorpus_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_corpus.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_corpus.php new file mode 100644 index 000000000000..c81b2c54e373 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_corpus.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vertexRagDataServiceClient->deleteRagCorpus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $formattedName = VertexRagDataServiceClient::ragCorpusName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]' + ); + + delete_rag_corpus_sample($formattedName); +} +// [END aiplatform_v1_generated_VertexRagDataService_DeleteRagCorpus_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_file.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_file.php new file mode 100644 index 000000000000..8e156a2b5204 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/delete_rag_file.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vertexRagDataServiceClient->deleteRagFile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $formattedName = VertexRagDataServiceClient::ragFileName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]', + '[RAG_FILE]' + ); + + delete_rag_file_sample($formattedName); +} +// [END aiplatform_v1_generated_VertexRagDataService_DeleteRagFile_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..a0201ea26f19 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vertexRagDataServiceClient->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_VertexRagDataService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/get_location.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_location.php new file mode 100644 index 000000000000..61fd231b8e79 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/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_VertexRagDataService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_corpus.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_corpus.php new file mode 100644 index 000000000000..47551c446041 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_corpus.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RagCorpus $response */ + $response = $vertexRagDataServiceClient->getRagCorpus($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 +{ + $formattedName = VertexRagDataServiceClient::ragCorpusName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]' + ); + + get_rag_corpus_sample($formattedName); +} +// [END aiplatform_v1_generated_VertexRagDataService_GetRagCorpus_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_file.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_file.php new file mode 100644 index 000000000000..5578388a0640 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/get_rag_file.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RagFile $response */ + $response = $vertexRagDataServiceClient->getRagFile($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 +{ + $formattedName = VertexRagDataServiceClient::ragFileName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]', + '[RAG_FILE]' + ); + + get_rag_file_sample($formattedName); +} +// [END aiplatform_v1_generated_VertexRagDataService_GetRagFile_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/import_rag_files.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/import_rag_files.php new file mode 100644 index 000000000000..c0a4abe4adfc --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/import_rag_files.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setImportRagFilesConfig($importRagFilesConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vertexRagDataServiceClient->importRagFiles($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportRagFilesResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $formattedParent = VertexRagDataServiceClient::ragCorpusName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]' + ); + + import_rag_files_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagDataService_ImportRagFiles_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/list_locations.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/list_locations.php new file mode 100644 index 000000000000..ef3f068b9a2b --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/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_VertexRagDataService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_corpora.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_corpora.php new file mode 100644 index 000000000000..3e38002b9b56 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_corpora.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vertexRagDataServiceClient->listRagCorpora($request); + + /** @var RagCorpus $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()); + } +} + +/** + * 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 +{ + $formattedParent = VertexRagDataServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_rag_corpora_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagDataService_ListRagCorpora_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_files.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_files.php new file mode 100644 index 000000000000..efd33ed14331 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/list_rag_files.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vertexRagDataServiceClient->listRagFiles($request); + + /** @var RagFile $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()); + } +} + +/** + * 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 +{ + $formattedParent = VertexRagDataServiceClient::ragCorpusName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]' + ); + + list_rag_files_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagDataService_ListRagFiles_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..e760fcf0c5a1 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/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 = $vertexRagDataServiceClient->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_VertexRagDataService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..07429cdcda18 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/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 = $vertexRagDataServiceClient->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_VertexRagDataService_TestIamPermissions_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/update_rag_corpus.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/update_rag_corpus.php new file mode 100644 index 000000000000..04d90d0088ba --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/update_rag_corpus.php @@ -0,0 +1,86 @@ +setDisplayName($ragCorpusDisplayName); + $request = (new UpdateRagCorpusRequest()) + ->setRagCorpus($ragCorpus); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vertexRagDataServiceClient->updateRagCorpus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RagCorpus $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->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 +{ + $ragCorpusDisplayName = '[DISPLAY_NAME]'; + + update_rag_corpus_sample($ragCorpusDisplayName); +} +// [END aiplatform_v1_generated_VertexRagDataService_UpdateRagCorpus_sync] diff --git a/AiPlatform/samples/V1/VertexRagDataServiceClient/upload_rag_file.php b/AiPlatform/samples/V1/VertexRagDataServiceClient/upload_rag_file.php new file mode 100644 index 000000000000..9568b01d7ffc --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagDataServiceClient/upload_rag_file.php @@ -0,0 +1,88 @@ +setDisplayName($ragFileDisplayName); + $uploadRagFileConfig = new UploadRagFileConfig(); + $request = (new UploadRagFileRequest()) + ->setParent($formattedParent) + ->setRagFile($ragFile) + ->setUploadRagFileConfig($uploadRagFileConfig); + + // Call the API and handle any network failures. + try { + /** @var UploadRagFileResponse $response */ + $response = $vertexRagDataServiceClient->uploadRagFile($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 +{ + $formattedParent = VertexRagDataServiceClient::ragCorpusName( + '[PROJECT]', + '[LOCATION]', + '[RAG_CORPUS]' + ); + $ragFileDisplayName = '[DISPLAY_NAME]'; + + upload_rag_file_sample($formattedParent, $ragFileDisplayName); +} +// [END aiplatform_v1_generated_VertexRagDataService_UploadRagFile_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/augment_prompt.php b/AiPlatform/samples/V1/VertexRagServiceClient/augment_prompt.php new file mode 100644 index 000000000000..f63ca8c4bf78 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/augment_prompt.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var AugmentPromptResponse $response */ + $response = $vertexRagServiceClient->augmentPrompt($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 +{ + $formattedParent = VertexRagServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + augment_prompt_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagService_AugmentPrompt_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/corroborate_content.php b/AiPlatform/samples/V1/VertexRagServiceClient/corroborate_content.php new file mode 100644 index 000000000000..fba8165b885f --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/corroborate_content.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var CorroborateContentResponse $response */ + $response = $vertexRagServiceClient->corroborateContent($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 +{ + $formattedParent = VertexRagServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + corroborate_content_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagService_CorroborateContent_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/VertexRagServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..a1fa48136fbc --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $vertexRagServiceClient->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_VertexRagService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/get_location.php b/AiPlatform/samples/V1/VertexRagServiceClient/get_location.php new file mode 100644 index 000000000000..f8e4e3d44645 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/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_VertexRagService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/list_locations.php b/AiPlatform/samples/V1/VertexRagServiceClient/list_locations.php new file mode 100644 index 000000000000..65bac2aee3bd --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/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_VertexRagService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/retrieve_contexts.php b/AiPlatform/samples/V1/VertexRagServiceClient/retrieve_contexts.php new file mode 100644 index 000000000000..5720eccfe5bd --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/retrieve_contexts.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var RetrieveContextsResponse $response */ + $response = $vertexRagServiceClient->retrieveContexts($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 +{ + $formattedParent = VertexRagServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + retrieve_contexts_sample($formattedParent); +} +// [END aiplatform_v1_generated_VertexRagService_RetrieveContexts_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/VertexRagServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..6c6990f42a87 --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/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 = $vertexRagServiceClient->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_VertexRagService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/VertexRagServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/VertexRagServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..c22994a1fb7d --- /dev/null +++ b/AiPlatform/samples/V1/VertexRagServiceClient/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 = $vertexRagServiceClient->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_VertexRagService_TestIamPermissions_sync] diff --git a/AiPlatform/src/V1/ApiAuth.php b/AiPlatform/src/V1/ApiAuth.php new file mode 100644 index 000000000000..c49a5c7f9672 --- /dev/null +++ b/AiPlatform/src/V1/ApiAuth.php @@ -0,0 +1,75 @@ +google.cloud.aiplatform.v1.ApiAuth + */ +class ApiAuth extends \Google\Protobuf\Internal\Message +{ + protected $auth_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $api_key_config + * The API secret. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ApiAuth::initOnce(); + parent::__construct($data); + } + + /** + * The API secret. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 1; + * @return \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig|null + */ + public function getApiKeyConfig() + { + return $this->readOneof(1); + } + + public function hasApiKeyConfig() + { + return $this->hasOneof(1); + } + + /** + * The API secret. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 1; + * @param \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $var + * @return $this + */ + public function setApiKeyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthConfig() + { + return $this->whichOneof("auth_config"); + } + +} + diff --git a/AiPlatform/src/V1/ApiAuth/ApiKeyConfig.php b/AiPlatform/src/V1/ApiAuth/ApiKeyConfig.php new file mode 100644 index 000000000000..0302abfbf6b2 --- /dev/null +++ b/AiPlatform/src/V1/ApiAuth/ApiKeyConfig.php @@ -0,0 +1,72 @@ +google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig + */ +class ApiKeyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The SecretManager secret version resource name storing API key. + * e.g. projects/{project}/secrets/{secret}/versions/{version} + * + * Generated from protobuf field string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $api_key_secret_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $api_key_secret_version + * Required. The SecretManager secret version resource name storing API key. + * e.g. projects/{project}/secrets/{secret}/versions/{version} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\ApiAuth::initOnce(); + parent::__construct($data); + } + + /** + * Required. The SecretManager secret version resource name storing API key. + * e.g. projects/{project}/secrets/{secret}/versions/{version} + * + * Generated from protobuf field string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getApiKeySecretVersion() + { + return $this->api_key_secret_version; + } + + /** + * Required. The SecretManager secret version resource name storing API key. + * e.g. projects/{project}/secrets/{secret}/versions/{version} + * + * Generated from protobuf field string api_key_secret_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setApiKeySecretVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_key_secret_version = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/AugmentPromptRequest.php b/AiPlatform/src/V1/AugmentPromptRequest.php new file mode 100644 index 000000000000..864c6417b67d --- /dev/null +++ b/AiPlatform/src/V1/AugmentPromptRequest.php @@ -0,0 +1,220 @@ +google.cloud.aiplatform.v1.AugmentPromptRequest + */ +class AugmentPromptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to augment prompt. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Input content to augment, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $contents; + /** + * Optional. Metadata of the backend deployed model. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.AugmentPromptRequest.Model model = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = null; + protected $data_source; + + /** + * @param string $parent Required. The resource name of the Location from which to augment prompt. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. Please see + * {@see VertexRagServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model $model Optional. Metadata of the backend deployed model. + * @param \Google\Cloud\AIPlatform\V1\VertexRagStore $vertexRagStore Optional. Retrieves contexts from the Vertex RagStore. + * + * @return \Google\Cloud\AIPlatform\V1\AugmentPromptRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model $model, \Google\Cloud\AIPlatform\V1\VertexRagStore $vertexRagStore): self + { + return (new self()) + ->setParent($parent) + ->setModel($model) + ->setVertexRagStore($vertexRagStore); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\VertexRagStore $vertex_rag_store + * Optional. Retrieves contexts from the Vertex RagStore. + * @type string $parent + * Required. The resource name of the Location from which to augment prompt. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * @type array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $contents + * Optional. Input content to augment, only text format is supported for now. + * @type \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model $model + * Optional. Metadata of the backend deployed model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Retrieves contexts from the Vertex RagStore. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.VertexRagStore vertex_rag_store = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\VertexRagStore|null + */ + public function getVertexRagStore() + { + return $this->readOneof(4); + } + + public function hasVertexRagStore() + { + return $this->hasOneof(4); + } + + /** + * Optional. Retrieves contexts from the Vertex RagStore. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.VertexRagStore vertex_rag_store = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\VertexRagStore $var + * @return $this + */ + public function setVertexRagStore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\VertexRagStore::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Required. The resource name of the Location from which to augment prompt. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to augment prompt. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Input content to augment, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContents() + { + return $this->contents; + } + + /** + * Optional. Input content to augment, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Content::class); + $this->contents = $arr; + + return $this; + } + + /** + * Optional. Metadata of the backend deployed model. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.AugmentPromptRequest.Model model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model|null + */ + public function getModel() + { + return $this->model; + } + + public function hasModel() + { + return isset($this->model); + } + + public function clearModel() + { + unset($this->model); + } + + /** + * Optional. Metadata of the backend deployed model. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.AugmentPromptRequest.Model model = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\AugmentPromptRequest\Model::class); + $this->model = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + diff --git a/AiPlatform/src/V1/AugmentPromptRequest/Model.php b/AiPlatform/src/V1/AugmentPromptRequest/Model.php new file mode 100644 index 000000000000..18eddf574b1e --- /dev/null +++ b/AiPlatform/src/V1/AugmentPromptRequest/Model.php @@ -0,0 +1,106 @@ +google.cloud.aiplatform.v1.AugmentPromptRequest.Model + */ +class Model extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The model that the user will send the augmented prompt for + * content generation. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + /** + * Optional. The model version of the backend deployed model. + * + * Generated from protobuf field string model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Optional. The model that the user will send the augmented prompt for + * content generation. + * @type string $model_version + * Optional. The model version of the backend deployed model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The model that the user will send the augmented prompt for + * content generation. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. The model that the user will send the augmented prompt for + * content generation. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Optional. The model version of the backend deployed model. + * + * Generated from protobuf field string model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModelVersion() + { + return $this->model_version; + } + + /** + * Optional. The model version of the backend deployed model. + * + * Generated from protobuf field string model_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModelVersion($var) + { + GPBUtil::checkString($var, True); + $this->model_version = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/AugmentPromptResponse.php b/AiPlatform/src/V1/AugmentPromptResponse.php new file mode 100644 index 000000000000..a5d1bd0c1a3e --- /dev/null +++ b/AiPlatform/src/V1/AugmentPromptResponse.php @@ -0,0 +1,101 @@ +google.cloud.aiplatform.v1.AugmentPromptResponse + */ +class AugmentPromptResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Augmented prompt, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content augmented_prompt = 1; + */ + private $augmented_prompt; + /** + * Retrieved facts from RAG data sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 2; + */ + private $facts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $augmented_prompt + * Augmented prompt, only text format is supported for now. + * @type array<\Google\Cloud\AIPlatform\V1\Fact>|\Google\Protobuf\Internal\RepeatedField $facts + * Retrieved facts from RAG data sources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Augmented prompt, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content augmented_prompt = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAugmentedPrompt() + { + return $this->augmented_prompt; + } + + /** + * Augmented prompt, only text format is supported for now. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content augmented_prompt = 1; + * @param array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAugmentedPrompt($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Content::class); + $this->augmented_prompt = $arr; + + return $this; + } + + /** + * Retrieved facts from RAG data sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFacts() + { + return $this->facts; + } + + /** + * Retrieved facts from RAG data sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 2; + * @param array<\Google\Cloud\AIPlatform\V1\Fact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Fact::class); + $this->facts = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Claim.php b/AiPlatform/src/V1/Claim.php new file mode 100644 index 000000000000..9736806833b6 --- /dev/null +++ b/AiPlatform/src/V1/Claim.php @@ -0,0 +1,199 @@ +google.cloud.aiplatform.v1.Claim + */ +class Claim extends \Google\Protobuf\Internal\Message +{ + /** + * Index in the input text where the claim starts (inclusive). + * + * Generated from protobuf field optional int32 start_index = 1; + */ + protected $start_index = null; + /** + * Index in the input text where the claim ends (exclusive). + * + * Generated from protobuf field optional int32 end_index = 2; + */ + protected $end_index = null; + /** + * Indexes of the facts supporting this claim. + * + * Generated from protobuf field repeated int32 fact_indexes = 3; + */ + private $fact_indexes; + /** + * Confidence score of this corroboration. + * + * Generated from protobuf field optional float score = 4; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start_index + * Index in the input text where the claim starts (inclusive). + * @type int $end_index + * Index in the input text where the claim ends (exclusive). + * @type array|\Google\Protobuf\Internal\RepeatedField $fact_indexes + * Indexes of the facts supporting this claim. + * @type float $score + * Confidence score of this corroboration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Index in the input text where the claim starts (inclusive). + * + * Generated from protobuf field optional int32 start_index = 1; + * @return int + */ + public function getStartIndex() + { + return isset($this->start_index) ? $this->start_index : 0; + } + + public function hasStartIndex() + { + return isset($this->start_index); + } + + public function clearStartIndex() + { + unset($this->start_index); + } + + /** + * Index in the input text where the claim starts (inclusive). + * + * Generated from protobuf field optional int32 start_index = 1; + * @param int $var + * @return $this + */ + public function setStartIndex($var) + { + GPBUtil::checkInt32($var); + $this->start_index = $var; + + return $this; + } + + /** + * Index in the input text where the claim ends (exclusive). + * + * Generated from protobuf field optional int32 end_index = 2; + * @return int + */ + public function getEndIndex() + { + return isset($this->end_index) ? $this->end_index : 0; + } + + public function hasEndIndex() + { + return isset($this->end_index); + } + + public function clearEndIndex() + { + unset($this->end_index); + } + + /** + * Index in the input text where the claim ends (exclusive). + * + * Generated from protobuf field optional int32 end_index = 2; + * @param int $var + * @return $this + */ + public function setEndIndex($var) + { + GPBUtil::checkInt32($var); + $this->end_index = $var; + + return $this; + } + + /** + * Indexes of the facts supporting this claim. + * + * Generated from protobuf field repeated int32 fact_indexes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFactIndexes() + { + return $this->fact_indexes; + } + + /** + * Indexes of the facts supporting this claim. + * + * Generated from protobuf field repeated int32 fact_indexes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFactIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->fact_indexes = $arr; + + return $this; + } + + /** + * Confidence score of this corroboration. + * + * Generated from protobuf field optional float score = 4; + * @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); + } + + /** + * Confidence score of this corroboration. + * + * Generated from protobuf field optional float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Client/EndpointServiceClient.php b/AiPlatform/src/V1/Client/EndpointServiceClient.php index eb059776a5c8..8d8c1bab1f3f 100644 --- a/AiPlatform/src/V1/Client/EndpointServiceClient.php +++ b/AiPlatform/src/V1/Client/EndpointServiceClient.php @@ -42,6 +42,7 @@ use Google\Cloud\AIPlatform\V1\ListEndpointsRequest; use Google\Cloud\AIPlatform\V1\MutateDeployedModelRequest; use Google\Cloud\AIPlatform\V1\UndeployModelRequest; +use Google\Cloud\AIPlatform\V1\UpdateEndpointLongRunningRequest; use Google\Cloud\AIPlatform\V1\UpdateEndpointRequest; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; @@ -74,6 +75,7 @@ * @method PromiseInterface mutateDeployedModelAsync(MutateDeployedModelRequest $request, array $optionalArgs = []) * @method PromiseInterface undeployModelAsync(UndeployModelRequest $request, array $optionalArgs = []) * @method PromiseInterface updateEndpointAsync(UpdateEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest $request, array $optionalArgs = []) * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) @@ -673,6 +675,35 @@ public function updateEndpoint(UpdateEndpointRequest $request, array $callOption return $this->startApiCall('UpdateEndpoint', $request, $callOptions)->wait(); } + /** + * Updates an Endpoint with a long running operation. + * + * The async variant is + * {@see EndpointServiceClient::updateEndpointLongRunningAsync()} . + * + * @example samples/V1/EndpointServiceClient/update_endpoint_long_running.php + * + * @param UpdateEndpointLongRunningRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEndpointLongRunning( + UpdateEndpointLongRunningRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateEndpointLongRunning', $request, $callOptions)->wait(); + } + /** * Gets information about a location. * diff --git a/AiPlatform/src/V1/Client/LlmUtilityServiceClient.php b/AiPlatform/src/V1/Client/LlmUtilityServiceClient.php index 32f053ca38cb..711fc9f3749c 100644 --- a/AiPlatform/src/V1/Client/LlmUtilityServiceClient.php +++ b/AiPlatform/src/V1/Client/LlmUtilityServiceClient.php @@ -175,6 +175,25 @@ public static function projectLocationPublisherModelName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a rag_corpus + * resource. + * + * @param string $project + * @param string $location + * @param string $ragCorpus + * + * @return string The formatted rag_corpus resource. + */ + public static function ragCorpusName(string $project, string $location, string $ragCorpus): string + { + return self::getPathTemplate('ragCorpus')->render([ + 'project' => $project, + 'location' => $location, + 'rag_corpus' => $ragCorpus, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -182,6 +201,7 @@ public static function projectLocationPublisherModelName( * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - ragCorpus: projects/{project}/locations/{location}/ragCorpora/{rag_corpus} * * 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/PredictionServiceClient.php b/AiPlatform/src/V1/Client/PredictionServiceClient.php index 2228dd15d978..358b9ec1187f 100644 --- a/AiPlatform/src/V1/Client/PredictionServiceClient.php +++ b/AiPlatform/src/V1/Client/PredictionServiceClient.php @@ -195,6 +195,25 @@ public static function projectLocationPublisherModelName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a rag_corpus + * resource. + * + * @param string $project + * @param string $location + * @param string $ragCorpus + * + * @return string The formatted rag_corpus resource. + */ + public static function ragCorpusName(string $project, string $location, string $ragCorpus): string + { + return self::getPathTemplate('ragCorpus')->render([ + 'project' => $project, + 'location' => $location, + 'rag_corpus' => $ragCorpus, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -202,6 +221,7 @@ public static function projectLocationPublisherModelName( * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - ragCorpus: projects/{project}/locations/{location}/ragCorpora/{rag_corpus} * * 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/ScheduleServiceClient.php b/AiPlatform/src/V1/Client/ScheduleServiceClient.php index 9ac1be597f11..a24aab5c1ba2 100644 --- a/AiPlatform/src/V1/Client/ScheduleServiceClient.php +++ b/AiPlatform/src/V1/Client/ScheduleServiceClient.php @@ -387,6 +387,25 @@ public static function pipelineJobName(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, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a schedule * resource. @@ -406,6 +425,25 @@ public static function scheduleName(string $project, string $location, string $s ]); } + /** + * Formats a string containing the fully-qualified path to represent a subnetwork + * resource. + * + * @param string $project + * @param string $region + * @param string $subnetwork + * + * @return string The formatted subnetwork resource. + */ + public static function subnetworkName(string $project, string $region, string $subnetwork): string + { + return self::getPathTemplate('subnetwork')->render([ + 'project' => $project, + 'region' => $region, + 'subnetwork' => $subnetwork, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -420,7 +458,9 @@ public static function scheduleName(string $project, string $location, string $s * - notebookExecutionJob: projects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job} * - notebookRuntimeTemplate: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template} * - pipelineJob: projects/{project}/locations/{location}/pipelineJobs/{pipeline_job} + * - 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} * * 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/VertexRagDataServiceClient.php b/AiPlatform/src/V1/Client/VertexRagDataServiceClient.php new file mode 100644 index 000000000000..20d78a5be61c --- /dev/null +++ b/AiPlatform/src/V1/Client/VertexRagDataServiceClient.php @@ -0,0 +1,851 @@ + createRagCorpusAsync(CreateRagCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRagCorpusAsync(DeleteRagCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRagFileAsync(DeleteRagFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRagCorpusAsync(GetRagCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRagFileAsync(GetRagFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface importRagFilesAsync(ImportRagFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRagCorporaAsync(ListRagCorporaRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRagFilesAsync(ListRagFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRagCorpusAsync(UpdateRagCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface uploadRagFileAsync(UploadRagFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class VertexRagDataServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.aiplatform.v1.VertexRagDataService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'aiplatform.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'aiplatform.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/vertex_rag_data_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vertex_rag_data_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vertex_rag_data_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vertex_rag_data_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a endpoint + * resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted endpoint resource. + */ + public static function endpointName(string $project, string $location, string $endpoint): string + { + return self::getPathTemplate('endpoint')->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * 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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName(string $project, string $location, string $model): string + { + return self::getPathTemplate('model')->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_endpoint resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted project_location_endpoint resource. + */ + public static function projectLocationEndpointName(string $project, string $location, string $endpoint): string + { + return self::getPathTemplate('projectLocationEndpoint')->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_publisher_model resource. + * + * @param string $project + * @param string $location + * @param string $publisher + * @param string $model + * + * @return string The formatted project_location_publisher_model resource. + */ + public static function projectLocationPublisherModelName( + string $project, + string $location, + string $publisher, + string $model + ): string { + return self::getPathTemplate('projectLocationPublisherModel')->render([ + 'project' => $project, + 'location' => $location, + 'publisher' => $publisher, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rag_corpus + * resource. + * + * @param string $project + * @param string $location + * @param string $ragCorpus + * + * @return string The formatted rag_corpus resource. + */ + public static function ragCorpusName(string $project, string $location, string $ragCorpus): string + { + return self::getPathTemplate('ragCorpus')->render([ + 'project' => $project, + 'location' => $location, + 'rag_corpus' => $ragCorpus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rag_file + * resource. + * + * @param string $project + * @param string $location + * @param string $ragCorpus + * @param string $ragFile + * + * @return string The formatted rag_file resource. + */ + public static function ragFileName(string $project, string $location, string $ragCorpus, string $ragFile): string + { + return self::getPathTemplate('ragFile')->render([ + 'project' => $project, + 'location' => $location, + 'rag_corpus' => $ragCorpus, + 'rag_file' => $ragFile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted secret_version resource. + */ + public static function secretVersionName(string $project, string $secret, string $secretVersion): string + { + return self::getPathTemplate('secretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - location: projects/{project}/locations/{location} + * - model: projects/{project}/locations/{location}/models/{model} + * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - ragCorpus: projects/{project}/locations/{location}/ragCorpora/{rag_corpus} + * - ragFile: projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file} + * - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} + * + * 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); + $this->operationsClient = $this->createOperationsClient($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); + } + + /** + * Creates a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::createRagCorpusAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/create_rag_corpus.php + * + * @param CreateRagCorpusRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRagCorpus(CreateRagCorpusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateRagCorpus', $request, $callOptions)->wait(); + } + + /** + * Deletes a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::deleteRagCorpusAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/delete_rag_corpus.php + * + * @param DeleteRagCorpusRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRagCorpus(DeleteRagCorpusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRagCorpus', $request, $callOptions)->wait(); + } + + /** + * Deletes a RagFile. + * + * The async variant is {@see VertexRagDataServiceClient::deleteRagFileAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/delete_rag_file.php + * + * @param DeleteRagFileRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRagFile(DeleteRagFileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRagFile', $request, $callOptions)->wait(); + } + + /** + * Gets a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::getRagCorpusAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/get_rag_corpus.php + * + * @param GetRagCorpusRequest $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 RagCorpus + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRagCorpus(GetRagCorpusRequest $request, array $callOptions = []): RagCorpus + { + return $this->startApiCall('GetRagCorpus', $request, $callOptions)->wait(); + } + + /** + * Gets a RagFile. + * + * The async variant is {@see VertexRagDataServiceClient::getRagFileAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/get_rag_file.php + * + * @param GetRagFileRequest $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 RagFile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRagFile(GetRagFileRequest $request, array $callOptions = []): RagFile + { + return $this->startApiCall('GetRagFile', $request, $callOptions)->wait(); + } + + /** + * Import files from Google Cloud Storage or Google Drive into a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::importRagFilesAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/import_rag_files.php + * + * @param ImportRagFilesRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importRagFiles(ImportRagFilesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportRagFiles', $request, $callOptions)->wait(); + } + + /** + * Lists RagCorpora in a Location. + * + * The async variant is {@see VertexRagDataServiceClient::listRagCorporaAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/list_rag_corpora.php + * + * @param ListRagCorporaRequest $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 listRagCorpora(ListRagCorporaRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRagCorpora', $request, $callOptions); + } + + /** + * Lists RagFiles in a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::listRagFilesAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/list_rag_files.php + * + * @param ListRagFilesRequest $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 listRagFiles(ListRagFilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRagFiles', $request, $callOptions); + } + + /** + * Updates a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::updateRagCorpusAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/update_rag_corpus.php + * + * @param UpdateRagCorpusRequest $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 OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRagCorpus(UpdateRagCorpusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateRagCorpus', $request, $callOptions)->wait(); + } + + /** + * Upload a file into a RagCorpus. + * + * The async variant is {@see VertexRagDataServiceClient::uploadRagFileAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/upload_rag_file.php + * + * @param UploadRagFileRequest $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 UploadRagFileResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function uploadRagFile(UploadRagFileRequest $request, array $callOptions = []): UploadRagFileResponse + { + return $this->startApiCall('UploadRagFile', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VertexRagDataServiceClient::getLocationAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/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 VertexRagDataServiceClient::listLocationsAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/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 VertexRagDataServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/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 VertexRagDataServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/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 VertexRagDataServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/VertexRagDataServiceClient/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/VertexRagServiceClient.php b/AiPlatform/src/V1/Client/VertexRagServiceClient.php new file mode 100644 index 000000000000..3cd1757b5c7e --- /dev/null +++ b/AiPlatform/src/V1/Client/VertexRagServiceClient.php @@ -0,0 +1,478 @@ + augmentPromptAsync(AugmentPromptRequest $request, array $optionalArgs = []) + * @method PromiseInterface corroborateContentAsync(CorroborateContentRequest $request, array $optionalArgs = []) + * @method PromiseInterface retrieveContextsAsync(RetrieveContextsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class VertexRagServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.aiplatform.v1.VertexRagService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'aiplatform.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'aiplatform.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = ['https://www.googleapis.com/auth/cloud-platform']; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/vertex_rag_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vertex_rag_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vertex_rag_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vertex_rag_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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a rag_corpus + * resource. + * + * @param string $project + * @param string $location + * @param string $ragCorpus + * + * @return string The formatted rag_corpus resource. + */ + public static function ragCorpusName(string $project, string $location, string $ragCorpus): string + { + return self::getPathTemplate('ragCorpus')->render([ + 'project' => $project, + 'location' => $location, + 'rag_corpus' => $ragCorpus, + ]); + } + + /** + * 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} + * - ragCorpus: projects/{project}/locations/{location}/ragCorpora/{rag_corpus} + * + * 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); + } + + /** + * Given an input prompt, it returns augmented prompt from vertex rag store + * to guide LLM towards generating grounded responses. + * + * The async variant is {@see VertexRagServiceClient::augmentPromptAsync()} . + * + * @example samples/V1/VertexRagServiceClient/augment_prompt.php + * + * @param AugmentPromptRequest $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 AugmentPromptResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function augmentPrompt(AugmentPromptRequest $request, array $callOptions = []): AugmentPromptResponse + { + return $this->startApiCall('AugmentPrompt', $request, $callOptions)->wait(); + } + + /** + * Given an input text, it returns a score that evaluates the factuality of + * the text. It also extracts and returns claims from the text and provides + * supporting facts. + * + * The async variant is {@see VertexRagServiceClient::corroborateContentAsync()} . + * + * @example samples/V1/VertexRagServiceClient/corroborate_content.php + * + * @param CorroborateContentRequest $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 CorroborateContentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function corroborateContent( + CorroborateContentRequest $request, + array $callOptions = [] + ): CorroborateContentResponse { + return $this->startApiCall('CorroborateContent', $request, $callOptions)->wait(); + } + + /** + * Retrieves relevant contexts for a query. + * + * The async variant is {@see VertexRagServiceClient::retrieveContextsAsync()} . + * + * @example samples/V1/VertexRagServiceClient/retrieve_contexts.php + * + * @param RetrieveContextsRequest $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 RetrieveContextsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function retrieveContexts( + RetrieveContextsRequest $request, + array $callOptions = [] + ): RetrieveContextsResponse { + return $this->startApiCall('RetrieveContexts', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VertexRagServiceClient::getLocationAsync()} . + * + * @example samples/V1/VertexRagServiceClient/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 VertexRagServiceClient::listLocationsAsync()} . + * + * @example samples/V1/VertexRagServiceClient/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 VertexRagServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/VertexRagServiceClient/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 VertexRagServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/VertexRagServiceClient/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 VertexRagServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/VertexRagServiceClient/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/ClientConnectionConfig.php b/AiPlatform/src/V1/ClientConnectionConfig.php new file mode 100644 index 000000000000..5a38134c16f0 --- /dev/null +++ b/AiPlatform/src/V1/ClientConnectionConfig.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.ClientConnectionConfig + */ +class ClientConnectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Customizable online prediction request timeout. + * + * Generated from protobuf field .google.protobuf.Duration inference_timeout = 1; + */ + protected $inference_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $inference_timeout + * Customizable online prediction request timeout. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Endpoint::initOnce(); + parent::__construct($data); + } + + /** + * Customizable online prediction request timeout. + * + * Generated from protobuf field .google.protobuf.Duration inference_timeout = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getInferenceTimeout() + { + return $this->inference_timeout; + } + + public function hasInferenceTimeout() + { + return isset($this->inference_timeout); + } + + public function clearInferenceTimeout() + { + unset($this->inference_timeout); + } + + /** + * Customizable online prediction request timeout. + * + * Generated from protobuf field .google.protobuf.Duration inference_timeout = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setInferenceTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->inference_timeout = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CorpusStatus.php b/AiPlatform/src/V1/CorpusStatus.php new file mode 100644 index 000000000000..79e0c5a9302b --- /dev/null +++ b/AiPlatform/src/V1/CorpusStatus.php @@ -0,0 +1,101 @@ +google.cloud.aiplatform.v1.CorpusStatus + */ +class CorpusStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. RagCorpus life state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. RagCorpus life state. + * @type string $error_status + * Output only. Only when the `state` field is ERROR. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Output only. RagCorpus life state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. RagCorpus life state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\CorpusStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getErrorStatus() + { + return $this->error_status; + } + + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setErrorStatus($var) + { + GPBUtil::checkString($var, True); + $this->error_status = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CorpusStatus/State.php b/AiPlatform/src/V1/CorpusStatus/State.php new file mode 100644 index 000000000000..eee3165454dc --- /dev/null +++ b/AiPlatform/src/V1/CorpusStatus/State.php @@ -0,0 +1,70 @@ +google.cloud.aiplatform.v1.CorpusStatus.State + */ +class State +{ + /** + * This state is not supposed to happen. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * RagCorpus resource entry is initialized, but hasn't done validation. + * + * Generated from protobuf enum INITIALIZED = 1; + */ + const INITIALIZED = 1; + /** + * RagCorpus is provisioned successfully and is ready to serve. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * RagCorpus is in a problematic situation. + * See `error_message` field for details. + * + * Generated from protobuf enum ERROR = 3; + */ + const ERROR = 3; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::INITIALIZED => 'INITIALIZED', + self::ACTIVE => 'ACTIVE', + self::ERROR => 'ERROR', + ]; + + 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/CorroborateContentRequest.php b/AiPlatform/src/V1/CorroborateContentRequest.php new file mode 100644 index 000000000000..e1bfbc6daeab --- /dev/null +++ b/AiPlatform/src/V1/CorroborateContentRequest.php @@ -0,0 +1,236 @@ +google.cloud.aiplatform.v1.CorroborateContentRequest + */ +class CorroborateContentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to corroborate text. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Input content to corroborate, only text format is supported for + * now. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $content = null; + /** + * Optional. Facts used to generate the text can also be used to corroborate + * the text. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $facts; + /** + * Optional. Parameters that can be set to override default settings per + * request. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorroborateContentRequest.Parameters parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parameters = null; + + /** + * @param string $parent Required. The resource name of the Location from which to corroborate text. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. Please see + * {@see VertexRagServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\Content $content Optional. Input content to corroborate, only text format is supported for + * now. + * @param \Google\Cloud\AIPlatform\V1\Fact[] $facts Optional. Facts used to generate the text can also be used to corroborate + * the text. + * + * @return \Google\Cloud\AIPlatform\V1\CorroborateContentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Content $content, array $facts): self + { + return (new self()) + ->setParent($parent) + ->setContent($content) + ->setFacts($facts); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location from which to corroborate text. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\AIPlatform\V1\Content $content + * Optional. Input content to corroborate, only text format is supported for + * now. + * @type array<\Google\Cloud\AIPlatform\V1\Fact>|\Google\Protobuf\Internal\RepeatedField $facts + * Optional. Facts used to generate the text can also be used to corroborate + * the text. + * @type \Google\Cloud\AIPlatform\V1\CorroborateContentRequest\Parameters $parameters + * Optional. Parameters that can be set to override default settings per + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location from which to corroborate text. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to corroborate text. + * The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Input content to corroborate, only text format is supported for + * now. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\Content|null + */ + public function getContent() + { + return $this->content; + } + + public function hasContent() + { + return isset($this->content); + } + + public function clearContent() + { + unset($this->content); + } + + /** + * Optional. Input content to corroborate, only text format is supported for + * now. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content content = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\Content $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Content::class); + $this->content = $var; + + return $this; + } + + /** + * Optional. Facts used to generate the text can also be used to corroborate + * the text. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFacts() + { + return $this->facts; + } + + /** + * Optional. Facts used to generate the text can also be used to corroborate + * the text. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Fact facts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\AIPlatform\V1\Fact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Fact::class); + $this->facts = $arr; + + return $this; + } + + /** + * Optional. Parameters that can be set to override default settings per + * request. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorroborateContentRequest.Parameters parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\CorroborateContentRequest\Parameters|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * Optional. Parameters that can be set to override default settings per + * request. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorroborateContentRequest.Parameters parameters = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\CorroborateContentRequest\Parameters $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CorroborateContentRequest\Parameters::class); + $this->parameters = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CorroborateContentRequest/Parameters.php b/AiPlatform/src/V1/CorroborateContentRequest/Parameters.php new file mode 100644 index 000000000000..ebcf2996a857 --- /dev/null +++ b/AiPlatform/src/V1/CorroborateContentRequest/Parameters.php @@ -0,0 +1,72 @@ +google.cloud.aiplatform.v1.CorroborateContentRequest.Parameters + */ +class Parameters extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Only return claims with citation score larger than the + * threshold. + * + * Generated from protobuf field double citation_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $citation_threshold = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $citation_threshold + * Optional. Only return claims with citation score larger than the + * threshold. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Only return claims with citation score larger than the + * threshold. + * + * Generated from protobuf field double citation_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCitationThreshold() + { + return $this->citation_threshold; + } + + /** + * Optional. Only return claims with citation score larger than the + * threshold. + * + * Generated from protobuf field double citation_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCitationThreshold($var) + { + GPBUtil::checkDouble($var); + $this->citation_threshold = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/CorroborateContentResponse.php b/AiPlatform/src/V1/CorroborateContentResponse.php new file mode 100644 index 000000000000..6b33d845b6f5 --- /dev/null +++ b/AiPlatform/src/V1/CorroborateContentResponse.php @@ -0,0 +1,119 @@ +google.cloud.aiplatform.v1.CorroborateContentResponse + */ +class CorroborateContentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Confidence score of corroborating content. Value is [0,1] with 1 is the + * most confidence. + * + * Generated from protobuf field optional float corroboration_score = 1; + */ + protected $corroboration_score = null; + /** + * Claims that are extracted from the input content and facts that support the + * claims. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Claim claims = 2; + */ + private $claims; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $corroboration_score + * Confidence score of corroborating content. Value is [0,1] with 1 is the + * most confidence. + * @type array<\Google\Cloud\AIPlatform\V1\Claim>|\Google\Protobuf\Internal\RepeatedField $claims + * Claims that are extracted from the input content and facts that support the + * claims. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Confidence score of corroborating content. Value is [0,1] with 1 is the + * most confidence. + * + * Generated from protobuf field optional float corroboration_score = 1; + * @return float + */ + public function getCorroborationScore() + { + return isset($this->corroboration_score) ? $this->corroboration_score : 0.0; + } + + public function hasCorroborationScore() + { + return isset($this->corroboration_score); + } + + public function clearCorroborationScore() + { + unset($this->corroboration_score); + } + + /** + * Confidence score of corroborating content. Value is [0,1] with 1 is the + * most confidence. + * + * Generated from protobuf field optional float corroboration_score = 1; + * @param float $var + * @return $this + */ + public function setCorroborationScore($var) + { + GPBUtil::checkFloat($var); + $this->corroboration_score = $var; + + return $this; + } + + /** + * Claims that are extracted from the input content and facts that support the + * claims. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Claim claims = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClaims() + { + return $this->claims; + } + + /** + * Claims that are extracted from the input content and facts that support the + * claims. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Claim claims = 2; + * @param array<\Google\Cloud\AIPlatform\V1\Claim>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClaims($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Claim::class); + $this->claims = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreateRagCorpusOperationMetadata.php b/AiPlatform/src/V1/CreateRagCorpusOperationMetadata.php new file mode 100644 index 000000000000..3ea8ea2da010 --- /dev/null +++ b/AiPlatform/src/V1/CreateRagCorpusOperationMetadata.php @@ -0,0 +1,78 @@ +google.cloud.aiplatform.v1.CreateRagCorpusOperationMetadata + */ +class CreateRagCorpusOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + protected $generic_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreateRagCorpusRequest.php b/AiPlatform/src/V1/CreateRagCorpusRequest.php new file mode 100644 index 000000000000..0e965bcb7558 --- /dev/null +++ b/AiPlatform/src/V1/CreateRagCorpusRequest.php @@ -0,0 +1,133 @@ +google.cloud.aiplatform.v1.CreateRagCorpusRequest + */ +class CreateRagCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to create the RagCorpus in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The RagCorpus to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rag_corpus = null; + + /** + * @param string $parent Required. The resource name of the Location to create the RagCorpus in. + * Format: `projects/{project}/locations/{location}` + * Please see {@see VertexRagDataServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\RagCorpus $ragCorpus Required. The RagCorpus to create. + * + * @return \Google\Cloud\AIPlatform\V1\CreateRagCorpusRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\RagCorpus $ragCorpus): self + { + return (new self()) + ->setParent($parent) + ->setRagCorpus($ragCorpus); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to create the RagCorpus in. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\AIPlatform\V1\RagCorpus $rag_corpus + * Required. The RagCorpus to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to create the RagCorpus in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to create the RagCorpus in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The RagCorpus to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\RagCorpus|null + */ + public function getRagCorpus() + { + return $this->rag_corpus; + } + + public function hasRagCorpus() + { + return isset($this->rag_corpus); + } + + public function clearRagCorpus() + { + unset($this->rag_corpus); + } + + /** + * Required. The RagCorpus to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\RagCorpus $var + * @return $this + */ + public function setRagCorpus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagCorpus::class); + $this->rag_corpus = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeleteRagCorpusRequest.php b/AiPlatform/src/V1/DeleteRagCorpusRequest.php new file mode 100644 index 000000000000..bc25230cdebc --- /dev/null +++ b/AiPlatform/src/V1/DeleteRagCorpusRequest.php @@ -0,0 +1,134 @@ +google.cloud.aiplatform.v1.DeleteRagCorpusRequest + */ +class DeleteRagCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagCorpus resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If set to true, any RagFiles in this RagCorpus will also be + * deleted. Otherwise, the request will only work if the RagCorpus has no + * RagFiles. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the RagCorpus resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * Please see {@see VertexRagDataServiceClient::ragCorpusName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\DeleteRagCorpusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the RagCorpus resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type bool $force + * Optional. If set to true, any RagFiles in this RagCorpus will also be + * deleted. Otherwise, the request will only work if the RagCorpus has no + * RagFiles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagCorpus resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the RagCorpus resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If set to true, any RagFiles in this RagCorpus will also be + * deleted. Otherwise, the request will only work if the RagCorpus has no + * RagFiles. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any RagFiles in this RagCorpus will also be + * deleted. Otherwise, the request will only work if the RagCorpus has no + * RagFiles. + * + * Generated from protobuf field bool force = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeleteRagFileRequest.php b/AiPlatform/src/V1/DeleteRagFileRequest.php new file mode 100644 index 000000000000..e872d78a2cd2 --- /dev/null +++ b/AiPlatform/src/V1/DeleteRagFileRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.DeleteRagFileRequest + */ +class DeleteRagFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagFile resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the RagFile resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * Please see {@see VertexRagDataServiceClient::ragFileName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\DeleteRagFileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the RagFile resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagFile resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the RagFile resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DirectUploadSource.php b/AiPlatform/src/V1/DirectUploadSource.php new file mode 100644 index 000000000000..4ad4b3cd7acb --- /dev/null +++ b/AiPlatform/src/V1/DirectUploadSource.php @@ -0,0 +1,33 @@ +google.cloud.aiplatform.v1.DirectUploadSource + */ +class DirectUploadSource 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\Io::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/Endpoint.php b/AiPlatform/src/V1/Endpoint.php index a332b1774f4c..b908915214eb 100644 --- a/AiPlatform/src/V1/Endpoint.php +++ b/AiPlatform/src/V1/Endpoint.php @@ -170,6 +170,12 @@ class Endpoint extends \Google\Protobuf\Internal\Message * Generated from protobuf field string dedicated_endpoint_dns = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $dedicated_endpoint_dns = ''; + /** + * Configurations that are applied to the endpoint for online prediction. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ClientConnectionConfig client_connection_config = 23; + */ + protected $client_connection_config = null; /** * Output only. Reserved for future use. * @@ -274,6 +280,8 @@ class Endpoint extends \Google\Protobuf\Internal\Message * dedicated_endpoint_enabled is true. * Format: * `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`. + * @type \Google\Cloud\AIPlatform\V1\ClientConnectionConfig $client_connection_config + * Configurations that are applied to the endpoint for online prediction. * @type bool $satisfies_pzs * Output only. Reserved for future use. * @type bool $satisfies_pzi @@ -883,6 +891,42 @@ public function setDedicatedEndpointDns($var) return $this; } + /** + * Configurations that are applied to the endpoint for online prediction. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ClientConnectionConfig client_connection_config = 23; + * @return \Google\Cloud\AIPlatform\V1\ClientConnectionConfig|null + */ + public function getClientConnectionConfig() + { + return $this->client_connection_config; + } + + public function hasClientConnectionConfig() + { + return isset($this->client_connection_config); + } + + public function clearClientConnectionConfig() + { + unset($this->client_connection_config); + } + + /** + * Configurations that are applied to the endpoint for online prediction. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ClientConnectionConfig client_connection_config = 23; + * @param \Google\Cloud\AIPlatform\V1\ClientConnectionConfig $var + * @return $this + */ + public function setClientConnectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ClientConnectionConfig::class); + $this->client_connection_config = $var; + + return $this; + } + /** * Output only. Reserved for future use. * diff --git a/AiPlatform/src/V1/Fact.php b/AiPlatform/src/V1/Fact.php new file mode 100644 index 000000000000..e9b74550ba1c --- /dev/null +++ b/AiPlatform/src/V1/Fact.php @@ -0,0 +1,328 @@ +google.cloud.aiplatform.v1.Fact + */ +class Fact extends \Google\Protobuf\Internal\Message +{ + /** + * Query that is used to retrieve this fact. + * + * Generated from protobuf field optional string query = 1; + */ + protected $query = null; + /** + * If present, it refers to the title of this fact. + * + * Generated from protobuf field optional string title = 2; + */ + protected $title = null; + /** + * If present, this uri links to the source of the fact. + * + * Generated from protobuf field optional string uri = 3; + */ + protected $uri = null; + /** + * If present, the summary/snippet of the fact. + * + * Generated from protobuf field optional string summary = 4; + */ + protected $summary = null; + /** + * If present, the distance between the query vector and this fact vector. + * + * Generated from protobuf field optional double vector_distance = 5 [deprecated = true]; + * @deprecated + */ + protected $vector_distance = null; + /** + * If present, according to the underlying Vector DB and the selected metric + * type, the score can be either the distance or the similarity between the + * query and the fact and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the fact. The larger the distance, the less + * relevant the fact is to the query. The range is [0, 2], while 0 means the + * most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Query that is used to retrieve this fact. + * @type string $title + * If present, it refers to the title of this fact. + * @type string $uri + * If present, this uri links to the source of the fact. + * @type string $summary + * If present, the summary/snippet of the fact. + * @type float $vector_distance + * If present, the distance between the query vector and this fact vector. + * @type float $score + * If present, according to the underlying Vector DB and the selected metric + * type, the score can be either the distance or the similarity between the + * query and the fact and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the fact. The larger the distance, the less + * relevant the fact is to the query. The range is [0, 2], while 0 means the + * most relevant and 2 means the least relevant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Query that is used to retrieve this fact. + * + * Generated from protobuf field optional string query = 1; + * @return string + */ + public function getQuery() + { + return isset($this->query) ? $this->query : ''; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Query that is used to retrieve this fact. + * + * Generated from protobuf field optional string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * If present, it refers to the title of this fact. + * + * Generated from protobuf field optional string title = 2; + * @return string + */ + public function getTitle() + { + return isset($this->title) ? $this->title : ''; + } + + public function hasTitle() + { + return isset($this->title); + } + + public function clearTitle() + { + unset($this->title); + } + + /** + * If present, it refers to the title of this fact. + * + * Generated from protobuf field optional string title = 2; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * If present, this uri links to the source of the fact. + * + * Generated from protobuf field optional string uri = 3; + * @return string + */ + public function getUri() + { + return isset($this->uri) ? $this->uri : ''; + } + + public function hasUri() + { + return isset($this->uri); + } + + public function clearUri() + { + unset($this->uri); + } + + /** + * If present, this uri links to the source of the fact. + * + * Generated from protobuf field optional string uri = 3; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * If present, the summary/snippet of the fact. + * + * Generated from protobuf field optional string summary = 4; + * @return string + */ + public function getSummary() + { + return isset($this->summary) ? $this->summary : ''; + } + + public function hasSummary() + { + return isset($this->summary); + } + + public function clearSummary() + { + unset($this->summary); + } + + /** + * If present, the summary/snippet of the fact. + * + * Generated from protobuf field optional string summary = 4; + * @param string $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkString($var, True); + $this->summary = $var; + + return $this; + } + + /** + * If present, the distance between the query vector and this fact vector. + * + * Generated from protobuf field optional double vector_distance = 5 [deprecated = true]; + * @return float + * @deprecated + */ + public function getVectorDistance() + { + @trigger_error('vector_distance is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance) ? $this->vector_distance : 0.0; + } + + public function hasVectorDistance() + { + @trigger_error('vector_distance is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance); + } + + public function clearVectorDistance() + { + @trigger_error('vector_distance is deprecated.', E_USER_DEPRECATED); + unset($this->vector_distance); + } + + /** + * If present, the distance between the query vector and this fact vector. + * + * Generated from protobuf field optional double vector_distance = 5 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setVectorDistance($var) + { + @trigger_error('vector_distance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkDouble($var); + $this->vector_distance = $var; + + return $this; + } + + /** + * If present, according to the underlying Vector DB and the selected metric + * type, the score can be either the distance or the similarity between the + * query and the fact and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the fact. The larger the distance, the less + * relevant the fact is to the query. The range is [0, 2], while 0 means the + * most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + * @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); + } + + /** + * If present, according to the underlying Vector DB and the selected metric + * type, the score can be either the distance or the similarity between the + * query and the fact and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the fact. The larger the distance, the less + * relevant the fact is to the query. The range is [0, 2], while 0 means the + * most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkDouble($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FileStatus.php b/AiPlatform/src/V1/FileStatus.php new file mode 100644 index 000000000000..18a82f13f43d --- /dev/null +++ b/AiPlatform/src/V1/FileStatus.php @@ -0,0 +1,101 @@ +google.cloud.aiplatform.v1.FileStatus + */ +class FileStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. RagFile state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. RagFile state. + * @type string $error_status + * Output only. Only when the `state` field is ERROR. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Output only. RagFile state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. RagFile state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\FileStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getErrorStatus() + { + return $this->error_status; + } + + /** + * Output only. Only when the `state` field is ERROR. + * + * Generated from protobuf field string error_status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setErrorStatus($var) + { + GPBUtil::checkString($var, True); + $this->error_status = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/FileStatus/State.php b/AiPlatform/src/V1/FileStatus/State.php new file mode 100644 index 000000000000..f06872e2bbee --- /dev/null +++ b/AiPlatform/src/V1/FileStatus/State.php @@ -0,0 +1,63 @@ +google.cloud.aiplatform.v1.FileStatus.State + */ +class State +{ + /** + * RagFile state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * RagFile resource has been created and indexed successfully. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * RagFile resource is in a problematic state. + * See `error_message` field for details. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::ERROR => 'ERROR', + ]; + + 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/GetRagCorpusRequest.php b/AiPlatform/src/V1/GetRagCorpusRequest.php new file mode 100644 index 000000000000..1d1a5e1e4c31 --- /dev/null +++ b/AiPlatform/src/V1/GetRagCorpusRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.GetRagCorpusRequest + */ +class GetRagCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagCorpus resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the RagCorpus resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * Please see {@see VertexRagDataServiceClient::ragCorpusName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetRagCorpusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the RagCorpus resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagCorpus resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the RagCorpus resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GetRagFileRequest.php b/AiPlatform/src/V1/GetRagFileRequest.php new file mode 100644 index 000000000000..c2180445e2f6 --- /dev/null +++ b/AiPlatform/src/V1/GetRagFileRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.GetRagFileRequest + */ +class GetRagFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagFile resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the RagFile resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * Please see {@see VertexRagDataServiceClient::ragFileName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetRagFileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the RagFile resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagFile resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the RagFile resource. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GoogleDriveSource.php b/AiPlatform/src/V1/GoogleDriveSource.php new file mode 100644 index 000000000000..2e21e6d9416f --- /dev/null +++ b/AiPlatform/src/V1/GoogleDriveSource.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.GoogleDriveSource + */ +class GoogleDriveSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Drive resource IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\GoogleDriveSource\ResourceId>|\Google\Protobuf\Internal\RepeatedField $resource_ids + * Required. Google Drive resource IDs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Drive resource IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceIds() + { + return $this->resource_ids; + } + + /** + * Required. Google Drive resource IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId resource_ids = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\GoogleDriveSource\ResourceId>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\GoogleDriveSource\ResourceId::class); + $this->resource_ids = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GoogleDriveSource/ResourceId.php b/AiPlatform/src/V1/GoogleDriveSource/ResourceId.php new file mode 100644 index 000000000000..b6d7a5d670c7 --- /dev/null +++ b/AiPlatform/src/V1/GoogleDriveSource/ResourceId.php @@ -0,0 +1,102 @@ +google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId + */ +class ResourceId extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of the Google Drive resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_type = 0; + /** + * Required. The ID of the Google Drive resource. + * + * Generated from protobuf field string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $resource_type + * Required. The type of the Google Drive resource. + * @type string $resource_id + * Required. The ID of the Google Drive resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of the Google Drive resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Required. The type of the Google Drive resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId.ResourceType resource_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\GoogleDriveSource\ResourceId\ResourceType::class); + $this->resource_type = $var; + + return $this; + } + + /** + * Required. The ID of the Google Drive resource. + * + * Generated from protobuf field string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResourceId() + { + return $this->resource_id; + } + + /** + * Required. The ID of the Google Drive resource. + * + * Generated from protobuf field string resource_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResourceId($var) + { + GPBUtil::checkString($var, True); + $this->resource_id = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/GoogleDriveSource/ResourceId/ResourceType.php b/AiPlatform/src/V1/GoogleDriveSource/ResourceId/ResourceType.php new file mode 100644 index 000000000000..926719a92131 --- /dev/null +++ b/AiPlatform/src/V1/GoogleDriveSource/ResourceId/ResourceType.php @@ -0,0 +1,62 @@ +google.cloud.aiplatform.v1.GoogleDriveSource.ResourceId.ResourceType + */ +class ResourceType +{ + /** + * Unspecified resource type. + * + * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESOURCE_TYPE_UNSPECIFIED = 0; + /** + * File resource type. + * + * Generated from protobuf enum RESOURCE_TYPE_FILE = 1; + */ + const RESOURCE_TYPE_FILE = 1; + /** + * Folder resource type. + * + * Generated from protobuf enum RESOURCE_TYPE_FOLDER = 2; + */ + const RESOURCE_TYPE_FOLDER = 2; + + private static $valueToName = [ + self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', + self::RESOURCE_TYPE_FILE => 'RESOURCE_TYPE_FILE', + self::RESOURCE_TYPE_FOLDER => 'RESOURCE_TYPE_FOLDER', + ]; + + 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/ImportRagFilesConfig.php b/AiPlatform/src/V1/ImportRagFilesConfig.php new file mode 100644 index 000000000000..270215a677b5 --- /dev/null +++ b/AiPlatform/src/V1/ImportRagFilesConfig.php @@ -0,0 +1,419 @@ +google.cloud.aiplatform.v1.ImportRagFilesConfig + */ +class ImportRagFilesConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 16; + */ + protected $rag_file_transformation_config = null; + /** + * Optional. The max number of queries per minute that this job is allowed to + * make to the embedding model specified on the corpus. This value is specific + * to this job and not shared across other import jobs. Consult the Quotas + * page on the project to set an appropriate value here. + * If unspecified, a default value of 1,000 QPM would be used. + * + * Generated from protobuf field int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_embedding_requests_per_min = 0; + protected $import_source; + protected $partial_failure_sink; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GcsSource $gcs_source + * Google Cloud Storage location. Supports importing individual files as + * well as entire Google Cloud Storage directories. Sample formats: + * - `gs://bucket_name/my_directory/object_name/my_file.txt` + * - `gs://bucket_name/my_directory` + * @type \Google\Cloud\AIPlatform\V1\GoogleDriveSource $google_drive_source + * Google Drive location. Supports importing individual files as + * well as Google Drive folders. + * @type \Google\Cloud\AIPlatform\V1\SlackSource $slack_source + * Slack channels with their corresponding access tokens. + * @type \Google\Cloud\AIPlatform\V1\JiraSource $jira_source + * Jira queries with their corresponding authentication. + * @type \Google\Cloud\AIPlatform\V1\SharePointSources $share_point_sources + * SharePoint sources. + * @type \Google\Cloud\AIPlatform\V1\GcsDestination $partial_failure_gcs_sink + * The Cloud Storage path to write partial failures to. + * Deprecated. Prefer to use `import_result_gcs_sink`. + * @type \Google\Cloud\AIPlatform\V1\BigQueryDestination $partial_failure_bigquery_sink + * The BigQuery destination to write partial failures to. It should be a + * bigquery table resource name (e.g. + * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the + * table does not exist, it will be created with the expected schema. If the + * table exists, the schema will be validated and data will be added to this + * existing table. + * Deprecated. Prefer to use `import_result_bq_sink`. + * @type \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig $rag_file_transformation_config + * Specifies the transformation config for RagFiles. + * @type int $max_embedding_requests_per_min + * Optional. The max number of queries per minute that this job is allowed to + * make to the embedding model specified on the corpus. This value is specific + * to this job and not shared across other import jobs. Consult the Quotas + * page on the project to set an appropriate value here. + * If unspecified, a default value of 1,000 QPM would be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage location. Supports importing individual files as + * well as entire Google Cloud Storage directories. Sample formats: + * - `gs://bucket_name/my_directory/object_name/my_file.txt` + * - `gs://bucket_name/my_directory` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * @return \Google\Cloud\AIPlatform\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(2); + } + + public function hasGcsSource() + { + return $this->hasOneof(2); + } + + /** + * Google Cloud Storage location. Supports importing individual files as + * well as entire Google Cloud Storage directories. Sample formats: + * - `gs://bucket_name/my_directory/object_name/my_file.txt` + * - `gs://bucket_name/my_directory` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsSource gcs_source = 2; + * @param \Google\Cloud\AIPlatform\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GcsSource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Google Drive location. Supports importing individual files as + * well as Google Drive folders. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource google_drive_source = 3; + * @return \Google\Cloud\AIPlatform\V1\GoogleDriveSource|null + */ + public function getGoogleDriveSource() + { + return $this->readOneof(3); + } + + public function hasGoogleDriveSource() + { + return $this->hasOneof(3); + } + + /** + * Google Drive location. Supports importing individual files as + * well as Google Drive folders. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource google_drive_source = 3; + * @param \Google\Cloud\AIPlatform\V1\GoogleDriveSource $var + * @return $this + */ + public function setGoogleDriveSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GoogleDriveSource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Slack channels with their corresponding access tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SlackSource slack_source = 6; + * @return \Google\Cloud\AIPlatform\V1\SlackSource|null + */ + public function getSlackSource() + { + return $this->readOneof(6); + } + + public function hasSlackSource() + { + return $this->hasOneof(6); + } + + /** + * Slack channels with their corresponding access tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SlackSource slack_source = 6; + * @param \Google\Cloud\AIPlatform\V1\SlackSource $var + * @return $this + */ + public function setSlackSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SlackSource::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Jira queries with their corresponding authentication. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JiraSource jira_source = 7; + * @return \Google\Cloud\AIPlatform\V1\JiraSource|null + */ + public function getJiraSource() + { + return $this->readOneof(7); + } + + public function hasJiraSource() + { + return $this->hasOneof(7); + } + + /** + * Jira queries with their corresponding authentication. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JiraSource jira_source = 7; + * @param \Google\Cloud\AIPlatform\V1\JiraSource $var + * @return $this + */ + public function setJiraSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\JiraSource::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * SharePoint sources. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SharePointSources share_point_sources = 13; + * @return \Google\Cloud\AIPlatform\V1\SharePointSources|null + */ + public function getSharePointSources() + { + return $this->readOneof(13); + } + + public function hasSharePointSources() + { + return $this->hasOneof(13); + } + + /** + * SharePoint sources. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SharePointSources share_point_sources = 13; + * @param \Google\Cloud\AIPlatform\V1\SharePointSources $var + * @return $this + */ + public function setSharePointSources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SharePointSources::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * The Cloud Storage path to write partial failures to. + * Deprecated. Prefer to use `import_result_gcs_sink`. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; + * @return \Google\Cloud\AIPlatform\V1\GcsDestination|null + * @deprecated + */ + public function getPartialFailureGcsSink() + { + @trigger_error('partial_failure_gcs_sink is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(11); + } + + public function hasPartialFailureGcsSink() + { + @trigger_error('partial_failure_gcs_sink is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(11); + } + + /** + * The Cloud Storage path to write partial failures to. + * Deprecated. Prefer to use `import_result_gcs_sink`. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsDestination partial_failure_gcs_sink = 11 [deprecated = true]; + * @param \Google\Cloud\AIPlatform\V1\GcsDestination $var + * @return $this + * @deprecated + */ + public function setPartialFailureGcsSink($var) + { + @trigger_error('partial_failure_gcs_sink is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GcsDestination::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The BigQuery destination to write partial failures to. It should be a + * bigquery table resource name (e.g. + * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the + * table does not exist, it will be created with the expected schema. If the + * table exists, the schema will be validated and data will be added to this + * existing table. + * Deprecated. Prefer to use `import_result_bq_sink`. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; + * @return \Google\Cloud\AIPlatform\V1\BigQueryDestination|null + * @deprecated + */ + public function getPartialFailureBigquerySink() + { + @trigger_error('partial_failure_bigquery_sink is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(12); + } + + public function hasPartialFailureBigquerySink() + { + @trigger_error('partial_failure_bigquery_sink is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(12); + } + + /** + * The BigQuery destination to write partial failures to. It should be a + * bigquery table resource name (e.g. + * "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the + * table does not exist, it will be created with the expected schema. If the + * table exists, the schema will be validated and data will be added to this + * existing table. + * Deprecated. Prefer to use `import_result_bq_sink`. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.BigQueryDestination partial_failure_bigquery_sink = 12 [deprecated = true]; + * @param \Google\Cloud\AIPlatform\V1\BigQueryDestination $var + * @return $this + * @deprecated + */ + public function setPartialFailureBigquerySink($var) + { + @trigger_error('partial_failure_bigquery_sink is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\BigQueryDestination::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 16; + * @return \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig|null + */ + public function getRagFileTransformationConfig() + { + return $this->rag_file_transformation_config; + } + + public function hasRagFileTransformationConfig() + { + return isset($this->rag_file_transformation_config); + } + + public function clearRagFileTransformationConfig() + { + unset($this->rag_file_transformation_config); + } + + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 16; + * @param \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig $var + * @return $this + */ + public function setRagFileTransformationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig::class); + $this->rag_file_transformation_config = $var; + + return $this; + } + + /** + * Optional. The max number of queries per minute that this job is allowed to + * make to the embedding model specified on the corpus. This value is specific + * to this job and not shared across other import jobs. Consult the Quotas + * page on the project to set an appropriate value here. + * If unspecified, a default value of 1,000 QPM would be used. + * + * Generated from protobuf field int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxEmbeddingRequestsPerMin() + { + return $this->max_embedding_requests_per_min; + } + + /** + * Optional. The max number of queries per minute that this job is allowed to + * make to the embedding model specified on the corpus. This value is specific + * to this job and not shared across other import jobs. Consult the Quotas + * page on the project to set an appropriate value here. + * If unspecified, a default value of 1,000 QPM would be used. + * + * Generated from protobuf field int32 max_embedding_requests_per_min = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxEmbeddingRequestsPerMin($var) + { + GPBUtil::checkInt32($var); + $this->max_embedding_requests_per_min = $var; + + return $this; + } + + /** + * @return string + */ + public function getImportSource() + { + return $this->whichOneof("import_source"); + } + + /** + * @return string + */ + public function getPartialFailureSink() + { + return $this->whichOneof("partial_failure_sink"); + } + +} + diff --git a/AiPlatform/src/V1/ImportRagFilesOperationMetadata.php b/AiPlatform/src/V1/ImportRagFilesOperationMetadata.php new file mode 100644 index 000000000000..f58aebedcc6b --- /dev/null +++ b/AiPlatform/src/V1/ImportRagFilesOperationMetadata.php @@ -0,0 +1,198 @@ +google.cloud.aiplatform.v1.ImportRagFilesOperationMetadata + */ +class ImportRagFilesOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + protected $generic_metadata = null; + /** + * The resource ID of RagCorpus that this operation is executed on. + * + * Generated from protobuf field int64 rag_corpus_id = 2; + */ + protected $rag_corpus_id = 0; + /** + * Output only. The config that was passed in the ImportRagFilesRequest. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_rag_files_config = null; + /** + * The progress percentage of the operation. Value is in the range [0, 100]. + * This percentage is calculated as follows: + * progress_percentage = 100 * (successes + failures + skips) / total + * + * Generated from protobuf field int32 progress_percentage = 4; + */ + protected $progress_percentage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * @type int|string $rag_corpus_id + * The resource ID of RagCorpus that this operation is executed on. + * @type \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $import_rag_files_config + * Output only. The config that was passed in the ImportRagFilesRequest. + * @type int $progress_percentage + * The progress percentage of the operation. Value is in the range [0, 100]. + * This percentage is calculated as follows: + * progress_percentage = 100 * (successes + failures + skips) / total + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * The resource ID of RagCorpus that this operation is executed on. + * + * Generated from protobuf field int64 rag_corpus_id = 2; + * @return int|string + */ + public function getRagCorpusId() + { + return $this->rag_corpus_id; + } + + /** + * The resource ID of RagCorpus that this operation is executed on. + * + * Generated from protobuf field int64 rag_corpus_id = 2; + * @param int|string $var + * @return $this + */ + public function setRagCorpusId($var) + { + GPBUtil::checkInt64($var); + $this->rag_corpus_id = $var; + + return $this; + } + + /** + * Output only. The config that was passed in the ImportRagFilesRequest. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig|null + */ + public function getImportRagFilesConfig() + { + return $this->import_rag_files_config; + } + + public function hasImportRagFilesConfig() + { + return isset($this->import_rag_files_config); + } + + public function clearImportRagFilesConfig() + { + unset($this->import_rag_files_config); + } + + /** + * Output only. The config that was passed in the ImportRagFilesRequest. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $var + * @return $this + */ + public function setImportRagFilesConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig::class); + $this->import_rag_files_config = $var; + + return $this; + } + + /** + * The progress percentage of the operation. Value is in the range [0, 100]. + * This percentage is calculated as follows: + * progress_percentage = 100 * (successes + failures + skips) / total + * + * Generated from protobuf field int32 progress_percentage = 4; + * @return int + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + /** + * The progress percentage of the operation. Value is in the range [0, 100]. + * This percentage is calculated as follows: + * progress_percentage = 100 * (successes + failures + skips) / total + * + * Generated from protobuf field int32 progress_percentage = 4; + * @param int $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkInt32($var); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ImportRagFilesRequest.php b/AiPlatform/src/V1/ImportRagFilesRequest.php new file mode 100644 index 000000000000..a1cd245935e4 --- /dev/null +++ b/AiPlatform/src/V1/ImportRagFilesRequest.php @@ -0,0 +1,148 @@ +google.cloud.aiplatform.v1.ImportRagFilesRequest + */ +class ImportRagFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagCorpus resource into which to import files. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The config for the RagFiles to be synced and imported into the + * RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_rag_files_config = null; + + /** + * @param string $parent Required. The name of the RagCorpus resource into which to import files. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * Please see {@see VertexRagDataServiceClient::ragCorpusName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $importRagFilesConfig Required. The config for the RagFiles to be synced and imported into the + * RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + * + * @return \Google\Cloud\AIPlatform\V1\ImportRagFilesRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $importRagFilesConfig): self + { + return (new self()) + ->setParent($parent) + ->setImportRagFilesConfig($importRagFilesConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the RagCorpus resource into which to import files. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $import_rag_files_config + * Required. The config for the RagFiles to be synced and imported into the + * RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagCorpus resource into which to import files. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the RagCorpus resource into which to import files. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The config for the RagFiles to be synced and imported into the + * RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig|null + */ + public function getImportRagFilesConfig() + { + return $this->import_rag_files_config; + } + + public function hasImportRagFilesConfig() + { + return isset($this->import_rag_files_config); + } + + public function clearImportRagFilesConfig() + { + unset($this->import_rag_files_config); + } + + /** + * Required. The config for the RagFiles to be synced and imported into the + * RagCorpus. + * [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ImportRagFilesConfig import_rag_files_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig $var + * @return $this + */ + public function setImportRagFilesConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ImportRagFilesConfig::class); + $this->import_rag_files_config = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ImportRagFilesResponse.php b/AiPlatform/src/V1/ImportRagFilesResponse.php new file mode 100644 index 000000000000..5621800432b3 --- /dev/null +++ b/AiPlatform/src/V1/ImportRagFilesResponse.php @@ -0,0 +1,214 @@ +google.cloud.aiplatform.v1.ImportRagFilesResponse + */ +class ImportRagFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The number of RagFiles that had been imported into the RagCorpus. + * + * Generated from protobuf field int64 imported_rag_files_count = 1; + */ + protected $imported_rag_files_count = 0; + /** + * The number of RagFiles that had failed while importing into the RagCorpus. + * + * Generated from protobuf field int64 failed_rag_files_count = 2; + */ + protected $failed_rag_files_count = 0; + /** + * The number of RagFiles that was skipped while importing into the RagCorpus. + * + * Generated from protobuf field int64 skipped_rag_files_count = 3; + */ + protected $skipped_rag_files_count = 0; + protected $partial_failure_sink; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $partial_failures_gcs_path + * The Google Cloud Storage path into which the partial failures were + * written. + * @type string $partial_failures_bigquery_table + * The BigQuery table into which the partial failures were written. + * @type int|string $imported_rag_files_count + * The number of RagFiles that had been imported into the RagCorpus. + * @type int|string $failed_rag_files_count + * The number of RagFiles that had failed while importing into the RagCorpus. + * @type int|string $skipped_rag_files_count + * The number of RagFiles that was skipped while importing into the RagCorpus. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage path into which the partial failures were + * written. + * + * Generated from protobuf field string partial_failures_gcs_path = 4; + * @return string + */ + public function getPartialFailuresGcsPath() + { + return $this->readOneof(4); + } + + public function hasPartialFailuresGcsPath() + { + return $this->hasOneof(4); + } + + /** + * The Google Cloud Storage path into which the partial failures were + * written. + * + * Generated from protobuf field string partial_failures_gcs_path = 4; + * @param string $var + * @return $this + */ + public function setPartialFailuresGcsPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The BigQuery table into which the partial failures were written. + * + * Generated from protobuf field string partial_failures_bigquery_table = 5; + * @return string + */ + public function getPartialFailuresBigqueryTable() + { + return $this->readOneof(5); + } + + public function hasPartialFailuresBigqueryTable() + { + return $this->hasOneof(5); + } + + /** + * The BigQuery table into which the partial failures were written. + * + * Generated from protobuf field string partial_failures_bigquery_table = 5; + * @param string $var + * @return $this + */ + public function setPartialFailuresBigqueryTable($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The number of RagFiles that had been imported into the RagCorpus. + * + * Generated from protobuf field int64 imported_rag_files_count = 1; + * @return int|string + */ + public function getImportedRagFilesCount() + { + return $this->imported_rag_files_count; + } + + /** + * The number of RagFiles that had been imported into the RagCorpus. + * + * Generated from protobuf field int64 imported_rag_files_count = 1; + * @param int|string $var + * @return $this + */ + public function setImportedRagFilesCount($var) + { + GPBUtil::checkInt64($var); + $this->imported_rag_files_count = $var; + + return $this; + } + + /** + * The number of RagFiles that had failed while importing into the RagCorpus. + * + * Generated from protobuf field int64 failed_rag_files_count = 2; + * @return int|string + */ + public function getFailedRagFilesCount() + { + return $this->failed_rag_files_count; + } + + /** + * The number of RagFiles that had failed while importing into the RagCorpus. + * + * Generated from protobuf field int64 failed_rag_files_count = 2; + * @param int|string $var + * @return $this + */ + public function setFailedRagFilesCount($var) + { + GPBUtil::checkInt64($var); + $this->failed_rag_files_count = $var; + + return $this; + } + + /** + * The number of RagFiles that was skipped while importing into the RagCorpus. + * + * Generated from protobuf field int64 skipped_rag_files_count = 3; + * @return int|string + */ + public function getSkippedRagFilesCount() + { + return $this->skipped_rag_files_count; + } + + /** + * The number of RagFiles that was skipped while importing into the RagCorpus. + * + * Generated from protobuf field int64 skipped_rag_files_count = 3; + * @param int|string $var + * @return $this + */ + public function setSkippedRagFilesCount($var) + { + GPBUtil::checkInt64($var); + $this->skipped_rag_files_count = $var; + + return $this; + } + + /** + * @return string + */ + public function getPartialFailureSink() + { + return $this->whichOneof("partial_failure_sink"); + } + +} + diff --git a/AiPlatform/src/V1/JiraSource.php b/AiPlatform/src/V1/JiraSource.php new file mode 100644 index 000000000000..e2cb04ab7830 --- /dev/null +++ b/AiPlatform/src/V1/JiraSource.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.JiraSource + */ +class JiraSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Jira queries. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $jira_queries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\JiraSource\JiraQueries>|\Google\Protobuf\Internal\RepeatedField $jira_queries + * Required. The Jira queries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Jira queries. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJiraQueries() + { + return $this->jira_queries; + } + + /** + * Required. The Jira queries. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.JiraSource.JiraQueries jira_queries = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\JiraSource\JiraQueries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJiraQueries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\JiraSource\JiraQueries::class); + $this->jira_queries = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/JiraSource/JiraQueries.php b/AiPlatform/src/V1/JiraSource/JiraQueries.php new file mode 100644 index 000000000000..8201e15b78fe --- /dev/null +++ b/AiPlatform/src/V1/JiraSource/JiraQueries.php @@ -0,0 +1,234 @@ +google.cloud.aiplatform.v1.JiraSource.JiraQueries + */ +class JiraQueries extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Jira projects to import in their entirety. + * + * Generated from protobuf field repeated string projects = 3; + */ + private $projects; + /** + * A list of custom Jira queries to import. For information about JQL (Jira + * Query Language), see + * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + * + * Generated from protobuf field repeated string custom_queries = 4; + */ + private $custom_queries; + /** + * Required. The Jira email address. + * + * Generated from protobuf field string email = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $email = ''; + /** + * Required. The Jira server URI. + * + * Generated from protobuf field string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_uri = ''; + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Jira API key. See [Manage API tokens for your Atlassian + * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $api_key_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $projects + * A list of Jira projects to import in their entirety. + * @type array|\Google\Protobuf\Internal\RepeatedField $custom_queries + * A list of custom Jira queries to import. For information about JQL (Jira + * Query Language), see + * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + * @type string $email + * Required. The Jira email address. + * @type string $server_uri + * Required. The Jira server URI. + * @type \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $api_key_config + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Jira API key. See [Manage API tokens for your Atlassian + * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * A list of Jira projects to import in their entirety. + * + * Generated from protobuf field repeated string projects = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjects() + { + return $this->projects; + } + + /** + * A list of Jira projects to import in their entirety. + * + * Generated from protobuf field repeated string projects = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->projects = $arr; + + return $this; + } + + /** + * A list of custom Jira queries to import. For information about JQL (Jira + * Query Language), see + * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + * + * Generated from protobuf field repeated string custom_queries = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomQueries() + { + return $this->custom_queries; + } + + /** + * A list of custom Jira queries to import. For information about JQL (Jira + * Query Language), see + * https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + * + * Generated from protobuf field repeated string custom_queries = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomQueries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->custom_queries = $arr; + + return $this; + } + + /** + * Required. The Jira email address. + * + * Generated from protobuf field string email = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. The Jira email address. + * + * Generated from protobuf field string email = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Required. The Jira server URI. + * + * Generated from protobuf field string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServerUri() + { + return $this->server_uri; + } + + /** + * Required. The Jira server URI. + * + * Generated from protobuf field string server_uri = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServerUri($var) + { + GPBUtil::checkString($var, True); + $this->server_uri = $var; + + return $this; + } + + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Jira API key. See [Manage API tokens for your Atlassian + * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig|null + */ + public function getApiKeyConfig() + { + return $this->api_key_config; + } + + public function hasApiKeyConfig() + { + return isset($this->api_key_config); + } + + public function clearApiKeyConfig() + { + unset($this->api_key_config); + } + + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Jira API key. See [Manage API tokens for your Atlassian + * account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $var + * @return $this + */ + public function setApiKeyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig::class); + $this->api_key_config = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/ListRagCorporaRequest.php b/AiPlatform/src/V1/ListRagCorporaRequest.php new file mode 100644 index 000000000000..5890473e677c --- /dev/null +++ b/AiPlatform/src/V1/ListRagCorporaRequest.php @@ -0,0 +1,175 @@ +google.cloud.aiplatform.v1.ListRagCorporaRequest + */ +class ListRagCorporaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to list the + * RagCorpora. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the Location from which to list the + * RagCorpora. Format: `projects/{project}/locations/{location}` + * Please see {@see VertexRagDataServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListRagCorporaRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location from which to list the + * RagCorpora. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora] + * call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location from which to list the + * RagCorpora. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to list the + * RagCorpora. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListRagCorporaResponse.php b/AiPlatform/src/V1/ListRagCorporaResponse.php new file mode 100644 index 000000000000..85f414213c91 --- /dev/null +++ b/AiPlatform/src/V1/ListRagCorporaResponse.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.ListRagCorporaResponse + */ +class ListRagCorporaResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of RagCorpora in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagCorpus rag_corpora = 1; + */ + private $rag_corpora; + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\RagCorpus>|\Google\Protobuf\Internal\RepeatedField $rag_corpora + * List of RagCorpora in the requested page. + * @type string $next_page_token + * A token to retrieve the next page of results. + * Pass to + * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * List of RagCorpora in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagCorpus rag_corpora = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagCorpora() + { + return $this->rag_corpora; + } + + /** + * List of RagCorpora in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagCorpus rag_corpora = 1; + * @param array<\Google\Cloud\AIPlatform\V1\RagCorpus>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagCorpora($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RagCorpus::class); + $this->rag_corpora = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListRagFilesRequest.php b/AiPlatform/src/V1/ListRagFilesRequest.php new file mode 100644 index 000000000000..9651c99ecff1 --- /dev/null +++ b/AiPlatform/src/V1/ListRagFilesRequest.php @@ -0,0 +1,180 @@ +google.cloud.aiplatform.v1.ListRagFilesRequest + */ +class ListRagFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the RagCorpus from which to list the + * RagFiles. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the RagCorpus from which to list the + * RagFiles. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * Please see {@see VertexRagDataServiceClient::ragCorpusName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListRagFilesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the RagCorpus from which to list the + * RagFiles. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles] + * call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the RagCorpus from which to list the + * RagFiles. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the RagCorpus from which to list the + * RagFiles. Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token] + * of the previous + * [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles] + * call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListRagFilesResponse.php b/AiPlatform/src/V1/ListRagFilesResponse.php new file mode 100644 index 000000000000..788934f355af --- /dev/null +++ b/AiPlatform/src/V1/ListRagFilesResponse.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.ListRagFilesResponse + */ +class ListRagFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of RagFiles in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagFile rag_files = 1; + */ + private $rag_files; + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\RagFile>|\Google\Protobuf\Internal\RepeatedField $rag_files + * List of RagFiles in the requested page. + * @type string $next_page_token + * A token to retrieve the next page of results. + * Pass to + * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * List of RagFiles in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagFile rag_files = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagFiles() + { + return $this->rag_files; + } + + /** + * List of RagFiles in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagFile rag_files = 1; + * @param array<\Google\Cloud\AIPlatform\V1\RagFile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RagFile::class); + $this->rag_files = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookExecutionJob.php b/AiPlatform/src/V1/NotebookExecutionJob.php index df7c2a87b55a..e48e07ed3b96 100644 --- a/AiPlatform/src/V1/NotebookExecutionJob.php +++ b/AiPlatform/src/V1/NotebookExecutionJob.php @@ -110,6 +110,8 @@ class NotebookExecutionJob extends \Google\Protobuf\Internal\Message * The contents of an input notebook file. * @type string $notebook_runtime_template_resource_name * The NotebookRuntimeTemplate to source compute configuration from. + * @type \Google\Cloud\AIPlatform\V1\NotebookExecutionJob\CustomEnvironmentSpec $custom_environment_spec + * The custom compute configuration for an execution job. * @type string $gcs_output_uri * The Cloud Storage location to upload the result to. Format: * `gs://bucket-name` @@ -285,6 +287,37 @@ public function setNotebookRuntimeTemplateResourceName($var) return $this; } + /** + * The custom compute configuration for an execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpec custom_environment_spec = 16; + * @return \Google\Cloud\AIPlatform\V1\NotebookExecutionJob\CustomEnvironmentSpec|null + */ + public function getCustomEnvironmentSpec() + { + return $this->readOneof(16); + } + + public function hasCustomEnvironmentSpec() + { + return $this->hasOneof(16); + } + + /** + * The custom compute configuration for an execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpec custom_environment_spec = 16; + * @param \Google\Cloud\AIPlatform\V1\NotebookExecutionJob\CustomEnvironmentSpec $var + * @return $this + */ + public function setCustomEnvironmentSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookExecutionJob\CustomEnvironmentSpec::class); + $this->writeOneof(16, $var); + + return $this; + } + /** * The Cloud Storage location to upload the result to. Format: * `gs://bucket-name` diff --git a/AiPlatform/src/V1/NotebookExecutionJob/CustomEnvironmentSpec.php b/AiPlatform/src/V1/NotebookExecutionJob/CustomEnvironmentSpec.php new file mode 100644 index 000000000000..f87b52b6ee32 --- /dev/null +++ b/AiPlatform/src/V1/NotebookExecutionJob/CustomEnvironmentSpec.php @@ -0,0 +1,166 @@ +google.cloud.aiplatform.v1.NotebookExecutionJob.CustomEnvironmentSpec + */ +class CustomEnvironmentSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The specification of a single machine for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1; + */ + protected $machine_spec = null; + /** + * The specification of a persistent disk to attach for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec persistent_disk_spec = 2; + */ + protected $persistent_disk_spec = null; + /** + * The network configuration to use for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 3; + */ + protected $network_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\MachineSpec $machine_spec + * The specification of a single machine for the execution job. + * @type \Google\Cloud\AIPlatform\V1\PersistentDiskSpec $persistent_disk_spec + * The specification of a persistent disk to attach for the execution job. + * @type \Google\Cloud\AIPlatform\V1\NetworkSpec $network_spec + * The network configuration to use for the execution job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookExecutionJob::initOnce(); + parent::__construct($data); + } + + /** + * The specification of a single machine for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1; + * @return \Google\Cloud\AIPlatform\V1\MachineSpec|null + */ + public function getMachineSpec() + { + return $this->machine_spec; + } + + public function hasMachineSpec() + { + return isset($this->machine_spec); + } + + public function clearMachineSpec() + { + unset($this->machine_spec); + } + + /** + * The specification of a single machine for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 1; + * @param \Google\Cloud\AIPlatform\V1\MachineSpec $var + * @return $this + */ + public function setMachineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MachineSpec::class); + $this->machine_spec = $var; + + return $this; + } + + /** + * The specification of a persistent disk to attach for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec persistent_disk_spec = 2; + * @return \Google\Cloud\AIPlatform\V1\PersistentDiskSpec|null + */ + public function getPersistentDiskSpec() + { + return $this->persistent_disk_spec; + } + + public function hasPersistentDiskSpec() + { + return isset($this->persistent_disk_spec); + } + + public function clearPersistentDiskSpec() + { + unset($this->persistent_disk_spec); + } + + /** + * The specification of a persistent disk to attach for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec persistent_disk_spec = 2; + * @param \Google\Cloud\AIPlatform\V1\PersistentDiskSpec $var + * @return $this + */ + public function setPersistentDiskSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PersistentDiskSpec::class); + $this->persistent_disk_spec = $var; + + return $this; + } + + /** + * The network configuration to use for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 3; + * @return \Google\Cloud\AIPlatform\V1\NetworkSpec|null + */ + public function getNetworkSpec() + { + return $this->network_spec; + } + + public function hasNetworkSpec() + { + return isset($this->network_spec); + } + + public function clearNetworkSpec() + { + unset($this->network_spec); + } + + /** + * The network configuration to use for the execution job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 3; + * @param \Google\Cloud\AIPlatform\V1\NetworkSpec $var + * @return $this + */ + public function setNetworkSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NetworkSpec::class); + $this->network_spec = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RagContexts.php b/AiPlatform/src/V1/RagContexts.php new file mode 100644 index 000000000000..2b5fe5bc4382 --- /dev/null +++ b/AiPlatform/src/V1/RagContexts.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.RagContexts + */ +class RagContexts extends \Google\Protobuf\Internal\Message +{ + /** + * All its contexts. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1; + */ + private $contexts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\RagContexts\Context>|\Google\Protobuf\Internal\RepeatedField $contexts + * All its contexts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * All its contexts. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContexts() + { + return $this->contexts; + } + + /** + * All its contexts. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RagContexts.Context contexts = 1; + * @param array<\Google\Cloud\AIPlatform\V1\RagContexts\Context>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RagContexts\Context::class); + $this->contexts = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RagContexts/Context.php b/AiPlatform/src/V1/RagContexts/Context.php new file mode 100644 index 000000000000..9eec9cd93f68 --- /dev/null +++ b/AiPlatform/src/V1/RagContexts/Context.php @@ -0,0 +1,212 @@ +google.cloud.aiplatform.v1.RagContexts.Context + */ +class Context extends \Google\Protobuf\Internal\Message +{ + /** + * If the file is imported from Cloud Storage or Google Drive, source_uri + * will be original file URI in Cloud Storage or Google Drive; if file is + * uploaded, source_uri will be file display name. + * + * Generated from protobuf field string source_uri = 1; + */ + protected $source_uri = ''; + /** + * The file display name. + * + * Generated from protobuf field string source_display_name = 5; + */ + protected $source_display_name = ''; + /** + * The text chunk. + * + * Generated from protobuf field string text = 2; + */ + protected $text = ''; + /** + * According to the underlying Vector DB and the selected metric type, the + * score can be either the distance or the similarity between the query and + * the context and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the context. The larger the distance, the + * less relevant the context is to the query. The range is [0, 2], while 0 + * means the most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + */ + protected $score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_uri + * If the file is imported from Cloud Storage or Google Drive, source_uri + * will be original file URI in Cloud Storage or Google Drive; if file is + * uploaded, source_uri will be file display name. + * @type string $source_display_name + * The file display name. + * @type string $text + * The text chunk. + * @type float $score + * According to the underlying Vector DB and the selected metric type, the + * score can be either the distance or the similarity between the query and + * the context and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the context. The larger the distance, the + * less relevant the context is to the query. The range is [0, 2], while 0 + * means the most relevant and 2 means the least relevant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * If the file is imported from Cloud Storage or Google Drive, source_uri + * will be original file URI in Cloud Storage or Google Drive; if file is + * uploaded, source_uri will be file display name. + * + * Generated from protobuf field string source_uri = 1; + * @return string + */ + public function getSourceUri() + { + return $this->source_uri; + } + + /** + * If the file is imported from Cloud Storage or Google Drive, source_uri + * will be original file URI in Cloud Storage or Google Drive; if file is + * uploaded, source_uri will be file display name. + * + * Generated from protobuf field string source_uri = 1; + * @param string $var + * @return $this + */ + public function setSourceUri($var) + { + GPBUtil::checkString($var, True); + $this->source_uri = $var; + + return $this; + } + + /** + * The file display name. + * + * Generated from protobuf field string source_display_name = 5; + * @return string + */ + public function getSourceDisplayName() + { + return $this->source_display_name; + } + + /** + * The file display name. + * + * Generated from protobuf field string source_display_name = 5; + * @param string $var + * @return $this + */ + public function setSourceDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->source_display_name = $var; + + return $this; + } + + /** + * The text chunk. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text chunk. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * According to the underlying Vector DB and the selected metric type, the + * score can be either the distance or the similarity between the query and + * the context and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the context. The larger the distance, the + * less relevant the context is to the query. The range is [0, 2], while 0 + * means the most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + * @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); + } + + /** + * According to the underlying Vector DB and the selected metric type, the + * score can be either the distance or the similarity between the query and + * the context and its range depends on the metric type. + * For example, if the metric type is COSINE_DISTANCE, it represents the + * distance between the query and the context. The larger the distance, the + * less relevant the context is to the query. The range is [0, 2], while 0 + * means the most relevant and 2 means the least relevant. + * + * Generated from protobuf field optional double score = 6; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkDouble($var); + $this->score = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RagCorpus.php b/AiPlatform/src/V1/RagCorpus.php new file mode 100644 index 000000000000..a208c9bc946a --- /dev/null +++ b/AiPlatform/src/V1/RagCorpus.php @@ -0,0 +1,318 @@ +google.cloud.aiplatform.v1.RagCorpus + */ +class RagCorpus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the RagCorpus. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. The display name of the RagCorpus. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. The description of the RagCorpus. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Timestamp when this RagCorpus was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this RagCorpus was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. RagCorpus state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $corpus_status = null; + protected $backend_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the RagCorpus. + * @type string $display_name + * Required. The display name of the RagCorpus. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * @type string $description + * Optional. The description of the RagCorpus. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this RagCorpus was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this RagCorpus was last updated. + * @type \Google\Cloud\AIPlatform\V1\CorpusStatus $corpus_status + * Output only. RagCorpus state. + * @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig $vector_db_config + * Optional. Immutable. The config for the Vector DBs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the RagCorpus. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the RagCorpus. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the RagCorpus. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the RagCorpus. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the RagCorpus. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the RagCorpus. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Timestamp when this RagCorpus was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this RagCorpus was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this RagCorpus was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp when this RagCorpus was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. RagCorpus state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\CorpusStatus|null + */ + public function getCorpusStatus() + { + return $this->corpus_status; + } + + public function hasCorpusStatus() + { + return isset($this->corpus_status); + } + + public function clearCorpusStatus() + { + unset($this->corpus_status); + } + + /** + * Output only. RagCorpus state. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.CorpusStatus corpus_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\CorpusStatus $var + * @return $this + */ + public function setCorpusStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\CorpusStatus::class); + $this->corpus_status = $var; + + return $this; + } + + /** + * Optional. Immutable. The config for the Vector DBs. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig|null + */ + public function getVectorDbConfig() + { + return $this->readOneof(9); + } + + public function hasVectorDbConfig() + { + return $this->hasOneof(9); + } + + /** + * Optional. Immutable. The config for the Vector DBs. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig vector_db_config = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig $var + * @return $this + */ + public function setVectorDbConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getBackendConfig() + { + return $this->whichOneof("backend_config"); + } + +} + diff --git a/AiPlatform/src/V1/RagEmbeddingModelConfig.php b/AiPlatform/src/V1/RagEmbeddingModelConfig.php new file mode 100644 index 000000000000..06938ddfa5b4 --- /dev/null +++ b/AiPlatform/src/V1/RagEmbeddingModelConfig.php @@ -0,0 +1,87 @@ +google.cloud.aiplatform.v1.RagEmbeddingModelConfig + */ +class RagEmbeddingModelConfig extends \Google\Protobuf\Internal\Message +{ + protected $model_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig\VertexPredictionEndpoint $vertex_prediction_endpoint + * The Vertex AI Prediction Endpoint that either refers to a publisher model + * or an endpoint that is hosting a 1P fine-tuned text embedding model. + * Endpoints hosting non-1P fine-tuned text embedding models are + * currently not supported. + * This is used for dense vector search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * The Vertex AI Prediction Endpoint that either refers to a publisher model + * or an endpoint that is hosting a 1P fine-tuned text embedding model. + * Endpoints hosting non-1P fine-tuned text embedding models are + * currently not supported. + * This is used for dense vector search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; + * @return \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig\VertexPredictionEndpoint|null + */ + public function getVertexPredictionEndpoint() + { + return $this->readOneof(1); + } + + public function hasVertexPredictionEndpoint() + { + return $this->hasOneof(1); + } + + /** + * The Vertex AI Prediction Endpoint that either refers to a publisher model + * or an endpoint that is hosting a 1P fine-tuned text embedding model. + * Endpoints hosting non-1P fine-tuned text embedding models are + * currently not supported. + * This is used for dense vector search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint vertex_prediction_endpoint = 1; + * @param \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig\VertexPredictionEndpoint $var + * @return $this + */ + public function setVertexPredictionEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig\VertexPredictionEndpoint::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getModelConfig() + { + return $this->whichOneof("model_config"); + } + +} + diff --git a/AiPlatform/src/V1/RagEmbeddingModelConfig/VertexPredictionEndpoint.php b/AiPlatform/src/V1/RagEmbeddingModelConfig/VertexPredictionEndpoint.php new file mode 100644 index 000000000000..a842e459210f --- /dev/null +++ b/AiPlatform/src/V1/RagEmbeddingModelConfig/VertexPredictionEndpoint.php @@ -0,0 +1,168 @@ +google.cloud.aiplatform.v1.RagEmbeddingModelConfig.VertexPredictionEndpoint + */ +class VertexPredictionEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The endpoint resource name. + * Format: + * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` + * or + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * Generated from protobuf field string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $endpoint = ''; + /** + * Output only. The resource name of the model that is deployed on the + * endpoint. Present only when the endpoint is not a publisher model. + * Pattern: + * `projects/{project}/locations/{location}/models/{model}` + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $model = ''; + /** + * Output only. Version ID of the model that is deployed on the endpoint. + * Present only when the endpoint is not a publisher model. + * + * Generated from protobuf field string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $model_version_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $endpoint + * Required. The endpoint resource name. + * Format: + * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` + * or + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * @type string $model + * Output only. The resource name of the model that is deployed on the + * endpoint. Present only when the endpoint is not a publisher model. + * Pattern: + * `projects/{project}/locations/{location}/models/{model}` + * @type string $model_version_id + * Output only. Version ID of the model that is deployed on the endpoint. + * Present only when the endpoint is not a publisher model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Required. The endpoint resource name. + * Format: + * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` + * or + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * Generated from protobuf field string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Required. The endpoint resource name. + * Format: + * `projects/{project}/locations/{location}/publishers/{publisher}/models/{model}` + * or + * `projects/{project}/locations/{location}/endpoints/{endpoint}` + * + * Generated from protobuf field string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + + /** + * Output only. The resource name of the model that is deployed on the + * endpoint. Present only when the endpoint is not a publisher model. + * Pattern: + * `projects/{project}/locations/{location}/models/{model}` + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Output only. The resource name of the model that is deployed on the + * endpoint. Present only when the endpoint is not a publisher model. + * Pattern: + * `projects/{project}/locations/{location}/models/{model}` + * + * Generated from protobuf field string model = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Output only. Version ID of the model that is deployed on the endpoint. + * Present only when the endpoint is not a publisher model. + * + * Generated from protobuf field string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getModelVersionId() + { + return $this->model_version_id; + } + + /** + * Output only. Version ID of the model that is deployed on the endpoint. + * Present only when the endpoint is not a publisher model. + * + * Generated from protobuf field string model_version_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setModelVersionId($var) + { + GPBUtil::checkString($var, True); + $this->model_version_id = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RagFile.php b/AiPlatform/src/V1/RagFile.php new file mode 100644 index 000000000000..7694cad6ff3a --- /dev/null +++ b/AiPlatform/src/V1/RagFile.php @@ -0,0 +1,491 @@ +google.cloud.aiplatform.v1.RagFile + */ +class RagFile extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the RagFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. The display name of the RagFile. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. The description of the RagFile. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. Timestamp when this RagFile was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp when this RagFile was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. State of the RagFile. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $file_status = null; + protected $rag_file_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GcsSource $gcs_source + * Output only. Google Cloud Storage location of the RagFile. + * It does not support wildcards in the Cloud Storage uri for now. + * @type \Google\Cloud\AIPlatform\V1\GoogleDriveSource $google_drive_source + * Output only. Google Drive location. Supports importing individual files + * as well as Google Drive folders. + * @type \Google\Cloud\AIPlatform\V1\DirectUploadSource $direct_upload_source + * Output only. The RagFile is encapsulated and uploaded in the + * UploadRagFile request. + * @type \Google\Cloud\AIPlatform\V1\SlackSource $slack_source + * The RagFile is imported from a Slack channel. + * @type \Google\Cloud\AIPlatform\V1\JiraSource $jira_source + * The RagFile is imported from a Jira query. + * @type \Google\Cloud\AIPlatform\V1\SharePointSources $share_point_sources + * The RagFile is imported from a SharePoint source. + * @type string $name + * Output only. The resource name of the RagFile. + * @type string $display_name + * Required. The display name of the RagFile. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * @type string $description + * Optional. The description of the RagFile. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this RagFile was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this RagFile was last updated. + * @type \Google\Cloud\AIPlatform\V1\FileStatus $file_status + * Output only. State of the RagFile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Google Cloud Storage location of the RagFile. + * It does not support wildcards in the Cloud Storage uri for now. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(8); + } + + public function hasGcsSource() + { + return $this->hasOneof(8); + } + + /** + * Output only. Google Cloud Storage location of the RagFile. + * It does not support wildcards in the Cloud Storage uri for now. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GcsSource gcs_source = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GcsSource::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Output only. Google Drive location. Supports importing individual files + * as well as Google Drive folders. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\GoogleDriveSource|null + */ + public function getGoogleDriveSource() + { + return $this->readOneof(9); + } + + public function hasGoogleDriveSource() + { + return $this->hasOneof(9); + } + + /** + * Output only. Google Drive location. Supports importing individual files + * as well as Google Drive folders. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GoogleDriveSource google_drive_source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\GoogleDriveSource $var + * @return $this + */ + public function setGoogleDriveSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GoogleDriveSource::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Output only. The RagFile is encapsulated and uploaded in the + * UploadRagFile request. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\DirectUploadSource|null + */ + public function getDirectUploadSource() + { + return $this->readOneof(10); + } + + public function hasDirectUploadSource() + { + return $this->hasOneof(10); + } + + /** + * Output only. The RagFile is encapsulated and uploaded in the + * UploadRagFile request. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DirectUploadSource direct_upload_source = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\DirectUploadSource $var + * @return $this + */ + public function setDirectUploadSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DirectUploadSource::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * The RagFile is imported from a Slack channel. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SlackSource slack_source = 11; + * @return \Google\Cloud\AIPlatform\V1\SlackSource|null + */ + public function getSlackSource() + { + return $this->readOneof(11); + } + + public function hasSlackSource() + { + return $this->hasOneof(11); + } + + /** + * The RagFile is imported from a Slack channel. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SlackSource slack_source = 11; + * @param \Google\Cloud\AIPlatform\V1\SlackSource $var + * @return $this + */ + public function setSlackSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SlackSource::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The RagFile is imported from a Jira query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JiraSource jira_source = 12; + * @return \Google\Cloud\AIPlatform\V1\JiraSource|null + */ + public function getJiraSource() + { + return $this->readOneof(12); + } + + public function hasJiraSource() + { + return $this->hasOneof(12); + } + + /** + * The RagFile is imported from a Jira query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JiraSource jira_source = 12; + * @param \Google\Cloud\AIPlatform\V1\JiraSource $var + * @return $this + */ + public function setJiraSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\JiraSource::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * The RagFile is imported from a SharePoint source. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SharePointSources share_point_sources = 14; + * @return \Google\Cloud\AIPlatform\V1\SharePointSources|null + */ + public function getSharePointSources() + { + return $this->readOneof(14); + } + + public function hasSharePointSources() + { + return $this->hasOneof(14); + } + + /** + * The RagFile is imported from a SharePoint source. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SharePointSources share_point_sources = 14; + * @param \Google\Cloud\AIPlatform\V1\SharePointSources $var + * @return $this + */ + public function setSharePointSources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SharePointSources::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Output only. The resource name of the RagFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the RagFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the RagFile. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the RagFile. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. The description of the RagFile. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the RagFile. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Timestamp when this RagFile was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this RagFile was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this RagFile was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp when this RagFile was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. State of the RagFile. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\FileStatus|null + */ + public function getFileStatus() + { + return $this->file_status; + } + + public function hasFileStatus() + { + return isset($this->file_status); + } + + public function clearFileStatus() + { + unset($this->file_status); + } + + /** + * Output only. State of the RagFile. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FileStatus file_status = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\FileStatus $var + * @return $this + */ + public function setFileStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FileStatus::class); + $this->file_status = $var; + + return $this; + } + + /** + * @return string + */ + public function getRagFileSource() + { + return $this->whichOneof("rag_file_source"); + } + +} + diff --git a/AiPlatform/src/V1/RagFileChunkingConfig.php b/AiPlatform/src/V1/RagFileChunkingConfig.php new file mode 100644 index 000000000000..30eb96224f08 --- /dev/null +++ b/AiPlatform/src/V1/RagFileChunkingConfig.php @@ -0,0 +1,75 @@ +google.cloud.aiplatform.v1.RagFileChunkingConfig + */ +class RagFileChunkingConfig extends \Google\Protobuf\Internal\Message +{ + protected $chunking_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking $fixed_length_chunking + * Specifies the fixed length chunking config. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the fixed length chunking config. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; + * @return \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking|null + */ + public function getFixedLengthChunking() + { + return $this->readOneof(3); + } + + public function hasFixedLengthChunking() + { + return $this->hasOneof(3); + } + + /** + * Specifies the fixed length chunking config. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking fixed_length_chunking = 3; + * @param \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking $var + * @return $this + */ + public function setFixedLengthChunking($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig\FixedLengthChunking::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getChunkingConfig() + { + return $this->whichOneof("chunking_config"); + } + +} + diff --git a/AiPlatform/src/V1/RagFileChunkingConfig/FixedLengthChunking.php b/AiPlatform/src/V1/RagFileChunkingConfig/FixedLengthChunking.php new file mode 100644 index 000000000000..7569e19bb450 --- /dev/null +++ b/AiPlatform/src/V1/RagFileChunkingConfig/FixedLengthChunking.php @@ -0,0 +1,102 @@ +google.cloud.aiplatform.v1.RagFileChunkingConfig.FixedLengthChunking + */ +class FixedLengthChunking extends \Google\Protobuf\Internal\Message +{ + /** + * The size of the chunks. + * + * Generated from protobuf field int32 chunk_size = 1; + */ + protected $chunk_size = 0; + /** + * The overlap between chunks. + * + * Generated from protobuf field int32 chunk_overlap = 2; + */ + protected $chunk_overlap = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $chunk_size + * The size of the chunks. + * @type int $chunk_overlap + * The overlap between chunks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * The size of the chunks. + * + * Generated from protobuf field int32 chunk_size = 1; + * @return int + */ + public function getChunkSize() + { + return $this->chunk_size; + } + + /** + * The size of the chunks. + * + * Generated from protobuf field int32 chunk_size = 1; + * @param int $var + * @return $this + */ + public function setChunkSize($var) + { + GPBUtil::checkInt32($var); + $this->chunk_size = $var; + + return $this; + } + + /** + * The overlap between chunks. + * + * Generated from protobuf field int32 chunk_overlap = 2; + * @return int + */ + public function getChunkOverlap() + { + return $this->chunk_overlap; + } + + /** + * The overlap between chunks. + * + * Generated from protobuf field int32 chunk_overlap = 2; + * @param int $var + * @return $this + */ + public function setChunkOverlap($var) + { + GPBUtil::checkInt32($var); + $this->chunk_overlap = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RagFileTransformationConfig.php b/AiPlatform/src/V1/RagFileTransformationConfig.php new file mode 100644 index 000000000000..18b180d0cc4b --- /dev/null +++ b/AiPlatform/src/V1/RagFileTransformationConfig.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.RagFileTransformationConfig + */ +class RagFileTransformationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the chunking config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileChunkingConfig rag_file_chunking_config = 1; + */ + protected $rag_file_chunking_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig $rag_file_chunking_config + * Specifies the chunking config for RagFiles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the chunking config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileChunkingConfig rag_file_chunking_config = 1; + * @return \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig|null + */ + public function getRagFileChunkingConfig() + { + return $this->rag_file_chunking_config; + } + + public function hasRagFileChunkingConfig() + { + return isset($this->rag_file_chunking_config); + } + + public function clearRagFileChunkingConfig() + { + unset($this->rag_file_chunking_config); + } + + /** + * Specifies the chunking config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileChunkingConfig rag_file_chunking_config = 1; + * @param \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig $var + * @return $this + */ + public function setRagFileChunkingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFileChunkingConfig::class); + $this->rag_file_chunking_config = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RagQuery.php b/AiPlatform/src/V1/RagQuery.php new file mode 100644 index 000000000000..4797aef0d7d7 --- /dev/null +++ b/AiPlatform/src/V1/RagQuery.php @@ -0,0 +1,119 @@ +google.cloud.aiplatform.v1.RagQuery + */ +class RagQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The retrieval config for the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rag_retrieval_config = null; + protected $query; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Optional. The query in text format to get relevant contexts. + * @type \Google\Cloud\AIPlatform\V1\RagRetrievalConfig $rag_retrieval_config + * Optional. The retrieval config for the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The query in text format to get relevant contexts. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * Optional. The query in text format to get relevant contexts. + * + * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. The retrieval config for the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\RagRetrievalConfig|null + */ + public function getRagRetrievalConfig() + { + return $this->rag_retrieval_config; + } + + public function hasRagRetrievalConfig() + { + return isset($this->rag_retrieval_config); + } + + public function clearRagRetrievalConfig() + { + unset($this->rag_retrieval_config); + } + + /** + * Optional. The retrieval config for the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\RagRetrievalConfig $var + * @return $this + */ + public function setRagRetrievalConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagRetrievalConfig::class); + $this->rag_retrieval_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuery() + { + return $this->whichOneof("query"); + } + +} + diff --git a/AiPlatform/src/V1/RagRetrievalConfig.php b/AiPlatform/src/V1/RagRetrievalConfig.php new file mode 100644 index 000000000000..16203e592e5c --- /dev/null +++ b/AiPlatform/src/V1/RagRetrievalConfig.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.RagRetrievalConfig + */ +class RagRetrievalConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of contexts to retrieve. + * + * Generated from protobuf field int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $top_k = 0; + /** + * Optional. Config for filters. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $top_k + * Optional. The number of contexts to retrieve. + * @type \Google\Cloud\AIPlatform\V1\RagRetrievalConfig\Filter $filter + * Optional. Config for filters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of contexts to retrieve. + * + * Generated from protobuf field int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTopK() + { + return $this->top_k; + } + + /** + * Optional. The number of contexts to retrieve. + * + * Generated from protobuf field int32 top_k = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Optional. Config for filters. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\RagRetrievalConfig\Filter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. Config for filters. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig.Filter filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\RagRetrievalConfig\Filter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagRetrievalConfig\Filter::class); + $this->filter = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RagRetrievalConfig/Filter.php b/AiPlatform/src/V1/RagRetrievalConfig/Filter.php new file mode 100644 index 000000000000..0afde4d50c6d --- /dev/null +++ b/AiPlatform/src/V1/RagRetrievalConfig/Filter.php @@ -0,0 +1,149 @@ +google.cloud.aiplatform.v1.RagRetrievalConfig.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. String for metadata filtering. + * + * Generated from protobuf field string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata_filter = ''; + protected $vector_db_threshold; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $vector_distance_threshold + * Optional. Only returns contexts with vector distance smaller than the + * threshold. + * @type float $vector_similarity_threshold + * Optional. Only returns contexts with vector similarity larger than the + * threshold. + * @type string $metadata_filter + * Optional. String for metadata filtering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Only returns contexts with vector distance smaller than the + * threshold. + * + * Generated from protobuf field double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getVectorDistanceThreshold() + { + return $this->readOneof(3); + } + + public function hasVectorDistanceThreshold() + { + return $this->hasOneof(3); + } + + /** + * Optional. Only returns contexts with vector distance smaller than the + * threshold. + * + * Generated from protobuf field double vector_distance_threshold = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setVectorDistanceThreshold($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Only returns contexts with vector similarity larger than the + * threshold. + * + * Generated from protobuf field double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getVectorSimilarityThreshold() + { + return $this->readOneof(4); + } + + public function hasVectorSimilarityThreshold() + { + return $this->hasOneof(4); + } + + /** + * Optional. Only returns contexts with vector similarity larger than the + * threshold. + * + * Generated from protobuf field double vector_similarity_threshold = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setVectorSimilarityThreshold($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. String for metadata filtering. + * + * Generated from protobuf field string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMetadataFilter() + { + return $this->metadata_filter; + } + + /** + * Optional. String for metadata filtering. + * + * Generated from protobuf field string metadata_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMetadataFilter($var) + { + GPBUtil::checkString($var, True); + $this->metadata_filter = $var; + + return $this; + } + + /** + * @return string + */ + public function getVectorDbThreshold() + { + return $this->whichOneof("vector_db_threshold"); + } + +} + + diff --git a/AiPlatform/src/V1/RagVectorDbConfig.php b/AiPlatform/src/V1/RagVectorDbConfig.php new file mode 100644 index 000000000000..4d888f928f48 --- /dev/null +++ b/AiPlatform/src/V1/RagVectorDbConfig.php @@ -0,0 +1,229 @@ +google.cloud.aiplatform.v1.RagVectorDbConfig + */ +class RagVectorDbConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Authentication config for the chosen Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth api_auth = 5; + */ + protected $api_auth = null; + /** + * Optional. Immutable. The embedding model config of the Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $rag_embedding_model_config = null; + protected $vector_db; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb $rag_managed_db + * The config for the RAG-managed Vector DB. + * @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone $pinecone + * The config for the Pinecone. + * @type \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch $vertex_vector_search + * The config for the Vertex Vector Search. + * @type \Google\Cloud\AIPlatform\V1\ApiAuth $api_auth + * Authentication config for the chosen Vector DB. + * @type \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig $rag_embedding_model_config + * Optional. Immutable. The embedding model config of the Vector DB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * The config for the RAG-managed Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; + * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb|null + */ + public function getRagManagedDb() + { + return $this->readOneof(1); + } + + public function hasRagManagedDb() + { + return $this->hasOneof(1); + } + + /** + * The config for the RAG-managed Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb rag_managed_db = 1; + * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb $var + * @return $this + */ + public function setRagManagedDb($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\RagManagedDb::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The config for the Pinecone. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone pinecone = 3; + * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone|null + */ + public function getPinecone() + { + return $this->readOneof(3); + } + + public function hasPinecone() + { + return $this->hasOneof(3); + } + + /** + * The config for the Pinecone. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone pinecone = 3; + * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone $var + * @return $this + */ + public function setPinecone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\Pinecone::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The config for the Vertex Vector Search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; + * @return \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch|null + */ + public function getVertexVectorSearch() + { + return $this->readOneof(6); + } + + public function hasVertexVectorSearch() + { + return $this->hasOneof(6); + } + + /** + * The config for the Vertex Vector Search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch vertex_vector_search = 6; + * @param \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch $var + * @return $this + */ + public function setVertexVectorSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagVectorDbConfig\VertexVectorSearch::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Authentication config for the chosen Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth api_auth = 5; + * @return \Google\Cloud\AIPlatform\V1\ApiAuth|null + */ + public function getApiAuth() + { + return $this->api_auth; + } + + public function hasApiAuth() + { + return isset($this->api_auth); + } + + public function clearApiAuth() + { + unset($this->api_auth); + } + + /** + * Authentication config for the chosen Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth api_auth = 5; + * @param \Google\Cloud\AIPlatform\V1\ApiAuth $var + * @return $this + */ + public function setApiAuth($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth::class); + $this->api_auth = $var; + + return $this; + } + + /** + * Optional. Immutable. The embedding model config of the Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig|null + */ + public function getRagEmbeddingModelConfig() + { + return $this->rag_embedding_model_config; + } + + public function hasRagEmbeddingModelConfig() + { + return isset($this->rag_embedding_model_config); + } + + public function clearRagEmbeddingModelConfig() + { + unset($this->rag_embedding_model_config); + } + + /** + * Optional. Immutable. The embedding model config of the Vector DB. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagEmbeddingModelConfig rag_embedding_model_config = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig $var + * @return $this + */ + public function setRagEmbeddingModelConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagEmbeddingModelConfig::class); + $this->rag_embedding_model_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getVectorDb() + { + return $this->whichOneof("vector_db"); + } + +} + diff --git a/AiPlatform/src/V1/RagVectorDbConfig/Pinecone.php b/AiPlatform/src/V1/RagVectorDbConfig/Pinecone.php new file mode 100644 index 000000000000..b353f77f0ebd --- /dev/null +++ b/AiPlatform/src/V1/RagVectorDbConfig/Pinecone.php @@ -0,0 +1,72 @@ +google.cloud.aiplatform.v1.RagVectorDbConfig.Pinecone + */ +class Pinecone extends \Google\Protobuf\Internal\Message +{ + /** + * Pinecone index name. + * This value cannot be changed after it's set. + * + * Generated from protobuf field string index_name = 1; + */ + protected $index_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_name + * Pinecone index name. + * This value cannot be changed after it's set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Pinecone index name. + * This value cannot be changed after it's set. + * + * Generated from protobuf field string index_name = 1; + * @return string + */ + public function getIndexName() + { + return $this->index_name; + } + + /** + * Pinecone index name. + * This value cannot be changed after it's set. + * + * Generated from protobuf field string index_name = 1; + * @param string $var + * @return $this + */ + public function setIndexName($var) + { + GPBUtil::checkString($var, True); + $this->index_name = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RagVectorDbConfig/RagManagedDb.php b/AiPlatform/src/V1/RagVectorDbConfig/RagManagedDb.php new file mode 100644 index 000000000000..033b52803718 --- /dev/null +++ b/AiPlatform/src/V1/RagVectorDbConfig/RagManagedDb.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.RagVectorDbConfig.RagManagedDb + */ +class RagManagedDb 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\VertexRagData::initOnce(); + parent::__construct($data); + } + +} + + diff --git a/AiPlatform/src/V1/RagVectorDbConfig/VertexVectorSearch.php b/AiPlatform/src/V1/RagVectorDbConfig/VertexVectorSearch.php new file mode 100644 index 000000000000..c13419029da6 --- /dev/null +++ b/AiPlatform/src/V1/RagVectorDbConfig/VertexVectorSearch.php @@ -0,0 +1,118 @@ +google.cloud.aiplatform.v1.RagVectorDbConfig.VertexVectorSearch + */ +class VertexVectorSearch extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Index Endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1; + */ + protected $index_endpoint = ''; + /** + * The resource name of the Index. + * Format: + * `projects/{project}/locations/{location}/indexes/{index}` + * + * Generated from protobuf field string index = 2; + */ + protected $index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_endpoint + * The resource name of the Index Endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @type string $index + * The resource name of the Index. + * Format: + * `projects/{project}/locations/{location}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Index Endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1; + * @return string + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + /** + * The resource name of the Index Endpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1; + * @param string $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint = $var; + + return $this; + } + + /** + * The resource name of the Index. + * Format: + * `projects/{project}/locations/{location}/indexes/{index}` + * + * Generated from protobuf field string index = 2; + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * The resource name of the Index. + * Format: + * `projects/{project}/locations/{location}/indexes/{index}` + * + * Generated from protobuf field string index = 2; + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/Retrieval.php b/AiPlatform/src/V1/Retrieval.php index 2a6fe4a832f0..8ced561daa1c 100644 --- a/AiPlatform/src/V1/Retrieval.php +++ b/AiPlatform/src/V1/Retrieval.php @@ -32,6 +32,9 @@ class Retrieval extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\AIPlatform\V1\VertexAISearch $vertex_ai_search * Set to use data source powered by Vertex AI Search. + * @type \Google\Cloud\AIPlatform\V1\VertexRagStore $vertex_rag_store + * Set to use data source powered by Vertex RAG store. + * User data is uploaded via the VertexRagDataService. * @type bool $disable_attribution * Optional. Deprecated. This option is no longer supported. * } @@ -72,6 +75,39 @@ public function setVertexAiSearch($var) return $this; } + /** + * Set to use data source powered by Vertex RAG store. + * User data is uploaded via the VertexRagDataService. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.VertexRagStore vertex_rag_store = 4; + * @return \Google\Cloud\AIPlatform\V1\VertexRagStore|null + */ + public function getVertexRagStore() + { + return $this->readOneof(4); + } + + public function hasVertexRagStore() + { + return $this->hasOneof(4); + } + + /** + * Set to use data source powered by Vertex RAG store. + * User data is uploaded via the VertexRagDataService. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.VertexRagStore vertex_rag_store = 4; + * @param \Google\Cloud\AIPlatform\V1\VertexRagStore $var + * @return $this + */ + public function setVertexRagStore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\VertexRagStore::class); + $this->writeOneof(4, $var); + + return $this; + } + /** * Optional. Deprecated. This option is no longer supported. * diff --git a/AiPlatform/src/V1/RetrieveContextsRequest.php b/AiPlatform/src/V1/RetrieveContextsRequest.php new file mode 100644 index 000000000000..bd720e67c0b4 --- /dev/null +++ b/AiPlatform/src/V1/RetrieveContextsRequest.php @@ -0,0 +1,185 @@ +google.cloud.aiplatform.v1.RetrieveContextsRequest + */ +class RetrieveContextsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to retrieve + * RagContexts. The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Single RAG retrieve query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = null; + protected $data_source; + + /** + * @param string $parent Required. The resource name of the Location from which to retrieve + * RagContexts. The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. Please see + * {@see VertexRagServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\RagQuery $query Required. Single RAG retrieve query. + * + * @return \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\RagQuery $query): self + { + return (new self()) + ->setParent($parent) + ->setQuery($query); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore $vertex_rag_store + * The data source for Vertex RagStore. + * @type string $parent + * Required. The resource name of the Location from which to retrieve + * RagContexts. The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * @type \Google\Cloud\AIPlatform\V1\RagQuery $query + * Required. Single RAG retrieve query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * The data source for Vertex RagStore. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * @return \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore|null + */ + public function getVertexRagStore() + { + return $this->readOneof(2); + } + + public function hasVertexRagStore() + { + return $this->hasOneof(2); + } + + /** + * The data source for Vertex RagStore. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore vertex_rag_store = 2; + * @param \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore $var + * @return $this + */ + public function setVertexRagStore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The resource name of the Location from which to retrieve + * RagContexts. The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to retrieve + * RagContexts. The users must have permission to make a call in the project. + * Format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Single RAG retrieve query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\RagQuery|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Required. Single RAG retrieve query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagQuery query = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\RagQuery $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagQuery::class); + $this->query = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + diff --git a/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore.php b/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore.php new file mode 100644 index 000000000000..c900c0e12813 --- /dev/null +++ b/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore.php @@ -0,0 +1,135 @@ +google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore + */ +class VertexRagStore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore.RagResource rag_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rag_resources; + /** + * Optional. Only return contexts with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $vector_distance_threshold = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore\RagResource>|\Google\Protobuf\Internal\RepeatedField $rag_resources + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * @type float $vector_distance_threshold + * Optional. Only return contexts with vector distance smaller than the + * threshold. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore.RagResource rag_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagResources() + { + return $this->rag_resources; + } + + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore.RagResource rag_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore\RagResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\RetrieveContextsRequest\VertexRagStore\RagResource::class); + $this->rag_resources = $arr; + + return $this; + } + + /** + * Optional. Only return contexts with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return float + * @deprecated + */ + public function getVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance_threshold) ? $this->vector_distance_threshold : 0.0; + } + + public function hasVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance_threshold); + } + + public function clearVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + unset($this->vector_distance_threshold); + } + + /** + * Optional. Only return contexts with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + * @deprecated + */ + public function setVectorDistanceThreshold($var) + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkDouble($var); + $this->vector_distance_threshold = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore/RagResource.php b/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore/RagResource.php new file mode 100644 index 000000000000..8ccbedc13ebe --- /dev/null +++ b/AiPlatform/src/V1/RetrieveContextsRequest/VertexRagStore/RagResource.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.RetrieveContextsRequest.VertexRagStore.RagResource + */ +class RagResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $rag_corpus = ''; + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set + * in rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rag_file_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rag_corpus + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type array|\Google\Protobuf\Internal\RepeatedField $rag_file_ids + * Optional. rag_file_id. The files should be in the same rag_corpus set + * in rag_corpus field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRagCorpus() + { + return $this->rag_corpus; + } + + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRagCorpus($var) + { + GPBUtil::checkString($var, True); + $this->rag_corpus = $var; + + return $this; + } + + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set + * in rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagFileIds() + { + return $this->rag_file_ids; + } + + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set + * in rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagFileIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->rag_file_ids = $arr; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/RetrieveContextsResponse.php b/AiPlatform/src/V1/RetrieveContextsResponse.php new file mode 100644 index 000000000000..0ee938194121 --- /dev/null +++ b/AiPlatform/src/V1/RetrieveContextsResponse.php @@ -0,0 +1,78 @@ +google.cloud.aiplatform.v1.RetrieveContextsResponse + */ +class RetrieveContextsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The contexts of the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagContexts contexts = 1; + */ + protected $contexts = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagContexts $contexts + * The contexts of the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagService::initOnce(); + parent::__construct($data); + } + + /** + * The contexts of the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagContexts contexts = 1; + * @return \Google\Cloud\AIPlatform\V1\RagContexts|null + */ + public function getContexts() + { + return $this->contexts; + } + + public function hasContexts() + { + return isset($this->contexts); + } + + public function clearContexts() + { + unset($this->contexts); + } + + /** + * The contexts of the query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagContexts contexts = 1; + * @param \Google\Cloud\AIPlatform\V1\RagContexts $var + * @return $this + */ + public function setContexts($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagContexts::class); + $this->contexts = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SharePointSources.php b/AiPlatform/src/V1/SharePointSources.php new file mode 100644 index 000000000000..642948e55127 --- /dev/null +++ b/AiPlatform/src/V1/SharePointSources.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.SharePointSources + */ +class SharePointSources extends \Google\Protobuf\Internal\Message +{ + /** + * The SharePoint sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SharePointSources.SharePointSource share_point_sources = 1; + */ + private $share_point_sources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\SharePointSources\SharePointSource>|\Google\Protobuf\Internal\RepeatedField $share_point_sources + * The SharePoint sources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * The SharePoint sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SharePointSources.SharePointSource share_point_sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSharePointSources() + { + return $this->share_point_sources; + } + + /** + * The SharePoint sources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SharePointSources.SharePointSource share_point_sources = 1; + * @param array<\Google\Cloud\AIPlatform\V1\SharePointSources\SharePointSource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSharePointSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SharePointSources\SharePointSource::class); + $this->share_point_sources = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SharePointSources/SharePointSource.php b/AiPlatform/src/V1/SharePointSources/SharePointSource.php new file mode 100644 index 000000000000..3503c1d4c4d0 --- /dev/null +++ b/AiPlatform/src/V1/SharePointSources/SharePointSource.php @@ -0,0 +1,376 @@ +google.cloud.aiplatform.v1.SharePointSources.SharePointSource + */ +class SharePointSource extends \Google\Protobuf\Internal\Message +{ + /** + * The Application ID for the app registered in Microsoft Azure Portal. + * The application must also be configured with MS Graph permissions + * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + * + * Generated from protobuf field string client_id = 1; + */ + protected $client_id = ''; + /** + * The application secret for the app registered in Azure. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig client_secret = 2; + */ + protected $client_secret = null; + /** + * Unique identifier of the Azure Active Directory Instance. + * + * Generated from protobuf field string tenant_id = 3; + */ + protected $tenant_id = ''; + /** + * The name of the SharePoint site to download from. This can be the site + * name or the site id. + * + * Generated from protobuf field string sharepoint_site_name = 4; + */ + protected $sharepoint_site_name = ''; + /** + * Output only. The SharePoint file id. Output only. + * + * Generated from protobuf field string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $file_id = ''; + protected $folder_source; + protected $drive_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sharepoint_folder_path + * The path of the SharePoint folder to download from. + * @type string $sharepoint_folder_id + * The ID of the SharePoint folder to download from. + * @type string $drive_name + * The name of the drive to download from. + * @type string $drive_id + * The ID of the drive to download from. + * @type string $client_id + * The Application ID for the app registered in Microsoft Azure Portal. + * The application must also be configured with MS Graph permissions + * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + * @type \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $client_secret + * The application secret for the app registered in Azure. + * @type string $tenant_id + * Unique identifier of the Azure Active Directory Instance. + * @type string $sharepoint_site_name + * The name of the SharePoint site to download from. This can be the site + * name or the site id. + * @type string $file_id + * Output only. The SharePoint file id. Output only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * The path of the SharePoint folder to download from. + * + * Generated from protobuf field string sharepoint_folder_path = 5; + * @return string + */ + public function getSharepointFolderPath() + { + return $this->readOneof(5); + } + + public function hasSharepointFolderPath() + { + return $this->hasOneof(5); + } + + /** + * The path of the SharePoint folder to download from. + * + * Generated from protobuf field string sharepoint_folder_path = 5; + * @param string $var + * @return $this + */ + public function setSharepointFolderPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The ID of the SharePoint folder to download from. + * + * Generated from protobuf field string sharepoint_folder_id = 6; + * @return string + */ + public function getSharepointFolderId() + { + return $this->readOneof(6); + } + + public function hasSharepointFolderId() + { + return $this->hasOneof(6); + } + + /** + * The ID of the SharePoint folder to download from. + * + * Generated from protobuf field string sharepoint_folder_id = 6; + * @param string $var + * @return $this + */ + public function setSharepointFolderId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The name of the drive to download from. + * + * Generated from protobuf field string drive_name = 7; + * @return string + */ + public function getDriveName() + { + return $this->readOneof(7); + } + + public function hasDriveName() + { + return $this->hasOneof(7); + } + + /** + * The name of the drive to download from. + * + * Generated from protobuf field string drive_name = 7; + * @param string $var + * @return $this + */ + public function setDriveName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The ID of the drive to download from. + * + * Generated from protobuf field string drive_id = 8; + * @return string + */ + public function getDriveId() + { + return $this->readOneof(8); + } + + public function hasDriveId() + { + return $this->hasOneof(8); + } + + /** + * The ID of the drive to download from. + * + * Generated from protobuf field string drive_id = 8; + * @param string $var + * @return $this + */ + public function setDriveId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * The Application ID for the app registered in Microsoft Azure Portal. + * The application must also be configured with MS Graph permissions + * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + * + * Generated from protobuf field string client_id = 1; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * The Application ID for the app registered in Microsoft Azure Portal. + * The application must also be configured with MS Graph permissions + * "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + * + * Generated from protobuf field string client_id = 1; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * The application secret for the app registered in Azure. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig client_secret = 2; + * @return \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig|null + */ + public function getClientSecret() + { + return $this->client_secret; + } + + public function hasClientSecret() + { + return isset($this->client_secret); + } + + public function clearClientSecret() + { + unset($this->client_secret); + } + + /** + * The application secret for the app registered in Azure. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig client_secret = 2; + * @param \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $var + * @return $this + */ + public function setClientSecret($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig::class); + $this->client_secret = $var; + + return $this; + } + + /** + * Unique identifier of the Azure Active Directory Instance. + * + * Generated from protobuf field string tenant_id = 3; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * Unique identifier of the Azure Active Directory Instance. + * + * Generated from protobuf field string tenant_id = 3; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + + /** + * The name of the SharePoint site to download from. This can be the site + * name or the site id. + * + * Generated from protobuf field string sharepoint_site_name = 4; + * @return string + */ + public function getSharepointSiteName() + { + return $this->sharepoint_site_name; + } + + /** + * The name of the SharePoint site to download from. This can be the site + * name or the site id. + * + * Generated from protobuf field string sharepoint_site_name = 4; + * @param string $var + * @return $this + */ + public function setSharepointSiteName($var) + { + GPBUtil::checkString($var, True); + $this->sharepoint_site_name = $var; + + return $this; + } + + /** + * Output only. The SharePoint file id. Output only. + * + * Generated from protobuf field string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFileId() + { + return $this->file_id; + } + + /** + * Output only. The SharePoint file id. Output only. + * + * Generated from protobuf field string file_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFileId($var) + { + GPBUtil::checkString($var, True); + $this->file_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getFolderSource() + { + return $this->whichOneof("folder_source"); + } + + /** + * @return string + */ + public function getDriveSource() + { + return $this->whichOneof("drive_source"); + } + +} + + diff --git a/AiPlatform/src/V1/SlackSource.php b/AiPlatform/src/V1/SlackSource.php new file mode 100644 index 000000000000..dd5cd7832419 --- /dev/null +++ b/AiPlatform/src/V1/SlackSource.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.SlackSource + */ +class SlackSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Slack channels. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $channels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels>|\Google\Protobuf\Internal\RepeatedField $channels + * Required. The Slack channels. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Slack channels. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Required. The Slack channels. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels channels = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels::class); + $this->channels = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SlackSource/SlackChannels.php b/AiPlatform/src/V1/SlackSource/SlackChannels.php new file mode 100644 index 000000000000..8cabb3444446 --- /dev/null +++ b/AiPlatform/src/V1/SlackSource/SlackChannels.php @@ -0,0 +1,124 @@ +google.cloud.aiplatform.v1.SlackSource.SlackChannels + */ +class SlackChannels extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Slack channel IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $channels; + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Slack channel access token that has access to the slack channel IDs. + * See: https://api.slack.com/tutorials/tracks/getting-a-token. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $api_key_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel>|\Google\Protobuf\Internal\RepeatedField $channels + * Required. The Slack channel IDs. + * @type \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $api_key_config + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Slack channel access token that has access to the slack channel IDs. + * See: https://api.slack.com/tutorials/tracks/getting-a-token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Slack channel IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannels() + { + return $this->channels; + } + + /** + * Required. The Slack channel IDs. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel channels = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SlackSource\SlackChannels\SlackChannel::class); + $this->channels = $arr; + + return $this; + } + + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Slack channel access token that has access to the slack channel IDs. + * See: https://api.slack.com/tutorials/tracks/getting-a-token. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig|null + */ + public function getApiKeyConfig() + { + return $this->api_key_config; + } + + public function hasApiKeyConfig() + { + return isset($this->api_key_config); + } + + public function clearApiKeyConfig() + { + unset($this->api_key_config); + } + + /** + * Required. The SecretManager secret version resource name (e.g. + * projects/{project}/secrets/{secret}/versions/{version}) storing the + * Slack channel access token that has access to the slack channel IDs. + * See: https://api.slack.com/tutorials/tracks/getting-a-token. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ApiAuth.ApiKeyConfig api_key_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig $var + * @return $this + */ + public function setApiKeyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ApiAuth\ApiKeyConfig::class); + $this->api_key_config = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/SlackSource/SlackChannels/SlackChannel.php b/AiPlatform/src/V1/SlackSource/SlackChannels/SlackChannel.php new file mode 100644 index 000000000000..8fd23e701734 --- /dev/null +++ b/AiPlatform/src/V1/SlackSource/SlackChannels/SlackChannel.php @@ -0,0 +1,156 @@ +google.cloud.aiplatform.v1.SlackSource.SlackChannels.SlackChannel + */ +class SlackChannel extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Slack channel ID. + * + * Generated from protobuf field string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_id = ''; + /** + * Optional. The starting timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + /** + * Optional. The ending timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel_id + * Required. The Slack channel ID. + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The starting timestamp for messages to import. + * @type \Google\Protobuf\Timestamp $end_time + * Optional. The ending timestamp for messages to import. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Io::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Slack channel ID. + * + * Generated from protobuf field string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelId() + { + return $this->channel_id; + } + + /** + * Required. The Slack channel ID. + * + * Generated from protobuf field string channel_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelId($var) + { + GPBUtil::checkString($var, True); + $this->channel_id = $var; + + return $this; + } + + /** + * Optional. The starting timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. The starting timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Optional. The ending timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Optional. The ending timestamp for messages to import. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/UpdateEndpointLongRunningRequest.php b/AiPlatform/src/V1/UpdateEndpointLongRunningRequest.php new file mode 100644 index 000000000000..1433b47dc92a --- /dev/null +++ b/AiPlatform/src/V1/UpdateEndpointLongRunningRequest.php @@ -0,0 +1,101 @@ +google.cloud.aiplatform.v1.UpdateEndpointLongRunningRequest + */ +class UpdateEndpointLongRunningRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Endpoint which replaces the resource on the server. Currently + * we only support updating the `client_connection_config` field, all the + * other fields' update will be blocked. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint = null; + + /** + * @param \Google\Cloud\AIPlatform\V1\Endpoint $endpoint Required. The Endpoint which replaces the resource on the server. Currently + * we only support updating the `client_connection_config` field, all the + * other fields' update will be blocked. + * + * @return \Google\Cloud\AIPlatform\V1\UpdateEndpointLongRunningRequest + * + * @experimental + */ + public static function build(\Google\Cloud\AIPlatform\V1\Endpoint $endpoint): self + { + return (new self()) + ->setEndpoint($endpoint); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\Endpoint $endpoint + * Required. The Endpoint which replaces the resource on the server. Currently + * we only support updating the `client_connection_config` field, all the + * other fields' update will be blocked. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EndpointService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Endpoint which replaces the resource on the server. Currently + * we only support updating the `client_connection_config` field, all the + * other fields' update will be blocked. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\Endpoint|null + */ + public function getEndpoint() + { + return $this->endpoint; + } + + public function hasEndpoint() + { + return isset($this->endpoint); + } + + public function clearEndpoint() + { + unset($this->endpoint); + } + + /** + * Required. The Endpoint which replaces the resource on the server. Currently + * we only support updating the `client_connection_config` field, all the + * other fields' update will be blocked. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.Endpoint endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\Endpoint $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Endpoint::class); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpdateEndpointOperationMetadata.php b/AiPlatform/src/V1/UpdateEndpointOperationMetadata.php new file mode 100644 index 000000000000..cd938690e9d9 --- /dev/null +++ b/AiPlatform/src/V1/UpdateEndpointOperationMetadata.php @@ -0,0 +1,78 @@ +google.cloud.aiplatform.v1.UpdateEndpointOperationMetadata + */ +class UpdateEndpointOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + protected $generic_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\EndpointService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpdateRagCorpusOperationMetadata.php b/AiPlatform/src/V1/UpdateRagCorpusOperationMetadata.php new file mode 100644 index 000000000000..a788609cd549 --- /dev/null +++ b/AiPlatform/src/V1/UpdateRagCorpusOperationMetadata.php @@ -0,0 +1,78 @@ +google.cloud.aiplatform.v1.UpdateRagCorpusOperationMetadata + */ +class UpdateRagCorpusOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + protected $generic_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpdateRagCorpusRequest.php b/AiPlatform/src/V1/UpdateRagCorpusRequest.php new file mode 100644 index 000000000000..9cc03addf26f --- /dev/null +++ b/AiPlatform/src/V1/UpdateRagCorpusRequest.php @@ -0,0 +1,91 @@ +google.cloud.aiplatform.v1.UpdateRagCorpusRequest + */ +class UpdateRagCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The RagCorpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rag_corpus = null; + + /** + * @param \Google\Cloud\AIPlatform\V1\RagCorpus $ragCorpus Required. The RagCorpus which replaces the resource on the server. + * + * @return \Google\Cloud\AIPlatform\V1\UpdateRagCorpusRequest + * + * @experimental + */ + public static function build(\Google\Cloud\AIPlatform\V1\RagCorpus $ragCorpus): self + { + return (new self()) + ->setRagCorpus($ragCorpus); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagCorpus $rag_corpus + * Required. The RagCorpus which replaces the resource on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The RagCorpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\RagCorpus|null + */ + public function getRagCorpus() + { + return $this->rag_corpus; + } + + public function hasRagCorpus() + { + return isset($this->rag_corpus); + } + + public function clearRagCorpus() + { + unset($this->rag_corpus); + } + + /** + * Required. The RagCorpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagCorpus rag_corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\RagCorpus $var + * @return $this + */ + public function setRagCorpus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagCorpus::class); + $this->rag_corpus = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UploadRagFileConfig.php b/AiPlatform/src/V1/UploadRagFileConfig.php new file mode 100644 index 000000000000..516ae316fae6 --- /dev/null +++ b/AiPlatform/src/V1/UploadRagFileConfig.php @@ -0,0 +1,77 @@ +google.cloud.aiplatform.v1.UploadRagFileConfig + */ +class UploadRagFileConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 3; + */ + protected $rag_file_transformation_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig $rag_file_transformation_config + * Specifies the transformation config for RagFiles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagData::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 3; + * @return \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig|null + */ + public function getRagFileTransformationConfig() + { + return $this->rag_file_transformation_config; + } + + public function hasRagFileTransformationConfig() + { + return isset($this->rag_file_transformation_config); + } + + public function clearRagFileTransformationConfig() + { + unset($this->rag_file_transformation_config); + } + + /** + * Specifies the transformation config for RagFiles. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFileTransformationConfig rag_file_transformation_config = 3; + * @param \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig $var + * @return $this + */ + public function setRagFileTransformationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFileTransformationConfig::class); + $this->rag_file_transformation_config = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UploadRagFileRequest.php b/AiPlatform/src/V1/UploadRagFileRequest.php new file mode 100644 index 000000000000..dc5c1fa6a569 --- /dev/null +++ b/AiPlatform/src/V1/UploadRagFileRequest.php @@ -0,0 +1,189 @@ +google.cloud.aiplatform.v1.UploadRagFileRequest + */ +class UploadRagFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the RagCorpus resource into which to upload the file. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The RagFile to upload. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rag_file = null; + /** + * Required. The config for the RagFiles to be uploaded into the RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $upload_rag_file_config = null; + + /** + * @param string $parent Required. The name of the RagCorpus resource into which to upload the file. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * Please see {@see VertexRagDataServiceClient::ragCorpusName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\RagFile $ragFile Required. The RagFile to upload. + * @param \Google\Cloud\AIPlatform\V1\UploadRagFileConfig $uploadRagFileConfig Required. The config for the RagFiles to be uploaded into the RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + * + * @return \Google\Cloud\AIPlatform\V1\UploadRagFileRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\RagFile $ragFile, \Google\Cloud\AIPlatform\V1\UploadRagFileConfig $uploadRagFileConfig): self + { + return (new self()) + ->setParent($parent) + ->setRagFile($ragFile) + ->setUploadRagFileConfig($uploadRagFileConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the RagCorpus resource into which to upload the file. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type \Google\Cloud\AIPlatform\V1\RagFile $rag_file + * Required. The RagFile to upload. + * @type \Google\Cloud\AIPlatform\V1\UploadRagFileConfig $upload_rag_file_config + * Required. The config for the RagFiles to be uploaded into the RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the RagCorpus resource into which to upload the file. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the RagCorpus resource into which to upload the file. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The RagFile to upload. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\RagFile|null + */ + public function getRagFile() + { + return $this->rag_file; + } + + public function hasRagFile() + { + return isset($this->rag_file); + } + + public function clearRagFile() + { + unset($this->rag_file); + } + + /** + * Required. The RagFile to upload. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFile rag_file = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\RagFile $var + * @return $this + */ + public function setRagFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFile::class); + $this->rag_file = $var; + + return $this; + } + + /** + * Required. The config for the RagFiles to be uploaded into the RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\UploadRagFileConfig|null + */ + public function getUploadRagFileConfig() + { + return $this->upload_rag_file_config; + } + + public function hasUploadRagFileConfig() + { + return isset($this->upload_rag_file_config); + } + + public function clearUploadRagFileConfig() + { + unset($this->upload_rag_file_config); + } + + /** + * Required. The config for the RagFiles to be uploaded into the RagCorpus. + * [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.UploadRagFileConfig upload_rag_file_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\UploadRagFileConfig $var + * @return $this + */ + public function setUploadRagFileConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\UploadRagFileConfig::class); + $this->upload_rag_file_config = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UploadRagFileResponse.php b/AiPlatform/src/V1/UploadRagFileResponse.php new file mode 100644 index 000000000000..fb0009fe41f0 --- /dev/null +++ b/AiPlatform/src/V1/UploadRagFileResponse.php @@ -0,0 +1,109 @@ +google.cloud.aiplatform.v1.UploadRagFileResponse + */ +class UploadRagFileResponse extends \Google\Protobuf\Internal\Message +{ + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\RagFile $rag_file + * The RagFile that had been uploaded into the RagCorpus. + * @type \Google\Rpc\Status $error + * The error that occurred while processing the RagFile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\VertexRagDataService::initOnce(); + parent::__construct($data); + } + + /** + * The RagFile that had been uploaded into the RagCorpus. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFile rag_file = 1; + * @return \Google\Cloud\AIPlatform\V1\RagFile|null + */ + public function getRagFile() + { + return $this->readOneof(1); + } + + public function hasRagFile() + { + return $this->hasOneof(1); + } + + /** + * The RagFile that had been uploaded into the RagCorpus. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagFile rag_file = 1; + * @param \Google\Cloud\AIPlatform\V1\RagFile $var + * @return $this + */ + public function setRagFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagFile::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The error that occurred while processing the RagFile. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(4); + } + + public function hasError() + { + return $this->hasOneof(4); + } + + /** + * The error that occurred while processing the RagFile. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/AiPlatform/src/V1/VertexRagStore.php b/AiPlatform/src/V1/VertexRagStore.php new file mode 100644 index 000000000000..e94a1ad17f4f --- /dev/null +++ b/AiPlatform/src/V1/VertexRagStore.php @@ -0,0 +1,229 @@ +google.cloud.aiplatform.v1.VertexRagStore + */ +class VertexRagStore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rag_resources; + /** + * Optional. Number of top k results to return from the selected corpora. + * + * Generated from protobuf field optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $similarity_top_k = null; + /** + * Optional. Only return results with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $vector_distance_threshold = null; + /** + * Optional. The retrieval config for the Rag query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rag_retrieval_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\VertexRagStore\RagResource>|\Google\Protobuf\Internal\RepeatedField $rag_resources + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * @type int $similarity_top_k + * Optional. Number of top k results to return from the selected corpora. + * @type float $vector_distance_threshold + * Optional. Only return results with vector distance smaller than the + * threshold. + * @type \Google\Cloud\AIPlatform\V1\RagRetrievalConfig $rag_retrieval_config + * Optional. The retrieval config for the Rag query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagResources() + { + return $this->rag_resources; + } + + /** + * Optional. The representation of the rag source. It can be used to specify + * corpus only or ragfiles. Currently only support one corpus or multiple + * files from one corpus. In the future we may open up multiple corpora + * support. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.VertexRagStore.RagResource rag_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\AIPlatform\V1\VertexRagStore\RagResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\VertexRagStore\RagResource::class); + $this->rag_resources = $arr; + + return $this; + } + + /** + * Optional. Number of top k results to return from the selected corpora. + * + * Generated from protobuf field optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return int + * @deprecated + */ + public function getSimilarityTopK() + { + @trigger_error('similarity_top_k is deprecated.', E_USER_DEPRECATED); + return isset($this->similarity_top_k) ? $this->similarity_top_k : 0; + } + + public function hasSimilarityTopK() + { + @trigger_error('similarity_top_k is deprecated.', E_USER_DEPRECATED); + return isset($this->similarity_top_k); + } + + public function clearSimilarityTopK() + { + @trigger_error('similarity_top_k is deprecated.', E_USER_DEPRECATED); + unset($this->similarity_top_k); + } + + /** + * Optional. Number of top k results to return from the selected corpora. + * + * Generated from protobuf field optional int32 similarity_top_k = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + * @deprecated + */ + public function setSimilarityTopK($var) + { + @trigger_error('similarity_top_k is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->similarity_top_k = $var; + + return $this; + } + + /** + * Optional. Only return results with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return float + * @deprecated + */ + public function getVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance_threshold) ? $this->vector_distance_threshold : 0.0; + } + + public function hasVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + return isset($this->vector_distance_threshold); + } + + public function clearVectorDistanceThreshold() + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + unset($this->vector_distance_threshold); + } + + /** + * Optional. Only return results with vector distance smaller than the + * threshold. + * + * Generated from protobuf field optional double vector_distance_threshold = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + * @deprecated + */ + public function setVectorDistanceThreshold($var) + { + @trigger_error('vector_distance_threshold is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkDouble($var); + $this->vector_distance_threshold = $var; + + return $this; + } + + /** + * Optional. The retrieval config for the Rag query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\RagRetrievalConfig|null + */ + public function getRagRetrievalConfig() + { + return $this->rag_retrieval_config; + } + + public function hasRagRetrievalConfig() + { + return isset($this->rag_retrieval_config); + } + + public function clearRagRetrievalConfig() + { + unset($this->rag_retrieval_config); + } + + /** + * Optional. The retrieval config for the Rag query. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RagRetrievalConfig rag_retrieval_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\RagRetrievalConfig $var + * @return $this + */ + public function setRagRetrievalConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RagRetrievalConfig::class); + $this->rag_retrieval_config = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/VertexRagStore/RagResource.php b/AiPlatform/src/V1/VertexRagStore/RagResource.php new file mode 100644 index 000000000000..23a20b08b292 --- /dev/null +++ b/AiPlatform/src/V1/VertexRagStore/RagResource.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.VertexRagStore.RagResource + */ +class RagResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $rag_corpus = ''; + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set in + * rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rag_file_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rag_corpus + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * @type array|\Google\Protobuf\Internal\RepeatedField $rag_file_ids + * Optional. rag_file_id. The files should be in the same rag_corpus set in + * rag_corpus field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Tool::initOnce(); + parent::__construct($data); + } + + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getRagCorpus() + { + return $this->rag_corpus; + } + + /** + * Optional. RagCorpora resource name. + * Format: + * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + * + * Generated from protobuf field string rag_corpus = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRagCorpus($var) + { + GPBUtil::checkString($var, True); + $this->rag_corpus = $var; + + return $this; + } + + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set in + * rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRagFileIds() + { + return $this->rag_file_ids; + } + + /** + * Optional. rag_file_id. The files should be in the same rag_corpus set in + * rag_corpus field. + * + * Generated from protobuf field repeated string rag_file_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRagFileIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->rag_file_ids = $arr; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json index ab7dc0755506..63954d906a01 100644 --- a/AiPlatform/src/V1/gapic_metadata.json +++ b/AiPlatform/src/V1/gapic_metadata.json @@ -243,6 +243,11 @@ "updateEndpoint" ] }, + "UpdateEndpointLongRunning": { + "methods": [ + "updateEndpointLongRunning" + ] + }, "GetLocation": { "methods": [ "getLocation" @@ -2314,6 +2319,139 @@ } } }, + "VertexRagDataService": { + "clients": { + "grpc": { + "libraryClient": "VertexRagDataServiceGapicClient", + "rpcs": { + "CreateRagCorpus": { + "methods": [ + "createRagCorpus" + ] + }, + "DeleteRagCorpus": { + "methods": [ + "deleteRagCorpus" + ] + }, + "DeleteRagFile": { + "methods": [ + "deleteRagFile" + ] + }, + "GetRagCorpus": { + "methods": [ + "getRagCorpus" + ] + }, + "GetRagFile": { + "methods": [ + "getRagFile" + ] + }, + "ImportRagFiles": { + "methods": [ + "importRagFiles" + ] + }, + "ListRagCorpora": { + "methods": [ + "listRagCorpora" + ] + }, + "ListRagFiles": { + "methods": [ + "listRagFiles" + ] + }, + "UpdateRagCorpus": { + "methods": [ + "updateRagCorpus" + ] + }, + "UploadRagFile": { + "methods": [ + "uploadRagFile" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "VertexRagService": { + "clients": { + "grpc": { + "libraryClient": "VertexRagServiceGapicClient", + "rpcs": { + "AugmentPrompt": { + "methods": [ + "augmentPrompt" + ] + }, + "CorroborateContent": { + "methods": [ + "corroborateContent" + ] + }, + "RetrieveContexts": { + "methods": [ + "retrieveContexts" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "VizierService": { "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 a7b08404e7ed..b9f738781818 100644 --- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php @@ -858,6 +858,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1207,6 +1215,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1588,6 +1604,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1985,6 +2009,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2338,6 +2370,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php index 3357aeed644b..ea8acbc1b72f 100644 --- a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php @@ -631,6 +631,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -980,6 +988,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1361,6 +1377,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1758,6 +1782,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2111,6 +2143,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/endpoint_service_client_config.json b/AiPlatform/src/V1/resources/endpoint_service_client_config.json index 2fd169068b5e..4e8c3f289d18 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_client_config.json +++ b/AiPlatform/src/V1/resources/endpoint_service_client_config.json @@ -56,6 +56,11 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "UpdateEndpointLongRunning": { + "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", diff --git a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php index c517617c0ddc..aeed4230f6e9 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php @@ -118,6 +118,26 @@ ], ], ], + 'UpdateEndpointLongRunning' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\Endpoint', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\UpdateEndpointOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'endpoint.name', + 'fieldAccessors' => [ + 'getEndpoint', + 'getName', + ], + ], + ], + ], 'GetEndpoint' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\AIPlatform\V1\Endpoint', diff --git a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php index d5f23fd57fce..d8068140ed89 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php @@ -120,6 +120,19 @@ 'update_mask', ], ], + 'UpdateEndpointLongRunning' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{endpoint.name=projects/*/locations/*/endpoints/*}:update', + 'body' => '*', + 'placeholders' => [ + 'endpoint.name' => [ + 'getters' => [ + 'getEndpoint', + 'getName', + ], + ], + ], + ], ], 'google.cloud.location.Locations' => [ 'GetLocation' => [ @@ -656,6 +669,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1005,6 +1026,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1386,6 +1415,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1783,6 +1820,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2136,6 +2181,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php b/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php index 9e580887cb0c..67c01353841e 100644 --- a/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/evaluation_service_rest_client_config.php @@ -571,6 +571,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -920,6 +928,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1301,6 +1317,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1698,6 +1722,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2051,6 +2083,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php index db330685f4a3..1323c025492e 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php @@ -715,6 +715,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1064,6 +1072,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1445,6 +1461,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1842,6 +1866,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2195,6 +2227,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php index d07afb965f65..a82c3ebe9a75 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php @@ -583,6 +583,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -932,6 +940,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1313,6 +1329,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1710,6 +1734,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2063,6 +2095,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php index 46cdfd036967..81aaba04da29 100644 --- a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php @@ -693,6 +693,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1042,6 +1050,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1423,6 +1439,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1820,6 +1844,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2173,6 +2205,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php index 95aa8d42afbf..eff27dbfa318 100644 --- a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php @@ -595,6 +595,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -944,6 +952,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1325,6 +1341,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1722,6 +1746,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2075,6 +2107,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php index 60e221ea3bc2..0c447cdea74e 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php @@ -813,6 +813,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1162,6 +1170,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1543,6 +1559,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1940,6 +1964,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2293,6 +2325,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php index 4f45ce22ca84..82fd132fcf63 100644 --- a/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php @@ -617,6 +617,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -966,6 +974,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1347,6 +1363,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1744,6 +1768,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2097,6 +2129,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php index 081cabec72c9..fb204e544c5d 100644 --- a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php @@ -656,6 +656,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1005,6 +1013,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1386,6 +1402,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1783,6 +1807,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2136,6 +2168,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/index_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_service_rest_client_config.php index aab99d644013..95c898f86ad3 100644 --- a/AiPlatform/src/V1/resources/index_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_service_rest_client_config.php @@ -641,6 +641,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -990,6 +998,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1371,6 +1387,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1768,6 +1792,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2121,6 +2153,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/job_service_rest_client_config.php b/AiPlatform/src/V1/resources/job_service_rest_client_config.php index 8ff23c0c6431..372bc2b57351 100644 --- a/AiPlatform/src/V1/resources/job_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/job_service_rest_client_config.php @@ -963,6 +963,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1312,6 +1320,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1693,6 +1709,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -2090,6 +2114,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2443,6 +2475,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php b/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php index 762bd6bb20d1..df387b7502cf 100644 --- a/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php @@ -124,6 +124,7 @@ 'endpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'ragCorpus' => 'projects/{project}/locations/{location}/ragCorpora/{rag_corpus}', ], ], ], 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 65591076a5c0..070507f80e98 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 @@ -617,6 +617,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -966,6 +974,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1347,6 +1363,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1744,6 +1768,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2097,6 +2129,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/match_service_rest_client_config.php b/AiPlatform/src/V1/resources/match_service_rest_client_config.php index 4ce497ec30af..660974c7592f 100644 --- a/AiPlatform/src/V1/resources/match_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/match_service_rest_client_config.php @@ -583,6 +583,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -932,6 +940,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1313,6 +1329,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1710,6 +1734,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2063,6 +2095,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php index 00c31337c8c0..253617e007db 100644 --- a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php @@ -929,6 +929,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1278,6 +1286,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1659,6 +1675,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -2056,6 +2080,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2409,6 +2441,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php index 9ac5efc5a562..5b384fc1d5a1 100644 --- a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php @@ -583,6 +583,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -932,6 +940,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1313,6 +1329,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1710,6 +1734,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2063,6 +2095,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php index 048821d76ba5..8e96aff2cdf3 100644 --- a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php @@ -570,6 +570,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -919,6 +927,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1300,6 +1316,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1697,6 +1721,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2050,6 +2082,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/model_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_service_rest_client_config.php index ad14bea27950..52f1f9c4e027 100644 --- a/AiPlatform/src/V1/resources/model_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_service_rest_client_config.php @@ -770,6 +770,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1119,6 +1127,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1500,6 +1516,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1897,6 +1921,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2250,6 +2282,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php index d5c9e3dcf765..a21fddf57650 100644 --- a/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php @@ -746,6 +746,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1095,6 +1103,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1476,6 +1492,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1873,6 +1897,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2226,6 +2258,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php index 1a363e686841..cf94e36f92a1 100644 --- a/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php @@ -635,6 +635,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -984,6 +992,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1365,6 +1381,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1762,6 +1786,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2115,6 +2147,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php index 9b45f12d2ac1..95837a520d50 100644 --- a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php @@ -697,6 +697,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1046,6 +1054,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1427,6 +1443,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1824,6 +1848,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2177,6 +2209,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php b/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php index 17b7e796d03f..619637bf12b8 100644 --- a/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php @@ -245,6 +245,7 @@ 'endpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'ragCorpus' => 'projects/{project}/locations/{location}/ragCorpora/{rag_corpus}', ], ], ], 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 c73a982e7a5f..506190b1c511 100644 --- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php @@ -729,6 +729,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1078,6 +1086,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1459,6 +1475,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1856,6 +1880,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2209,6 +2241,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php b/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php index ff27bba792b5..4d2bf7f3d57e 100644 --- a/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php @@ -207,7 +207,9 @@ 'notebookExecutionJob' => 'projects/{project}/locations/{location}/notebookExecutionJobs/{notebook_execution_job}', 'notebookRuntimeTemplate' => 'projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}', 'pipelineJob' => 'projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}', + '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/schedule_service_rest_client_config.php b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php index a6af705ca409..d027cd5ce665 100644 --- a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php @@ -644,6 +644,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -993,6 +1001,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1374,6 +1390,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1771,6 +1795,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2124,6 +2156,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php index 916856d1368a..d5405934c7b8 100644 --- a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php @@ -620,6 +620,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -969,6 +977,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1350,6 +1366,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1747,6 +1771,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2100,6 +2132,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php index 1a6bf97f3d62..6c214e0be0b4 100644 --- a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php @@ -924,6 +924,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1273,6 +1281,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1654,6 +1670,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -2051,6 +2075,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2404,6 +2436,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/vertex_rag_data_service_client_config.json b/AiPlatform/src/V1/resources/vertex_rag_data_service_client_config.json new file mode 100644 index 000000000000..46a4b48a724a --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_data_service_client_config.json @@ -0,0 +1,97 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.VertexRagDataService": { + "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": { + "CreateRagCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteRagCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteRagFile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRagCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetRagFile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ImportRagFiles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRagCorpora": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListRagFiles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateRagCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UploadRagFile": { + "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/vertex_rag_data_service_descriptor_config.php b/AiPlatform/src/V1/resources/vertex_rag_data_service_descriptor_config.php new file mode 100644 index 000000000000..0d01e2da11d5 --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_data_service_descriptor_config.php @@ -0,0 +1,283 @@ + [ + 'google.cloud.aiplatform.v1.VertexRagDataService' => [ + 'CreateRagCorpus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\RagCorpus', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\CreateRagCorpusOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRagCorpus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRagFile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportRagFiles' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\ImportRagFilesResponse', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\ImportRagFilesOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRagCorpus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\RagCorpus', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\UpdateRagCorpusOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'rag_corpus.name', + 'fieldAccessors' => [ + 'getRagCorpus', + 'getName', + ], + ], + ], + ], + 'GetRagCorpus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\RagCorpus', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRagFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\RagFile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRagCorpora' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRagCorpora', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListRagCorporaResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRagFiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRagFiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListRagFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UploadRagFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\UploadRagFileResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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' => [ + 'endpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', + 'location' => 'projects/{project}/locations/{location}', + 'model' => 'projects/{project}/locations/{location}/models/{model}', + 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', + 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'ragCorpus' => 'projects/{project}/locations/{location}/ragCorpora/{rag_corpus}', + 'ragFile' => 'projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}', + 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/vertex_rag_data_service_rest_client_config.php b/AiPlatform/src/V1/resources/vertex_rag_data_service_rest_client_config.php new file mode 100644 index 000000000000..730598393565 --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_data_service_rest_client_config.php @@ -0,0 +1,2269 @@ + [ + 'google.cloud.aiplatform.v1.VertexRagDataService' => [ + 'CreateRagCorpus' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ragCorpora', + 'body' => 'rag_corpus', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRagCorpus' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteRagFile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRagCorpus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRagFile' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportRagFiles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRagCorpora' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/ragCorpora', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRagFiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateRagCorpus' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{rag_corpus.name=projects/*/locations/*/ragCorpora/*}', + 'body' => 'rag_corpus', + 'placeholders' => [ + 'rag_corpus.name' => [ + 'getters' => [ + 'getRagCorpus', + 'getName', + ], + ], + ], + ], + 'UploadRagFile' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/ragCorpora/*}/ragFiles:upload', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/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/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/vertex_rag_service_client_config.json b/AiPlatform/src/V1/resources/vertex_rag_service_client_config.json new file mode 100644 index 000000000000..aa26fd94ca73 --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.VertexRagService": { + "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": { + "AugmentPrompt": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CorroborateContent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RetrieveContexts": { + "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/vertex_rag_service_descriptor_config.php b/AiPlatform/src/V1/resources/vertex_rag_service_descriptor_config.php new file mode 100644 index 000000000000..7aac4994fc0d --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_service_descriptor_config.php @@ -0,0 +1,141 @@ + [ + 'google.cloud.aiplatform.v1.VertexRagService' => [ + 'AugmentPrompt' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\AugmentPromptResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CorroborateContent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\CorroborateContentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RetrieveContexts' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\RetrieveContextsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + '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}', + 'ragCorpus' => 'projects/{project}/locations/{location}/ragCorpora/{rag_corpus}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/vertex_rag_service_rest_client_config.php b/AiPlatform/src/V1/resources/vertex_rag_service_rest_client_config.php new file mode 100644 index 000000000000..fe63e3291552 --- /dev/null +++ b/AiPlatform/src/V1/resources/vertex_rag_service_rest_client_config.php @@ -0,0 +1,2190 @@ + [ + 'google.cloud.aiplatform.v1.VertexRagService' => [ + 'AugmentPrompt' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:augmentPrompt', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CorroborateContent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:corroborateContent', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RetrieveContexts' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:retrieveContexts', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + '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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}: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/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/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/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/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/vizier_service_rest_client_config.php b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php index 89a97dc315ec..fce739f64dec 100644 --- a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php @@ -733,6 +733,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1082,6 +1090,14 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1463,6 +1479,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1860,6 +1884,14 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', @@ -2213,6 +2245,14 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/ragCorpora/*/ragFiles/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', diff --git a/AiPlatform/tests/Unit/V1/Client/EndpointServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/EndpointServiceClientTest.php index bd09cb515175..5bb3e977b32f 100644 --- a/AiPlatform/tests/Unit/V1/Client/EndpointServiceClientTest.php +++ b/AiPlatform/tests/Unit/V1/Client/EndpointServiceClientTest.php @@ -40,6 +40,7 @@ use Google\Cloud\AIPlatform\V1\MutateDeployedModelResponse; use Google\Cloud\AIPlatform\V1\UndeployModelRequest; use Google\Cloud\AIPlatform\V1\UndeployModelResponse; +use Google\Cloud\AIPlatform\V1\UpdateEndpointLongRunningRequest; use Google\Cloud\AIPlatform\V1\UpdateEndpointRequest; use Google\Cloud\Iam\V1\GetIamPolicyRequest; use Google\Cloud\Iam\V1\Policy; @@ -1008,6 +1009,154 @@ public function updateEndpointExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateEndpointLongRunningTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEndpointLongRunningTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $etag = 'etag3123477'; + $network = 'network1843485230'; + $enablePrivateServiceConnect = true; + $modelDeploymentMonitoringJob = 'modelDeploymentMonitoringJob1797127786'; + $dedicatedEndpointEnabled = false; + $dedicatedEndpointDns = 'dedicatedEndpointDns598984655'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Endpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setEtag($etag); + $expectedResponse->setNetwork($network); + $expectedResponse->setEnablePrivateServiceConnect($enablePrivateServiceConnect); + $expectedResponse->setModelDeploymentMonitoringJob($modelDeploymentMonitoringJob); + $expectedResponse->setDedicatedEndpointEnabled($dedicatedEndpointEnabled); + $expectedResponse->setDedicatedEndpointDns($dedicatedEndpointDns); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEndpointLongRunningTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $endpoint = new Endpoint(); + $endpointDisplayName = 'endpointDisplayName697270680'; + $endpoint->setDisplayName($endpointDisplayName); + $request = (new UpdateEndpointLongRunningRequest())->setEndpoint($endpoint); + $response = $gapicClient->updateEndpointLongRunning($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.EndpointService/UpdateEndpointLongRunning', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEndpoint(); + $this->assertProtobufEquals($endpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEndpointLongRunningTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateEndpointLongRunningExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEndpointLongRunningTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $endpoint = new Endpoint(); + $endpointDisplayName = 'endpointDisplayName697270680'; + $endpoint->setDisplayName($endpointDisplayName); + $request = (new UpdateEndpointLongRunningRequest())->setEndpoint($endpoint); + $response = $gapicClient->updateEndpointLongRunning($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEndpointLongRunningTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function getLocationTest() { diff --git a/AiPlatform/tests/Unit/V1/Client/VertexRagDataServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/VertexRagDataServiceClientTest.php new file mode 100644 index 000000000000..c3afb6bf871f --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/VertexRagDataServiceClientTest.php @@ -0,0 +1,1512 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return VertexRagDataServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VertexRagDataServiceClient($options); + } + + /** @test */ + public function createRagCorpusTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new RagCorpus(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRagCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ragCorpus = new RagCorpus(); + $ragCorpusDisplayName = 'ragCorpusDisplayName705237069'; + $ragCorpus->setDisplayName($ragCorpusDisplayName); + $request = (new CreateRagCorpusRequest())->setParent($formattedParent)->setRagCorpus($ragCorpus); + $response = $gapicClient->createRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/CreateRagCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRagCorpus(); + $this->assertProtobufEquals($ragCorpus, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRagCorpusTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRagCorpusExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ragCorpus = new RagCorpus(); + $ragCorpusDisplayName = 'ragCorpusDisplayName705237069'; + $ragCorpus->setDisplayName($ragCorpusDisplayName); + $request = (new CreateRagCorpusRequest())->setParent($formattedParent)->setRagCorpus($ragCorpus); + $response = $gapicClient->createRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRagCorpusTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRagCorpusTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRagCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new DeleteRagCorpusRequest())->setName($formattedName); + $response = $gapicClient->deleteRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/DeleteRagCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRagCorpusTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRagCorpusExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new DeleteRagCorpusRequest())->setName($formattedName); + $response = $gapicClient->deleteRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRagCorpusTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRagFileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRagFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRagFileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->ragFileName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]', '[RAG_FILE]'); + $request = (new DeleteRagFileRequest())->setName($formattedName); + $response = $gapicClient->deleteRagFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/DeleteRagFile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRagFileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRagFileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRagFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->ragFileName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]', '[RAG_FILE]'); + $request = (new DeleteRagFileRequest())->setName($formattedName); + $response = $gapicClient->deleteRagFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRagFileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRagCorpusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new RagCorpus(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new GetRagCorpusRequest())->setName($formattedName); + $response = $gapicClient->getRagCorpus($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.VertexRagDataService/GetRagCorpus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRagCorpusExceptionTest() + { + $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 + $formattedName = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new GetRagCorpusRequest())->setName($formattedName); + try { + $gapicClient->getRagCorpus($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 getRagFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new RagFile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->ragFileName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]', '[RAG_FILE]'); + $request = (new GetRagFileRequest())->setName($formattedName); + $response = $gapicClient->getRagFile($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.VertexRagDataService/GetRagFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRagFileExceptionTest() + { + $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 + $formattedName = $gapicClient->ragFileName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]', '[RAG_FILE]'); + $request = (new GetRagFileRequest())->setName($formattedName); + try { + $gapicClient->getRagFile($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 importRagFilesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importRagFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $partialFailuresGcsPath = 'partialFailuresGcsPath-1343788955'; + $importedRagFilesCount = 1148003429; + $failedRagFilesCount = 854525026; + $skippedRagFilesCount = 1294759791; + $expectedResponse = new ImportRagFilesResponse(); + $expectedResponse->setPartialFailuresGcsPath($partialFailuresGcsPath); + $expectedResponse->setImportedRagFilesCount($importedRagFilesCount); + $expectedResponse->setFailedRagFilesCount($failedRagFilesCount); + $expectedResponse->setSkippedRagFilesCount($skippedRagFilesCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importRagFilesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $importRagFilesConfig = new ImportRagFilesConfig(); + $request = (new ImportRagFilesRequest()) + ->setParent($formattedParent) + ->setImportRagFilesConfig($importRagFilesConfig); + $response = $gapicClient->importRagFiles($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/ImportRagFiles', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getImportRagFilesConfig(); + $this->assertProtobufEquals($importRagFilesConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importRagFilesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importRagFilesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importRagFilesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $importRagFilesConfig = new ImportRagFilesConfig(); + $request = (new ImportRagFilesRequest()) + ->setParent($formattedParent) + ->setImportRagFilesConfig($importRagFilesConfig); + $response = $gapicClient->importRagFiles($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importRagFilesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listRagCorporaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $ragCorporaElement = new RagCorpus(); + $ragCorpora = [$ragCorporaElement]; + $expectedResponse = new ListRagCorporaResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRagCorpora($ragCorpora); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRagCorporaRequest())->setParent($formattedParent); + $response = $gapicClient->listRagCorpora($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRagCorpora()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/ListRagCorpora', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRagCorporaExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRagCorporaRequest())->setParent($formattedParent); + try { + $gapicClient->listRagCorpora($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 listRagFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $ragFilesElement = new RagFile(); + $ragFiles = [$ragFilesElement]; + $expectedResponse = new ListRagFilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRagFiles($ragFiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new ListRagFilesRequest())->setParent($formattedParent); + $response = $gapicClient->listRagFiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRagFiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/ListRagFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRagFilesExceptionTest() + { + $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 + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $request = (new ListRagFilesRequest())->setParent($formattedParent); + try { + $gapicClient->listRagFiles($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 updateRagCorpusTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new RagCorpus(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRagCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $ragCorpus = new RagCorpus(); + $ragCorpusDisplayName = 'ragCorpusDisplayName705237069'; + $ragCorpus->setDisplayName($ragCorpusDisplayName); + $request = (new UpdateRagCorpusRequest())->setRagCorpus($ragCorpus); + $response = $gapicClient->updateRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/UpdateRagCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRagCorpus(); + $this->assertProtobufEquals($ragCorpus, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRagCorpusTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRagCorpusExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $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 + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $ragCorpus = new RagCorpus(); + $ragCorpusDisplayName = 'ragCorpusDisplayName705237069'; + $ragCorpus->setDisplayName($ragCorpusDisplayName); + $request = (new UpdateRagCorpusRequest())->setRagCorpus($ragCorpus); + $response = $gapicClient->updateRagCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRagCorpusTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() 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 stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function uploadRagFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UploadRagFileResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $ragFile = new RagFile(); + $ragFileDisplayName = 'ragFileDisplayName-2098376679'; + $ragFile->setDisplayName($ragFileDisplayName); + $uploadRagFileConfig = new UploadRagFileConfig(); + $request = (new UploadRagFileRequest()) + ->setParent($formattedParent) + ->setRagFile($ragFile) + ->setUploadRagFileConfig($uploadRagFileConfig); + $response = $gapicClient->uploadRagFile($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.VertexRagDataService/UploadRagFile', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRagFile(); + $this->assertProtobufEquals($ragFile, $actualValue); + $actualValue = $actualRequestObject->getUploadRagFileConfig(); + $this->assertProtobufEquals($uploadRagFileConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadRagFileExceptionTest() + { + $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 + $formattedParent = $gapicClient->ragCorpusName('[PROJECT]', '[LOCATION]', '[RAG_CORPUS]'); + $ragFile = new RagFile(); + $ragFileDisplayName = 'ragFileDisplayName-2098376679'; + $ragFile->setDisplayName($ragFileDisplayName); + $uploadRagFileConfig = new UploadRagFileConfig(); + $request = (new UploadRagFileRequest()) + ->setParent($formattedParent) + ->setRagFile($ragFile) + ->setUploadRagFileConfig($uploadRagFileConfig); + try { + $gapicClient->uploadRagFile($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 createRagCorpusAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRagCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new RagCorpus(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRagCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $ragCorpus = new RagCorpus(); + $ragCorpusDisplayName = 'ragCorpusDisplayName705237069'; + $ragCorpus->setDisplayName($ragCorpusDisplayName); + $request = (new CreateRagCorpusRequest())->setParent($formattedParent)->setRagCorpus($ragCorpus); + $response = $gapicClient->createRagCorpusAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.VertexRagDataService/CreateRagCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRagCorpus(); + $this->assertProtobufEquals($ragCorpus, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRagCorpusTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/Client/VertexRagServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/VertexRagServiceClientTest.php new file mode 100644 index 000000000000..6055a1d1cfd8 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/VertexRagServiceClientTest.php @@ -0,0 +1,632 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return VertexRagServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VertexRagServiceClient($options); + } + + /** @test */ + public function augmentPromptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AugmentPromptResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new AugmentPromptRequest())->setParent($formattedParent); + $response = $gapicClient->augmentPrompt($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.VertexRagService/AugmentPrompt', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function augmentPromptExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new AugmentPromptRequest())->setParent($formattedParent); + try { + $gapicClient->augmentPrompt($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 corroborateContentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $corroborationScore = -3537026; + $expectedResponse = new CorroborateContentResponse(); + $expectedResponse->setCorroborationScore($corroborationScore); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CorroborateContentRequest())->setParent($formattedParent); + $response = $gapicClient->corroborateContent($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.VertexRagService/CorroborateContent', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function corroborateContentExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new CorroborateContentRequest())->setParent($formattedParent); + try { + $gapicClient->corroborateContent($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 retrieveContextsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RetrieveContextsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $query = new RagQuery(); + $request = (new RetrieveContextsRequest())->setParent($formattedParent)->setQuery($query); + $response = $gapicClient->retrieveContexts($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.VertexRagService/RetrieveContexts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function retrieveContextsExceptionTest() + { + $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 + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $query = new RagQuery(); + $request = (new RetrieveContextsRequest())->setParent($formattedParent)->setQuery($query); + try { + $gapicClient->retrieveContexts($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 augmentPromptAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AugmentPromptResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new AugmentPromptRequest())->setParent($formattedParent); + $response = $gapicClient->augmentPromptAsync($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.VertexRagService/AugmentPrompt', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +}