From 87f4038ec3220bdf653d3bb47f07120b34f0112b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sun, 12 Apr 2026 10:02:25 +0000 Subject: [PATCH 1/2] feat: Added CMEK support feat: Added UpdateIndex support docs: Updated documentation for listing locations docs: Updated documentation for Collection.data_schema PiperOrigin-RevId: 898465628 Source-Link: https://github.com/googleapis/googleapis/commit/8d0f6d8615c72d1907aeec8984d68df50fb6b697 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1965238533cfce3b99d41388e9e19dd22c3490e0 Copy-Tag: eyJwIjoiVmVjdG9yU2VhcmNoLy5Pd2xCb3QueWFtbCIsImgiOiIxOTY1MjM4NTMzY2ZjZTNiOTlkNDEzODhlOWUxOWRkMjJjMzQ5MGUwIn0= --- .../Google/Cloud/Vectorsearch/V1/Common.php | 24 + .../Cloud/Vectorsearch/V1/DataObject.php | 28 + .../V1/DataObjectSearchService.php | 32 + .../Vectorsearch/V1/DataObjectService.php | 31 + .../Cloud/Vectorsearch/V1/EmbeddingConfig.php | 25 + .../Cloud/Vectorsearch/V1/EncryptionSpec.php | 26 + .../Vectorsearch/V1/VectorsearchService.php | 38 + .../V1/AggregateDataObjectsRequest.php | 154 ++ .../V1/AggregateDataObjectsResponse.php | 68 + .../VectorSearch/V1/AggregationMethod.php | 54 + .../V1/BatchCreateDataObjectsRequest.php | 118 ++ .../V1/BatchCreateDataObjectsResponse.php | 68 + .../V1/BatchDeleteDataObjectsRequest.php | 128 ++ .../V1/BatchSearchDataObjectsRequest.php | 149 ++ .../CombineResultsOptions.php | 159 ++ .../V1/BatchSearchDataObjectsResponse.php | 71 + .../V1/BatchUpdateDataObjectsRequest.php | 138 ++ .../V1/BatchUpdateDataObjectsResponse.php | 34 + .../Cloud/VectorSearch/V1/Collection.php | 411 +++++ .../V1/CreateCollectionRequest.php | 257 +++ .../V1/CreateDataObjectRequest.php | 189 ++ .../VectorSearch/V1/CreateIndexRequest.php | 267 +++ .../Cloud/VectorSearch/V1/DataObject.php | 317 ++++ .../V1/DedicatedInfrastructure.php | 121 ++ .../AutoscalingSpec.php | 125 ++ .../V1/DedicatedInfrastructure/Mode.php | 61 + .../V1/DeleteCollectionRequest.php | 155 ++ .../V1/DeleteDataObjectRequest.php | 134 ++ .../VectorSearch/V1/DeleteIndexRequest.php | 165 ++ .../Cloud/VectorSearch/V1/DenseScannIndex.php | 67 + .../V1/DenseScannIndex/FeatureNormType.php | 61 + .../Cloud/VectorSearch/V1/DenseVector.php | 67 + .../VectorSearch/V1/DenseVectorField.php | 115 ++ .../Cloud/VectorSearch/V1/DistanceMetric.php | 61 + .../VectorSearch/V1/EmbeddingTaskType.php | 103 ++ .../Cloud/VectorSearch/V1/EncryptionSpec.php | 80 + .../V1/ExportDataObjectsMetadata.php | 121 ++ .../V1/ExportDataObjectsRequest.php | 118 ++ .../GcsExportDestination.php | 105 ++ .../GcsExportDestination/Format.php | 54 + .../V1/ExportDataObjectsResponse.php | 33 + .../VectorSearch/V1/GetCollectionRequest.php | 81 + .../VectorSearch/V1/GetDataObjectRequest.php | 92 + .../Cloud/VectorSearch/V1/GetIndexRequest.php | 81 + .../V1/ImportDataObjectsMetadata.php | 190 ++ .../V1/ImportDataObjectsRequest.php | 114 ++ .../GcsImportConfig.php | 151 ++ .../V1/ImportDataObjectsResponse.php | 78 + .../Google/Cloud/VectorSearch/V1/Index.php | 489 +++++ .../V1/ListCollectionsRequest.php | 221 +++ .../V1/ListCollectionsResponse.php | 135 ++ .../VectorSearch/V1/ListIndexesRequest.php | 221 +++ .../VectorSearch/V1/ListIndexesResponse.php | 101 ++ .../VectorSearch/V1/OperationMetadata.php | 311 ++++ .../Cloud/VectorSearch/V1/OutputFields.php | 135 ++ .../V1/QueryDataObjectsRequest.php | 256 +++ .../V1/QueryDataObjectsResponse.php | 110 ++ .../Google/Cloud/VectorSearch/V1/Ranker.php | 75 + .../VectorSearch/V1/ReciprocalRankFusion.php | 67 + .../Google/Cloud/VectorSearch/V1/Search.php | 141 ++ .../V1/SearchDataObjectsRequest.php | 275 +++ .../V1/SearchDataObjectsResponse.php | 109 ++ .../Cloud/VectorSearch/V1/SearchHint.php | 111 ++ .../VectorSearch/V1/SearchHint/IndexHint.php | 79 + .../VectorSearch/V1/SearchHint/KnnHint.php | 34 + .../Cloud/VectorSearch/V1/SearchResult.php | 125 ++ .../Cloud/VectorSearch/V1/SemanticSearch.php | 327 ++++ .../Cloud/VectorSearch/V1/SparseVector.php | 101 ++ .../VectorSearch/V1/SparseVectorField.php | 33 + .../Cloud/VectorSearch/V1/TextSearch.php | 237 +++ .../V1/UpdateCollectionRequest.php | 282 +++ .../V1/UpdateDataObjectRequest.php | 142 ++ .../VectorSearch/V1/UpdateIndexRequest.php | 272 +++ .../Google/Cloud/VectorSearch/V1/Vector.php | 108 ++ .../Cloud/VectorSearch/V1/VectorField.php | 108 ++ .../Cloud/VectorSearch/V1/VectorSearch.php | 368 ++++ .../VectorSearch/V1/VertexEmbeddingConfig.php | 152 ++ .../aggregate_data_objects.php | 80 + .../batch_search_data_objects.php | 79 + .../get_location.php | 57 + .../list_locations.php | 78 + .../query_data_objects.php | 81 + .../search_data_objects.php | 81 + .../batch_create_data_objects.php | 104 ++ .../batch_delete_data_objects.php | 91 + .../batch_update_data_objects.php | 85 + .../create_data_object.php | 85 + .../delete_data_object.php | 76 + .../get_data_object.php | 78 + .../DataObjectServiceClient/get_location.php | 57 + .../list_locations.php | 78 + .../update_data_object.php | 59 + .../create_collection.php | 92 + .../create_index.php | 104 ++ .../delete_collection.php | 84 + .../delete_index.php | 87 + .../export_data_objects.php | 89 + .../get_collection.php | 75 + .../VectorSearchServiceClient/get_index.php | 76 + .../get_location.php | 57 + .../import_data_objects.php | 88 + .../list_collections.php | 76 + .../list_indexes.php | 80 + .../list_locations.php | 78 + .../update_collection.php | 71 + .../update_index.php | 84 + .../Client/DataObjectSearchServiceClient.php | 441 +++++ .../src/V1/Client/DataObjectServiceClient.php | 520 ++++++ .../V1/Client/VectorSearchServiceClient.php | 762 ++++++++ .../v1/src/V1/gapic_metadata.json | 181 ++ ...a_object_search_service_client_config.json | 64 + ...bject_search_service_descriptor_config.php | 130 ++ ...ject_search_service_rest_client_config.php | 148 ++ .../data_object_service_client_config.json | 103 ++ .../data_object_service_descriptor_config.php | 151 ++ ...data_object_service_rest_client_config.php | 186 ++ .../vector_search_service_client_config.json | 116 ++ ...ector_search_service_descriptor_config.php | 286 +++ ...ctor_search_service_rest_client_config.php | 246 +++ .../DataObjectSearchServiceClientTest.php | 510 ++++++ .../V1/Client/DataObjectServiceClientTest.php | 710 ++++++++ .../Client/VectorSearchServiceClientTest.php | 1599 +++++++++++++++++ 122 files changed, 18907 insertions(+) create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php create mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php create mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php create mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php create mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php create mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php new file mode 100644 index 000000000000..cd467ddbc772 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x84\x03\x0A)google/cloud/vectorsearch/v1/common.proto\x12\x1Cgoogle.cloud.vectorsearch.v1*W\x0A\x0EDistanceMetric\x12\x1F\x0A\x1BDISTANCE_METRIC_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x01\x12\x13\x0A\x0FCOSINE_DISTANCE\x10\x02B\xD7\x01\x0A com.google.cloud.vectorsearch.v1B\x0BCommonProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php new file mode 100644 index 000000000000..a0be445d7b98 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xB1\x09\x0A.google/cloud/vectorsearch/v1/data_object.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAD\x04\x0A\x0ADataObject\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1B\x0A\x0Edata_object_id\x18\x02 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12*\x0A\x04data\x18\x06 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12K\x0A\x07vectors\x18\x07 \x03(\x0B25.google.cloud.vectorsearch.v1.DataObject.VectorsEntryB\x03\xE0A\x01\x12\x11\x0A\x04etag\x18\x08 \x01(\x09B\x03\xE0A\x01\x1AT\x0A\x0CVectorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x123\x0A\x05value\x18\x02 \x01(\x0B2\$.google.cloud.vectorsearch.v1.Vector:\x028\x01:\xA0\x01\xEAA\x9C\x01\x0A&vectorsearch.googleapis.com/DataObject\x12Yprojects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}*\x0BdataObjects2\x0AdataObject\"\x91\x01\x0A\x06Vector\x12:\x0A\x05dense\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.DenseVectorH\x00\x12<\x0A\x06sparse\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.SparseVectorH\x00B\x0D\x0A\x0Bvector_type\"\"\x0A\x0BDenseVector\x12\x13\x0A\x06values\x18\x01 \x03(\x02B\x03\xE0A\x02\"9\x0A\x0CSparseVector\x12\x13\x0A\x06values\x18\x01 \x03(\x02B\x03\xE0A\x02\x12\x14\x0A\x07indices\x18\x02 \x03(\x05B\x03\xE0A\x02B\xDB\x01\x0A com.google.cloud.vectorsearch.v1B\x0FDataObjectProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php new file mode 100644 index 000000000000..34f80ed9d5b4 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xD6)\x0A=google/cloud/vectorsearch/v1/data_object_search_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A.google/cloud/vectorsearch/v1/data_object.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A\x1Cgoogle/protobuf/struct.proto\"b\x0A\x0COutputFields\x12\x18\x0A\x0Bdata_fields\x18\x01 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dvector_fields\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1C\x0A\x0Fmetadata_fields\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x85\x02\x0A\x0ASearchHint\x12I\x0A\x08knn_hint\x18\x03 \x01(\x0B20.google.cloud.vectorsearch.v1.SearchHint.KnnHintB\x03\xE0A\x01H\x00\x12M\x0A\x0Aindex_hint\x18\x04 \x01(\x0B22.google.cloud.vectorsearch.v1.SearchHint.IndexHintB\x03\xE0A\x01H\x00\x1AD\x0A\x09IndexHint\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x1A\x09\x0A\x07KnnHintB\x0C\x0A\x0Aindex_type\"\xE6\x01\x0A\x06Search\x12C\x0A\x0Dvector_search\x18\x01 \x01(\x0B2*.google.cloud.vectorsearch.v1.VectorSearchH\x00\x12G\x0A\x0Fsemantic_search\x18\x02 \x01(\x0B2,.google.cloud.vectorsearch.v1.SemanticSearchH\x00\x12?\x0A\x0Btext_search\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.TextSearchH\x00B\x0D\x0A\x0Bsearch_type\"\xE3\x03\x0A\x0CVectorSearch\x12;\x0A\x06vector\x18\x01 \x01(\x0B2).google.cloud.vectorsearch.v1.DenseVectorH\x00\x12C\x0A\x0Dsparse_vector\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.SparseVectorH\x00\x12\x19\x0A\x0Csearch_field\x18\x08 \x01(\x09B\x03\xE0A\x02\x12,\x0A\x06filter\x18\x04 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x05 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12F\x0A\x0Doutput_fields\x18\x07 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12B\x0A\x0Bsearch_hint\x18\x09 \x01(\x0B2(.google.cloud.vectorsearch.v1.SearchHintB\x03\xE0A\x01\x12J\x0A\x0Fdistance_metric\x18\x0B \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01B\x0D\x0A\x0Bvector_typeB\x08\x0A\x06_top_k\"\xEB\x02\x0A\x0ESemanticSearch\x12\x18\x0A\x0Bsearch_text\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Csearch_field\x18\x02 \x01(\x09B\x03\xE0A\x02\x12G\x0A\x09task_type\x18\x05 \x01(\x0E2/.google.cloud.vectorsearch.v1.EmbeddingTaskTypeB\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12,\x0A\x06filter\x18\x06 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x04 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12B\x0A\x0Bsearch_hint\x18\x07 \x01(\x0B2(.google.cloud.vectorsearch.v1.SearchHintB\x03\xE0A\x01B\x08\x0A\x06_top_k\"\xDE\x01\x0A\x0ATextSearch\x12\x18\x0A\x0Bsearch_text\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1D\x0A\x10data_field_names\x18\x02 \x03(\x09B\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x04 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12,\x0A\x06filter\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01B\x08\x0A\x06_top_k\"\xEE\x02\x0A\x18SearchDataObjectsRequest\x12C\x0A\x0Dvector_search\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.VectorSearchH\x00\x12G\x0A\x0Fsemantic_search\x18\x04 \x01(\x0B2,.google.cloud.vectorsearch.v1.SemanticSearchH\x00\x12D\x0A\x0Btext_search\x18\x07 \x01(\x0B2(.google.cloud.vectorsearch.v1.TextSearchB\x03\xE0A\x01H\x00\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x05 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x06 \x01(\x09B\x03\xE0A\x01B\x0D\x0A\x0Bsearch_type\"{\x0A\x0CSearchResult\x12B\x0A\x0Bdata_object\x18\x01 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\x12\x1A\x0A\x08distance\x18\x02 \x01(\x01B\x03\xE0A\x03H\x00\x88\x01\x01B\x0B\x0A\x09_distance\"{\x0A\x19SearchDataObjectsResponse\x12@\x0A\x07results\x18\x01 \x03(\x0B2*.google.cloud.vectorsearch.v1.SearchResultB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xD4\x01\x0A\x1BAggregateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12,\x0A\x06filter\x18\x02 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12G\x0A\x09aggregate\x18\x03 \x01(\x0E2/.google.cloud.vectorsearch.v1.AggregationMethodB\x03\xE0A\x02\"W\x0A\x1CAggregateDataObjectsResponse\x127\x0A\x11aggregate_results\x18\x01 \x03(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x03\"\x80\x02\x0A\x17QueryDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12,\x0A\x06filter\x18\x02 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12F\x0A\x0Doutput_fields\x18\x07 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x05 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x06 \x01(\x09B\x03\xE0A\x01\"}\x0A\x18QueryDataObjectsResponse\x12C\x0A\x0Cdata_objects\x18\x04 \x03(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x03 \x01(\x09B\x03\xE0A\x03\"\xB6\x03\x0A\x1DBatchSearchDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12;\x0A\x08searches\x18\x02 \x03(\x0B2\$.google.cloud.vectorsearch.v1.SearchB\x03\xE0A\x02\x12g\x0A\x07combine\x18\x03 \x01(\x0B2Q.google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptionsB\x03\xE0A\x01\x1A\xAE\x01\x0A\x15CombineResultsOptions\x129\x0A\x06ranker\x18\x01 \x01(\x0B2\$.google.cloud.vectorsearch.v1.RankerB\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x12\x0A\x05top_k\x18\x03 \x01(\x05B\x03\xE0A\x01\"U\x0A\x06Ranker\x12A\x0A\x03rrf\x18\x01 \x01(\x0B22.google.cloud.vectorsearch.v1.ReciprocalRankFusionH\x00B\x08\x0A\x06ranker\",\x0A\x14ReciprocalRankFusion\x12\x14\x0A\x07weights\x18\x01 \x03(\x01B\x03\xE0A\x02\"o\x0A\x1EBatchSearchDataObjectsResponse\x12M\x0A\x07results\x18\x01 \x03(\x0B27.google.cloud.vectorsearch.v1.SearchDataObjectsResponseB\x03\xE0A\x03*B\x0A\x11AggregationMethod\x12\"\x0A\x1EAGGREGATION_METHOD_UNSPECIFIED\x10\x00\x12\x09\x0A\x05COUNT\x10\x012\xE6\x07\x0A\x17DataObjectSearchService\x12\xD5\x01\x0A\x11SearchDataObjects\x126.google.cloud.vectorsearch.v1.SearchDataObjectsRequest\x1A7.google.cloud.vectorsearch.v1.SearchDataObjectsResponse\"O\x82\xD3\xE4\x93\x02I\"D/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:search:\x01*\x12\xD1\x01\x0A\x10QueryDataObjects\x125.google.cloud.vectorsearch.v1.QueryDataObjectsRequest\x1A6.google.cloud.vectorsearch.v1.QueryDataObjectsResponse\"N\x82\xD3\xE4\x93\x02H\"C/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:query:\x01*\x12\xE1\x01\x0A\x14AggregateDataObjects\x129.google.cloud.vectorsearch.v1.AggregateDataObjectsRequest\x1A:.google.cloud.vectorsearch.v1.AggregateDataObjectsResponse\"R\x82\xD3\xE4\x93\x02L\"G/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:aggregate:\x01*\x12\xE9\x01\x0A\x16BatchSearchDataObjects\x12;.google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchSearchDataObjectsResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchSearch:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE8\x01\x0A com.google.cloud.vectorsearch.v1B\x1CDataObjectSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php new file mode 100644 index 000000000000..b3cfadbf1eaa --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xAC\x1A\x0A6google/cloud/vectorsearch/v1/data_object_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A.google/cloud/vectorsearch/v1/data_object.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xBA\x01\x0A\x17CreateDataObjectRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1B\x0A\x0Edata_object_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Bdata_object\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x02\"\xAD\x01\x0A\x1DBatchCreateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.cloud.vectorsearch.v1.CreateDataObjectRequestB\x03\xE0A\x02\"e\x0A\x1EBatchCreateDataObjectsResponse\x12C\x0A\x0Cdata_objects\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\"T\x0A\x14GetDataObjectRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/DataObject\"\x93\x01\x0A\x17UpdateDataObjectRequest\x12B\x0A\x0Bdata_object\x18\x01 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xAD\x01\x0A\x1DBatchUpdateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.cloud.vectorsearch.v1.UpdateDataObjectRequestB\x03\xE0A\x02\" \x0A\x1EBatchUpdateDataObjectsResponse\"j\x0A\x17DeleteDataObjectRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/DataObject\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xAD\x01\x0A\x1DBatchDeleteDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x03 \x03(\x0B25.google.cloud.vectorsearch.v1.DeleteDataObjectRequestB\x03\xE0A\x022\xF4\x0C\x0A\x11DataObjectService\x12\xEB\x01\x0A\x10CreateDataObject\x125.google.cloud.vectorsearch.v1.CreateDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"v\xDAA!parent,data_object,data_object_id\x82\xD3\xE4\x93\x02L\"=/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:\x0Bdata_object\x12\xE9\x01\x0A\x16BatchCreateDataObjects\x12;.google.cloud.vectorsearch.v1.BatchCreateDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchCreateDataObjectsResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate:\x01*\x12\xBB\x01\x0A\x0DGetDataObject\x122.google.cloud.vectorsearch.v1.GetDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}\x12\xED\x01\x0A\x10UpdateDataObject\x125.google.cloud.vectorsearch.v1.UpdateDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"x\xDAA\x17data_object,update_mask\x82\xD3\xE4\x93\x02X2I/v1/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}:\x0Bdata_object\x12\xFB\x01\x0A\x16BatchUpdateDataObjects\x12;.google.cloud.vectorsearch.v1.BatchUpdateDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchUpdateDataObjectsResponse\"f\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate:\x01*\x12\xAF\x01\x0A\x10DeleteDataObject\x125.google.cloud.vectorsearch.v1.DeleteDataObjectRequest\x1A\x16.google.protobuf.Empty\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}\x12\xD5\x01\x0A\x16BatchDeleteDataObjects\x12;.google.cloud.vectorsearch.v1.BatchDeleteDataObjectsRequest\x1A\x16.google.protobuf.Empty\"f\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE2\x01\x0A com.google.cloud.vectorsearch.v1B\x16DataObjectServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php new file mode 100644 index 000000000000..ac217693e49c --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xC2\x05\x0A3google/cloud/vectorsearch/v1/embedding_config.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\"\x93\x01\x0A\x15VertexEmbeddingConfig\x12\x15\x0A\x08model_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dtext_template\x18\x02 \x01(\x09B\x03\xE0A\x02\x12G\x0A\x09task_type\x18\x03 \x01(\x0E2/.google.cloud.vectorsearch.v1.EmbeddingTaskTypeB\x03\xE0A\x02*\xEB\x01\x0A\x11EmbeddingTaskType\x12#\x0A\x1FEMBEDDING_TASK_TYPE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRETRIEVAL_QUERY\x10\x01\x12\x16\x0A\x12RETRIEVAL_DOCUMENT\x10\x02\x12\x17\x0A\x13SEMANTIC_SIMILARITY\x10\x03\x12\x12\x0A\x0ECLASSIFICATION\x10\x04\x12\x0E\x0A\x0ACLUSTERING\x10\x05\x12\x16\x0A\x12QUESTION_ANSWERING\x10\x06\x12\x15\x0A\x11FACT_VERIFICATION\x10\x07\x12\x18\x0A\x14CODE_RETRIEVAL_QUERY\x10\x08B\xE0\x01\x0A com.google.cloud.vectorsearch.v1B\x14EmbeddingConfigProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php new file mode 100644 index 000000000000..af0cb82e4992 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xA8\x04\x0A2google/cloud/vectorsearch/v1/encryption_spec.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x19google/api/resource.proto\"T\x0A\x0EEncryptionSpec\x12B\x0A\x0Fcrypto_key_name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyB\xDA\x02\x0A com.google.cloud.vectorsearch.v1B\x13EncryptionSpecProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php new file mode 100644 index 000000000000..163e08d1aa1e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php @@ -0,0 +1,38 @@ +internalAddGeneratedFile( + "\x0A\xA5G\x0A7google/cloud/vectorsearch/v1/vectorsearch_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A2google/cloud/vectorsearch/v1/encryption_spec.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFE\x05\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12I\x0A\x06labels\x18\x04 \x03(\x0B24.google.cloud.vectorsearch.v1.Collection.LabelsEntryB\x03\xE0A\x01\x12V\x0A\x0Dvector_schema\x18\x07 \x03(\x0B2:.google.cloud.vectorsearch.v1.Collection.VectorSchemaEntryB\x03\xE0A\x01\x121\x0A\x0Bdata_schema\x18\x0A \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12M\x0A\x0Fencryption_spec\x18\x0B \x01(\x0B2,.google.cloud.vectorsearch.v1.EncryptionSpecB\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A^\x0A\x11VectorSchemaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.VectorField:\x028\x01:\x87\x01\xEAA\x83\x01\x0A&vectorsearch.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}*\x0Bcollections2\x0Acollection\"\xB5\x01\x0A\x0BVectorField\x12F\x0A\x0Cdense_vector\x18\x03 \x01(\x0B2..google.cloud.vectorsearch.v1.DenseVectorFieldH\x00\x12H\x0A\x0Dsparse_vector\x18\x04 \x01(\x0B2/.google.cloud.vectorsearch.v1.SparseVectorFieldH\x00B\x14\x0A\x12vector_type_config\"\x81\x01\x0A\x10DenseVectorField\x12\x12\x0A\x0Adimensions\x18\x01 \x01(\x05\x12Y\x0A\x17vertex_embedding_config\x18\x03 \x01(\x0B23.google.cloud.vectorsearch.v1.VertexEmbeddingConfigB\x03\xE0A\x01\"\x13\x0A\x11SparseVectorField\"\xB5\x01\x0A\x16ListCollectionsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x8B\x01\x0A\x17ListCollectionsResponse\x12=\x0A\x0Bcollections\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"T\x0A\x14GetCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\"\xD9\x01\x0A\x17CreateCollectionRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12A\x0A\x0Acollection\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB3\x01\x0A\x17UpdateCollectionRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12A\x0A\x0Acollection\x18\x02 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"x\x0A\x17DeleteCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA0\x06\x0A\x05Index\x12^\x0A\x18dedicated_infrastructure\x18\x0B \x01(\x0B25.google.cloud.vectorsearch.v1.DedicatedInfrastructureB\x03\xE0A\x01H\x00\x12I\x0A\x0Bdense_scann\x18\x0C \x01(\x0B2-.google.cloud.vectorsearch.v1.DenseScannIndexB\x03\xE0A\x01H\x01\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x0A \x03(\x0B2/.google.cloud.vectorsearch.v1.Index.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fdistance_metric\x18\x04 \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01\x12\x18\x0A\x0Bindex_field\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dfilter_fields\x18\x06 \x03(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cstore_fields\x18\x07 \x03(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x89\x01\xEAA\x85\x01\x0A!vectorsearch.googleapis.com/Index\x12Pprojects/{project}/locations/{location}/collections/{collection}/indexes/{index}*\x07indexes2\x05indexB\x0C\x0A\x0Ainfra_typeB\x0C\x0A\x0Aindex_type\"\xC5\x01\x0A\x12CreateIndexRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x05index\x18\x03 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA4\x01\x0A\x12UpdateIndexRequest\x127\x0A\x05index\x18\x01 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"n\x0A\x12DeleteIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x12ListIndexesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!vectorsearch.googleapis.com/Index\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13ListIndexesResponse\x124\x0A\x07indexes\x18\x01 \x03(\x0B2#.google.cloud.vectorsearch.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"J\x0A\x0FGetIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x9F\x02\x0A\x18ImportDataObjectsRequest\x12\\\x0A\x0Agcs_import\x18\x02 \x01(\x0B2F.google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfigH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A]\x0A\x0FGcsImportConfig\x12\x19\x0A\x0Ccontents_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09error_uri\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Aoutput_uri\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06config\"\xBF\x01\x0A\x19ImportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1A\x0A\x0Dsuccess_count\x18\x03 \x01(\x03B\x03\xE0A\x03\x12\x1A\x0A\x0Dfailure_count\x18\x04 \x01(\x03B\x03\xE0A\x03\"?\x0A\x19ImportDataObjectsResponse\x12\"\x0A\x06status\x18\x01 \x01(\x0B2\x12.google.rpc.Status\"\x97\x03\x0A\x18ExportDataObjectsRequest\x12f\x0A\x0Fgcs_destination\x18\x02 \x01(\x0B2K.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestinationH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A\xC5\x01\x0A\x14GcsExportDestination\x12\x17\x0A\x0Aexport_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12g\x0A\x06format\x18\x02 \x01(\x0E2R.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.FormatB\x03\xE0A\x02\"+\x0A\x06Format\x12\x16\x0A\x12FORMAT_UNSPECIFIED\x10\x00\x12\x09\x0A\x05JSONL\x10\x02B\x0D\x0A\x0Bdestination\"\x87\x01\x0A\x19ExportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bfinish_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x1B\x0A\x19ExportDataObjectsResponse\"\xFF\x02\x0A\x17DedicatedInfrastructure\x12R\x0A\x04mode\x18\x01 \x01(\x0E2:.google.cloud.vectorsearch.v1.DedicatedInfrastructure.ModeB\x03\xE0A\x01H\x00\x88\x01\x01\x12d\x0A\x10autoscaling_spec\x18\x02 \x01(\x0B2E.google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpecB\x03\xE0A\x01\x1AQ\x0A\x0FAutoscalingSpec\x12\x1E\x0A\x11min_replica_count\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x1E\x0A\x11max_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x01\"N\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11STORAGE_OPTIMIZED\x10\x01\x12\x19\x0A\x15PERFORMANCE_OPTIMIZED\x10\x02B\x07\x0A\x05_mode\"\xC2\x01\x0A\x0FDenseScannIndex\x12]\x0A\x11feature_norm_type\x18\x02 \x01(\x0E2=.google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormTypeB\x03\xE0A\x01\"P\x0A\x0FFeatureNormType\x12!\x0A\x1DFEATURE_NORM_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x10\x0A\x0CUNIT_L2_NORM\x10\x022\x8D\x15\x0A\x13VectorSearchService\x12\xC0\x01\x0A\x0FListCollections\x124.google.cloud.vectorsearch.v1.ListCollectionsRequest\x1A5.google.cloud.vectorsearch.v1.ListCollectionsResponse\"@\xDAA\x06parent\x82\xD3\xE4\x93\x021\x12//v1/{parent=projects/*/locations/*}/collections\x12\xAD\x01\x0A\x0DGetCollection\x122.google.cloud.vectorsearch.v1.GetCollectionRequest\x1A(.google.cloud.vectorsearch.v1.Collection\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/collections/*}\x12\xF2\x01\x0A\x10CreateCollection\x125.google.cloud.vectorsearch.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02=\"//v1/{parent=projects/*/locations/*}/collections:\x0Acollection\x12\xF4\x01\x0A\x10UpdateCollection\x125.google.cloud.vectorsearch.v1.UpdateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02H2:/v1/{collection.name=projects/*/locations/*/collections/*}:\x0Acollection\x12\xD5\x01\x0A\x10DeleteCollection\x125.google.cloud.vectorsearch.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"k\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x021*//v1/{name=projects/*/locations/*/collections/*}\x12\xBE\x01\x0A\x0BListIndexes\x120.google.cloud.vectorsearch.v1.ListIndexesRequest\x1A1.google.cloud.vectorsearch.v1.ListIndexesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/collections/*}/indexes\x12\xA8\x01\x0A\x08GetIndex\x12-.google.cloud.vectorsearch.v1.GetIndexRequest\x1A#.google.cloud.vectorsearch.v1.Index\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xDD\x01\x0A\x0BCreateIndex\x120.google.cloud.vectorsearch.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x15parent,index,index_id\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/collections/*}/indexes:\x05index\x12\xDF\x01\x0A\x0BUpdateIndex\x120.google.cloud.vectorsearch.v1.UpdateIndexRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x11index,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}:\x05index\x12\xD5\x01\x0A\x0BDeleteIndex\x120.google.cloud.vectorsearch.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xF2\x01\x0A\x11ImportDataObjects\x126.google.cloud.vectorsearch.v1.ImportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ImportDataObjectsResponse\x12\x19ImportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:importDataObjects:\x01*\x12\xF2\x01\x0A\x11ExportDataObjects\x126.google.cloud.vectorsearch.v1.ExportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ExportDataObjectsResponse\x12\x19ExportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE4\x01\x0A com.google.cloud.vectorsearch.v1B\x18VectorSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php new file mode 100644 index 000000000000..d5b23e5eed71 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php @@ -0,0 +1,154 @@ +google.cloud.vectorsearch.v1.AggregateDataObjectsRequest + */ +class AggregateDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + /** + * Required. The aggregation method to apply to the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $aggregate = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * @type \Google\Protobuf\Struct $filter + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * @type int $aggregate + * Required. The aggregation method to apply to the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->filter = $var; + + return $this; + } + + /** + * Required. The aggregation method to apply to the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAggregate() + { + return $this->aggregate; + } + + /** + * Required. The aggregation method to apply to the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAggregate($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\AggregationMethod::class); + $this->aggregate = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php new file mode 100644 index 000000000000..8ea65dd63840 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php @@ -0,0 +1,68 @@ +google.cloud.vectorsearch.v1.AggregateDataObjectsResponse + */ +class AggregateDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The aggregated results of the query. + * + * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $aggregate_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct[] $aggregate_results + * Output only. The aggregated results of the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The aggregated results of the query. + * + * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Protobuf\Struct> + */ + public function getAggregateResults() + { + return $this->aggregate_results; + } + + /** + * Output only. The aggregated results of the query. + * + * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Struct[] $var + * @return $this + */ + public function setAggregateResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); + $this->aggregate_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php new file mode 100644 index 000000000000..fed256de20ce --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php @@ -0,0 +1,54 @@ +google.cloud.vectorsearch.v1.AggregationMethod + */ +class AggregationMethod +{ + /** + * Should not be used. + * + * Generated from protobuf enum AGGREGATION_METHOD_UNSPECIFIED = 0; + */ + const AGGREGATION_METHOD_UNSPECIFIED = 0; + /** + * Count the number of data objects that match the filter. + * + * Generated from protobuf enum COUNT = 1; + */ + const COUNT = 1; + + private static $valueToName = [ + self::AGGREGATION_METHOD_UNSPECIFIED => 'AGGREGATION_METHOD_UNSPECIFIED', + self::COUNT => 'COUNT', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php new file mode 100644 index 000000000000..7312e88d14d3 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php @@ -0,0 +1,118 @@ +google.cloud.vectorsearch.v1.BatchCreateDataObjectsRequest + */ +class BatchCreateDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection to create the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the CreateDataObjectRequest messages must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The request message specifying the resources to create. + * A maximum of 1000 DataObjects can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection to create the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the CreateDataObjectRequest messages must match this + * field. + * @type \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest[] $requests + * Required. The request message specifying the resources to create. + * A maximum of 1000 DataObjects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection to create the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the CreateDataObjectRequest messages must match this + * field. + * + * 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 Collection to create the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the CreateDataObjectRequest messages must match this + * field. + * + * 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 request message specifying the resources to create. + * A maximum of 1000 DataObjects can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\CreateDataObjectRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The request message specifying the resources to create. + * A maximum of 1000 DataObjects can be created in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php new file mode 100644 index 000000000000..724830369569 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php @@ -0,0 +1,68 @@ +google.cloud.vectorsearch.v1.BatchCreateDataObjectsResponse + */ +class BatchCreateDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. DataObjects created. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $data_objects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DataObject[] $data_objects + * Output only. DataObjects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. DataObjects created. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DataObject> + */ + public function getDataObjects() + { + return $this->data_objects; + } + + /** + * Output only. DataObjects created. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VectorSearch\V1\DataObject[] $var + * @return $this + */ + public function setDataObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DataObject::class); + $this->data_objects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php new file mode 100644 index 000000000000..0288323d7c76 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php @@ -0,0 +1,128 @@ +google.cloud.vectorsearch.v1.BatchDeleteDataObjectsRequest + */ +class BatchDeleteDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection to delete the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The request message specifying the resources to delete. + * A maximum of 1000 DataObjects can be deleted in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource name of the Collection to delete the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. Please see + * {@see DataObjectServiceClient::collectionName()} for help formatting this field. + * @param \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $requests Required. The request message specifying the resources to delete. + * A maximum of 1000 DataObjects can be deleted in a batch. + * + * @return \Google\Cloud\VectorSearch\V1\BatchDeleteDataObjectsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection to delete the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * @type \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $requests + * Required. The request message specifying the resources to delete. + * A maximum of 1000 DataObjects can be deleted in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection to delete the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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 Collection to delete the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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 request message specifying the resources to delete. + * A maximum of 1000 DataObjects can be deleted in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The request message specifying the resources to delete. + * A maximum of 1000 DataObjects can be deleted in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php new file mode 100644 index 000000000000..e0a0b9bef1c4 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php @@ -0,0 +1,149 @@ +google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest + */ +class BatchSearchDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A list of search requests to execute in parallel. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $searches; + /** + * Optional. Options for combining the results of the batch search operations. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $combine = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * @type \Google\Cloud\VectorSearch\V1\Search[] $searches + * Required. A list of search requests to execute in parallel. + * @type \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions $combine + * Optional. Options for combining the results of the batch search operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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. A list of search requests to execute in parallel. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Search> + */ + public function getSearches() + { + return $this->searches; + } + + /** + * Required. A list of search requests to execute in parallel. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Search[] $var + * @return $this + */ + public function setSearches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Search::class); + $this->searches = $arr; + + return $this; + } + + /** + * Optional. Options for combining the results of the batch search operations. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions|null + */ + public function getCombine() + { + return $this->combine; + } + + public function hasCombine() + { + return isset($this->combine); + } + + public function clearCombine() + { + unset($this->combine); + } + + /** + * Optional. Options for combining the results of the batch search operations. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions $var + * @return $this + */ + public function setCombine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions::class); + $this->combine = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php new file mode 100644 index 000000000000..35714245de22 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php @@ -0,0 +1,159 @@ +google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions + */ +class CombineResultsOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ranker to use for combining the results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ranker = null; + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_fields = null; + /** + * Optional. The number of results to return. If not set, a default value + * will be used. + * + * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $top_k = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\Ranker $ranker + * Required. The ranker to use for combining the results. + * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields + * Optional. Mask specifying which fields to return. + * @type int $top_k + * Optional. The number of results to return. If not set, a default value + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ranker to use for combining the results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\Ranker|null + */ + public function getRanker() + { + return $this->ranker; + } + + public function hasRanker() + { + return isset($this->ranker); + } + + public function clearRanker() + { + unset($this->ranker); + } + + /** + * Required. The ranker to use for combining the results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Ranker $var + * @return $this + */ + public function setRanker($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Ranker::class); + $this->ranker = $var; + + return $this; + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\OutputFields|null + */ + public function getOutputFields() + { + return $this->output_fields; + } + + public function hasOutputFields() + { + return isset($this->output_fields); + } + + public function clearOutputFields() + { + unset($this->output_fields); + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\OutputFields $var + * @return $this + */ + public function setOutputFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); + $this->output_fields = $var; + + return $this; + } + + /** + * Optional. The number of results to return. If not set, a default value + * will be used. + * + * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTopK() + { + return $this->top_k; + } + + /** + * Optional. The number of results to return. If not set, a default value + * will be used. + * + * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php new file mode 100644 index 000000000000..d872d51f5956 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php @@ -0,0 +1,71 @@ +google.cloud.vectorsearch.v1.BatchSearchDataObjectsResponse + */ +class BatchSearchDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A list of search responses, one for each request in the batch. + * If a ranker is used, a single ranked list of results is returned. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse[] $results + * Output only. A list of search responses, one for each request in the batch. + * If a ranker is used, a single ranked list of results is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A list of search responses, one for each request in the batch. + * If a ranker is used, a single ranked list of results is returned. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse> + */ + public function getResults() + { + return $this->results; + } + + /** + * Output only. A list of search responses, one for each request in the batch. + * If a ranker is used, a single ranked list of results is returned. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php new file mode 100644 index 000000000000..b2d8e7c61cea --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php @@ -0,0 +1,138 @@ +google.cloud.vectorsearch.v1.BatchUpdateDataObjectsRequest + */ +class BatchUpdateDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection to update the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the UpdateDataObjectRequest messages must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The request message specifying the resources to update. + * A maximum of 1000 DataObjects can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The resource name of the Collection to update the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the UpdateDataObjectRequest messages must match this + * field. Please see + * {@see DataObjectServiceClient::collectionName()} for help formatting this field. + * @param \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $requests Required. The request message specifying the resources to update. + * A maximum of 1000 DataObjects can be updated in a batch. + * + * @return \Google\Cloud\VectorSearch\V1\BatchUpdateDataObjectsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection to update the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the UpdateDataObjectRequest messages must match this + * field. + * @type \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $requests + * Required. The request message specifying the resources to update. + * A maximum of 1000 DataObjects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection to update the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the UpdateDataObjectRequest messages must match this + * field. + * + * 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 Collection to update the DataObjects in. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * The parent field in the UpdateDataObjectRequest messages must match this + * field. + * + * 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 request message specifying the resources to update. + * A maximum of 1000 DataObjects can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The request message specifying the resources to update. + * A maximum of 1000 DataObjects can be updated in a batch. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php new file mode 100644 index 000000000000..dba807289c3b --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php @@ -0,0 +1,34 @@ +google.cloud.vectorsearch.v1.BatchUpdateDataObjectsResponse + */ +class BatchUpdateDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php new file mode 100644 index 000000000000..da1eeca2f43f --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php @@ -0,0 +1,411 @@ +google.cloud.vectorsearch.v1.Collection + */ +class Collection extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. User-specified display name of the collection + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-specified description of the collection + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Schema for vector fields. Only vector fields in this schema will + * be searchable. Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * + * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $vector_schema; + /** + * Optional. JSON Schema for data. + * Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). + * + * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_schema = null; + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. name of resource + * @type string $display_name + * Optional. User-specified display name of the collection + * @type string $description + * Optional. User-specified description of the collection + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $vector_schema + * Optional. Schema for vector fields. Only vector fields in this schema will + * be searchable. Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * @type \Google\Protobuf\Struct $data_schema + * Optional. JSON Schema for data. + * Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). + * @type \Google\Cloud\VectorSearch\V1\EncryptionSpec $encryption_spec + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User-specified display name of the collection + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User-specified display name of the collection + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-specified description of the collection + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-specified description of the collection + * + * Generated from protobuf field string description = 9 [(.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. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Schema for vector fields. Only vector fields in this schema will + * be searchable. Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * + * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVectorSchema() + { + return $this->vector_schema; + } + + /** + * Optional. Schema for vector fields. Only vector fields in this schema will + * be searchable. Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * + * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVectorSchema($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\VectorField::class); + $this->vector_schema = $arr; + + return $this; + } + + /** + * Optional. JSON Schema for data. + * Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). + * + * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getDataSchema() + { + return $this->data_schema; + } + + public function hasDataSchema() + { + return isset($this->data_schema); + } + + public function clearDataSchema() + { + unset($this->data_schema); + } + + /** + * Optional. JSON Schema for data. + * Field names must contain only alphanumeric characters, + * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). + * + * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->data_schema = $var; + + return $this; + } + + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\EncryptionSpec|null + */ + public function getEncryptionSpec() + { + return $this->encryption_spec; + } + + public function hasEncryptionSpec() + { + return isset($this->encryption_spec); + } + + public function clearEncryptionSpec() + { + unset($this->encryption_spec); + } + + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\EncryptionSpec $var + * @return $this + */ + public function setEncryptionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\EncryptionSpec::class); + $this->encryption_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php new file mode 100644 index 000000000000..ad98dfd9a292 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php @@ -0,0 +1,257 @@ +google.cloud.vectorsearch.v1.CreateCollectionRequest + */ +class CreateCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. ID of the Collection to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see VectorSearchServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VectorSearch\V1\Collection $collection Required. The resource being created + * @param string $collectionId Required. ID of the Collection to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\VectorSearch\V1\CreateCollectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VectorSearch\V1\Collection $collection, string $collectionId): self + { + return (new self()) + ->setParent($parent) + ->setCollection($collection) + ->setCollectionId($collectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $collection_id + * Required. ID of the Collection to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\VectorSearch\V1\Collection $collection + * Required. The resource being created + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. ID of the Collection to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. ID of the Collection to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\Collection|null + */ + public function getCollection() + { + return $this->collection; + } + + public function hasCollection() + { + return isset($this->collection); + } + + public function clearCollection() + { + unset($this->collection); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Collection $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Collection::class); + $this->collection = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php new file mode 100644 index 000000000000..48de8c4ab540 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php @@ -0,0 +1,189 @@ +google.cloud.vectorsearch.v1.CreateDataObjectRequest + */ +class CreateDataObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection to create the DataObject in. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The id of the dataObject to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_object_id = ''; + /** + * Required. The DataObject to create. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_object = null; + + /** + * @param string $parent Required. The resource name of the Collection to create the DataObject in. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * Please see {@see DataObjectServiceClient::collectionName()} for help formatting this field. + * @param \Google\Cloud\VectorSearch\V1\DataObject $dataObject Required. The DataObject to create. + * @param string $dataObjectId Required. The id of the dataObject to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VectorSearch\V1\DataObject $dataObject, string $dataObjectId): self + { + return (new self()) + ->setParent($parent) + ->setDataObject($dataObject) + ->setDataObjectId($dataObjectId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection to create the DataObject in. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * @type string $data_object_id + * Required. The id of the dataObject to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object + * Required. The DataObject to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection to create the DataObject in. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection to create the DataObject in. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 id of the dataObject to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDataObjectId() + { + return $this->data_object_id; + } + + /** + * Required. The id of the dataObject to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDataObjectId($var) + { + GPBUtil::checkString($var, True); + $this->data_object_id = $var; + + return $this; + } + + /** + * Required. The DataObject to create. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\DataObject|null + */ + public function getDataObject() + { + return $this->data_object; + } + + public function hasDataObject() + { + return isset($this->data_object); + } + + public function clearDataObject() + { + unset($this->data_object); + } + + /** + * Required. The DataObject to create. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\DataObject $var + * @return $this + */ + public function setDataObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); + $this->data_object = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php new file mode 100644 index 000000000000..a97225541f3c --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php @@ -0,0 +1,267 @@ +google.cloud.vectorsearch.v1.CreateIndexRequest + */ +class CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection for which to create the + * Index. Format: + * `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. ID of the Index to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the Collection for which to create the + * Index. Format: + * `projects/{project}/locations/{location}/collections/{collection}` + * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. + * @param \Google\Cloud\VectorSearch\V1\Index $index Required. The resource being created + * @param string $indexId Required. ID of the Index to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\VectorSearch\V1\CreateIndexRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VectorSearch\V1\Index $index, string $indexId): self + { + return (new self()) + ->setParent($parent) + ->setIndex($index) + ->setIndexId($indexId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection for which to create the + * Index. Format: + * `projects/{project}/locations/{location}/collections/{collection}` + * @type string $index_id + * Required. ID of the Index to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\VectorSearch\V1\Index $index + * Required. The resource being created + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection for which to create the + * Index. Format: + * `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection for which to create the + * Index. Format: + * `projects/{project}/locations/{location}/collections/{collection}` + * + * 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. ID of the Index to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIndexId() + { + return $this->index_id; + } + + /** + * Required. ID of the Index to create. + * The id must be 1-63 characters long, and comply with + * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Specifically, it must be 1-63 characters long and match the regular + * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIndexId($var) + { + GPBUtil::checkString($var, True); + $this->index_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Index::class); + $this->index = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php new file mode 100644 index 000000000000..2501187cbe74 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php @@ -0,0 +1,317 @@ +google.cloud.vectorsearch.v1.DataObject + */ +class DataObject extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The fully qualified resource name of the dataObject. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` + * The data_object_id must be 1-63 characters + * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The id of the dataObject. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_object_id = ''; + /** + * Output only. Timestamp the dataObject was created at. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Timestamp the dataObject was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. The data of the dataObject. + * + * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data = null; + /** + * Optional. The vectors of the dataObject. + * + * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $vectors; + /** + * Optional. The etag of the dataObject. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The fully qualified resource name of the dataObject. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` + * The data_object_id must be 1-63 characters + * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * @type string $data_object_id + * Output only. The id of the dataObject. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp the dataObject was created at. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp the dataObject was last updated. + * @type \Google\Protobuf\Struct $data + * Optional. The data of the dataObject. + * @type array|\Google\Protobuf\Internal\MapField $vectors + * Optional. The vectors of the dataObject. + * @type string $etag + * Optional. The etag of the dataObject. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The fully qualified resource name of the dataObject. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` + * The data_object_id must be 1-63 characters + * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The fully qualified resource name of the dataObject. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` + * The data_object_id must be 1-63 characters + * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The id of the dataObject. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDataObjectId() + { + return $this->data_object_id; + } + + /** + * Output only. The id of the dataObject. + * + * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDataObjectId($var) + { + GPBUtil::checkString($var, True); + $this->data_object_id = $var; + + return $this; + } + + /** + * Output only. Timestamp the dataObject was created at. + * + * 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 the dataObject was created at. + * + * 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 the dataObject 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 the dataObject 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; + } + + /** + * Optional. The data of the dataObject. + * + * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getData() + { + return $this->data; + } + + public function hasData() + { + return isset($this->data); + } + + public function clearData() + { + unset($this->data); + } + + /** + * Optional. The data of the dataObject. + * + * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->data = $var; + + return $this; + } + + /** + * Optional. The vectors of the dataObject. + * + * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVectors() + { + return $this->vectors; + } + + /** + * Optional. The vectors of the dataObject. + * + * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVectors($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Vector::class); + $this->vectors = $arr; + + return $this; + } + + /** + * Optional. The etag of the dataObject. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The etag of the dataObject. + * + * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php new file mode 100644 index 000000000000..30eb1135250f --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php @@ -0,0 +1,121 @@ +google.cloud.vectorsearch.v1.DedicatedInfrastructure + */ +class DedicatedInfrastructure extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Mode of the dedicated infrastructure. + * + * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = null; + /** + * Optional. Autoscaling specification. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $autoscaling_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Optional. Mode of the dedicated infrastructure. + * @type \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec $autoscaling_spec + * Optional. Autoscaling specification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Mode of the dedicated infrastructure. + * + * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return isset($this->mode) ? $this->mode : 0; + } + + public function hasMode() + { + return isset($this->mode); + } + + public function clearMode() + { + unset($this->mode); + } + + /** + * Optional. Mode of the dedicated infrastructure. + * + * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Autoscaling specification. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec|null + */ + public function getAutoscalingSpec() + { + return $this->autoscaling_spec; + } + + public function hasAutoscalingSpec() + { + return isset($this->autoscaling_spec); + } + + public function clearAutoscalingSpec() + { + unset($this->autoscaling_spec); + } + + /** + * Optional. Autoscaling specification. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec $var + * @return $this + */ + public function setAutoscalingSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec::class); + $this->autoscaling_spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php new file mode 100644 index 000000000000..7435105a9140 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php @@ -0,0 +1,125 @@ +google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec + */ +class AutoscalingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The minimum number of replicas. If not set or set to `0`, + * defaults to `2`. Must be >= `1` and <= `1000`. + * + * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_replica_count = 0; + /** + * Optional. The maximum number of replicas. Must be >= + * `min_replica_count` and <= `1000`. + * For the v1beta version, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `5`. + * For all other versions, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `2`. + * + * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_replica_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $min_replica_count + * Optional. The minimum number of replicas. If not set or set to `0`, + * defaults to `2`. Must be >= `1` and <= `1000`. + * @type int $max_replica_count + * Optional. The maximum number of replicas. Must be >= + * `min_replica_count` and <= `1000`. + * For the v1beta version, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `5`. + * For all other versions, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `2`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The minimum number of replicas. If not set or set to `0`, + * defaults to `2`. Must be >= `1` and <= `1000`. + * + * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinReplicaCount() + { + return $this->min_replica_count; + } + + /** + * Optional. The minimum number of replicas. If not set or set to `0`, + * defaults to `2`. Must be >= `1` and <= `1000`. + * + * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->min_replica_count = $var; + + return $this; + } + + /** + * Optional. The maximum number of replicas. Must be >= + * `min_replica_count` and <= `1000`. + * For the v1beta version, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `5`. + * For all other versions, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `2`. + * + * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxReplicaCount() + { + return $this->max_replica_count; + } + + /** + * Optional. The maximum number of replicas. Must be >= + * `min_replica_count` and <= `1000`. + * For the v1beta version, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `5`. + * For all other versions, if not set or set to `0`, defaults to + * the greater of `min_replica_count` and `2`. + * + * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->max_replica_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php new file mode 100644 index 000000000000..2a01db202e2d --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php @@ -0,0 +1,61 @@ +google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode + */ +class Mode +{ + /** + * Default will use `PERFORMANCE_OPTIMIZED`. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * This is storage optimized variation. + * + * Generated from protobuf enum STORAGE_OPTIMIZED = 1; + */ + const STORAGE_OPTIMIZED = 1; + /** + * This is Performance optimized on E2 or equivalent family. + * + * Generated from protobuf enum PERFORMANCE_OPTIMIZED = 2; + */ + const PERFORMANCE_OPTIMIZED = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::STORAGE_OPTIMIZED => 'STORAGE_OPTIMIZED', + self::PERFORMANCE_OPTIMIZED => 'PERFORMANCE_OPTIMIZED', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php new file mode 100644 index 000000000000..a15a54e937b2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php @@ -0,0 +1,155 @@ +google.cloud.vectorsearch.v1.DeleteCollectionRequest + */ +class DeleteCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\DeleteCollectionRequest + * + * @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. Name of the resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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. Name of the resource + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php new file mode 100644 index 000000000000..7b02cd1fe558 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php @@ -0,0 +1,134 @@ +google.cloud.vectorsearch.v1.DeleteDataObjectRequest + */ +class DeleteDataObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DataObject resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of the DataObject. + * If an etag is provided and does not match the current etag of the + * DataObject, deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. The name of the DataObject resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * Please see {@see DataObjectServiceClient::dataObjectName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest + * + * @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 DataObject resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * @type string $etag + * Optional. The current etag of the DataObject. + * If an etag is provided and does not match the current etag of the + * DataObject, deletion will be blocked and an ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DataObject resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * 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 DataObject resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * 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. The current etag of the DataObject. + * If an etag is provided and does not match the current etag of the + * DataObject, deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the DataObject. + * If an etag is provided and does not match the current etag of the + * DataObject, deletion will be blocked and an ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php new file mode 100644 index 000000000000..312854bce6d7 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php @@ -0,0 +1,165 @@ +google.cloud.vectorsearch.v1.DeleteIndexRequest + */ +class DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Index to delete. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The resource name of the Index to delete. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * Please see {@see VectorSearchServiceClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\DeleteIndexRequest + * + * @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 resource name of the Index to delete. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Index to delete. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * 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 resource name of the Index to delete. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php new file mode 100644 index 000000000000..597ff9a9b6ac --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php @@ -0,0 +1,67 @@ +google.cloud.vectorsearch.v1.DenseScannIndex + */ +class DenseScannIndex extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Feature norm type. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $feature_norm_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $feature_norm_type + * Optional. Feature norm type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Feature norm type. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFeatureNormType() + { + return $this->feature_norm_type; + } + + /** + * Optional. Feature norm type. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFeatureNormType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DenseScannIndex\FeatureNormType::class); + $this->feature_norm_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php new file mode 100644 index 000000000000..fb2ac5c5d670 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php @@ -0,0 +1,61 @@ +google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType + */ +class FeatureNormType +{ + /** + * Unspecified feature norm type. + * + * Generated from protobuf enum FEATURE_NORM_TYPE_UNSPECIFIED = 0; + */ + const FEATURE_NORM_TYPE_UNSPECIFIED = 0; + /** + * No norm applied. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * Unit L2 norm. + * + * Generated from protobuf enum UNIT_L2_NORM = 2; + */ + const UNIT_L2_NORM = 2; + + private static $valueToName = [ + self::FEATURE_NORM_TYPE_UNSPECIFIED => 'FEATURE_NORM_TYPE_UNSPECIFIED', + self::NONE => 'NONE', + self::UNIT_L2_NORM => 'UNIT_L2_NORM', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php new file mode 100644 index 000000000000..c3e81f1d2b3a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php @@ -0,0 +1,67 @@ +google.cloud.vectorsearch.v1.DenseVector + */ +class DenseVector extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float[] $values + * Required. The values of the vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); + parent::__construct($data); + } + + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php new file mode 100644 index 000000000000..bb67c3ad25a6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php @@ -0,0 +1,115 @@ +google.cloud.vectorsearch.v1.DenseVectorField + */ +class DenseVectorField extends \Google\Protobuf\Internal\Message +{ + /** + * Dimensionality of the vector field. + * + * Generated from protobuf field int32 dimensions = 1; + */ + protected $dimensions = 0; + /** + * Optional. Configuration for generating embeddings for the vector field. If + * not specified, the embedding field must be populated in the DataObject. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vertex_embedding_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimensions + * Dimensionality of the vector field. + * @type \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig $vertex_embedding_config + * Optional. Configuration for generating embeddings for the vector field. If + * not specified, the embedding field must be populated in the DataObject. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Dimensionality of the vector field. + * + * Generated from protobuf field int32 dimensions = 1; + * @return int + */ + public function getDimensions() + { + return $this->dimensions; + } + + /** + * Dimensionality of the vector field. + * + * Generated from protobuf field int32 dimensions = 1; + * @param int $var + * @return $this + */ + public function setDimensions($var) + { + GPBUtil::checkInt32($var); + $this->dimensions = $var; + + return $this; + } + + /** + * Optional. Configuration for generating embeddings for the vector field. If + * not specified, the embedding field must be populated in the DataObject. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig|null + */ + public function getVertexEmbeddingConfig() + { + return $this->vertex_embedding_config; + } + + public function hasVertexEmbeddingConfig() + { + return isset($this->vertex_embedding_config); + } + + public function clearVertexEmbeddingConfig() + { + unset($this->vertex_embedding_config); + } + + /** + * Optional. Configuration for generating embeddings for the vector field. If + * not specified, the embedding field must be populated in the DataObject. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig $var + * @return $this + */ + public function setVertexEmbeddingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig::class); + $this->vertex_embedding_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php new file mode 100644 index 000000000000..e9956ad6fe10 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php @@ -0,0 +1,61 @@ +google.cloud.vectorsearch.v1.DistanceMetric + */ +class DistanceMetric +{ + /** + * Default value, distance metric is not specified. + * + * Generated from protobuf enum DISTANCE_METRIC_UNSPECIFIED = 0; + */ + const DISTANCE_METRIC_UNSPECIFIED = 0; + /** + * Dot product distance metric. + * + * Generated from protobuf enum DOT_PRODUCT = 1; + */ + const DOT_PRODUCT = 1; + /** + * Cosine distance metric. + * + * Generated from protobuf enum COSINE_DISTANCE = 2; + */ + const COSINE_DISTANCE = 2; + + private static $valueToName = [ + self::DISTANCE_METRIC_UNSPECIFIED => 'DISTANCE_METRIC_UNSPECIFIED', + self::DOT_PRODUCT => 'DOT_PRODUCT', + self::COSINE_DISTANCE => 'COSINE_DISTANCE', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php new file mode 100644 index 000000000000..36e86bca6e50 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php @@ -0,0 +1,103 @@ +google.cloud.vectorsearch.v1.EmbeddingTaskType + */ +class EmbeddingTaskType +{ + /** + * Unspecified task type. + * + * Generated from protobuf enum EMBEDDING_TASK_TYPE_UNSPECIFIED = 0; + */ + const EMBEDDING_TASK_TYPE_UNSPECIFIED = 0; + /** + * Specifies the given text is a query in a search/retrieval setting. + * + * Generated from protobuf enum RETRIEVAL_QUERY = 1; + */ + const RETRIEVAL_QUERY = 1; + /** + * Specifies the given text is a document from the corpus being searched. + * + * Generated from protobuf enum RETRIEVAL_DOCUMENT = 2; + */ + const RETRIEVAL_DOCUMENT = 2; + /** + * Specifies the given text will be used for STS. + * + * Generated from protobuf enum SEMANTIC_SIMILARITY = 3; + */ + const SEMANTIC_SIMILARITY = 3; + /** + * Specifies that the given text will be classified. + * + * Generated from protobuf enum CLASSIFICATION = 4; + */ + const CLASSIFICATION = 4; + /** + * Specifies that the embeddings will be used for clustering. + * + * Generated from protobuf enum CLUSTERING = 5; + */ + const CLUSTERING = 5; + /** + * Specifies that the embeddings will be used for question answering. + * + * Generated from protobuf enum QUESTION_ANSWERING = 6; + */ + const QUESTION_ANSWERING = 6; + /** + * Specifies that the embeddings will be used for fact verification. + * + * Generated from protobuf enum FACT_VERIFICATION = 7; + */ + const FACT_VERIFICATION = 7; + /** + * Specifies that the embeddings will be used for code retrieval. + * + * Generated from protobuf enum CODE_RETRIEVAL_QUERY = 8; + */ + const CODE_RETRIEVAL_QUERY = 8; + + private static $valueToName = [ + self::EMBEDDING_TASK_TYPE_UNSPECIFIED => 'EMBEDDING_TASK_TYPE_UNSPECIFIED', + self::RETRIEVAL_QUERY => 'RETRIEVAL_QUERY', + self::RETRIEVAL_DOCUMENT => 'RETRIEVAL_DOCUMENT', + self::SEMANTIC_SIMILARITY => 'SEMANTIC_SIMILARITY', + self::CLASSIFICATION => 'CLASSIFICATION', + self::CLUSTERING => 'CLUSTERING', + self::QUESTION_ANSWERING => 'QUESTION_ANSWERING', + self::FACT_VERIFICATION => 'FACT_VERIFICATION', + self::CODE_RETRIEVAL_QUERY => 'CODE_RETRIEVAL_QUERY', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php new file mode 100644 index 000000000000..82c9f1b9b187 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php @@ -0,0 +1,80 @@ +google.cloud.vectorsearch.v1.EncryptionSpec + */ +class EncryptionSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Cloud KMS key used to protect the resource. + * The Cloud KMS key must be in the same region as the resource. It must have + * the format + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string crypto_key_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $crypto_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $crypto_key_name + * Required. Resource name of the Cloud KMS key used to protect the resource. + * The Cloud KMS key must be in the same region as the resource. It must have + * the format + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\EncryptionSpec::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Cloud KMS key used to protect the resource. + * The Cloud KMS key must be in the same region as the resource. It must have + * the format + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string crypto_key_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCryptoKeyName() + { + return $this->crypto_key_name; + } + + /** + * Required. Resource name of the Cloud KMS key used to protect the resource. + * The Cloud KMS key must be in the same region as the resource. It must have + * the format + * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string crypto_key_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCryptoKeyName($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php new file mode 100644 index 000000000000..891402eb6a5a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php @@ -0,0 +1,121 @@ +google.cloud.vectorsearch.v1.ExportDataObjectsMetadata + */ +class ExportDataObjectsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $finish_time + * Output only. The time the operation finished. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * Output only. The time the operation finished. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php new file mode 100644 index 000000000000..707456e9a116 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php @@ -0,0 +1,118 @@ +google.cloud.vectorsearch.v1.ExportDataObjectsRequest + */ +class ExportDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection from which we want to export + * Data Objects. Format: + * `projects/{project}/locations/{location}/collections/{collection}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination $gcs_destination + * The Cloud Storage location where user wants to export Data Objects. + * @type string $name + * Required. The resource name of the Collection from which we want to export + * Data Objects. Format: + * `projects/{project}/locations/{location}/collections/{collection}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage location where user wants to export Data Objects. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination gcs_destination = 2; + * @return \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(2); + } + + public function hasGcsDestination() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Storage location where user wants to export Data Objects. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination gcs_destination = 2; + * @param \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The resource name of the Collection from which we want to export + * Data Objects. Format: + * `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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 resource name of the Collection from which we want to export + * Data Objects. Format: + * `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php new file mode 100644 index 000000000000..64fa188a3160 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php @@ -0,0 +1,105 @@ +google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination + */ +class GcsExportDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI prefix of the Cloud Storage where to export Data Objects. + * The bucket is required to be in the same region as the collection. + * + * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $export_uri = ''; + /** + * Required. The format of the exported Data Objects. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $format = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $export_uri + * Required. URI prefix of the Cloud Storage where to export Data Objects. + * The bucket is required to be in the same region as the collection. + * @type int $format + * Required. The format of the exported Data Objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI prefix of the Cloud Storage where to export Data Objects. + * The bucket is required to be in the same region as the collection. + * + * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExportUri() + { + return $this->export_uri; + } + + /** + * Required. URI prefix of the Cloud Storage where to export Data Objects. + * The bucket is required to be in the same region as the collection. + * + * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExportUri($var) + { + GPBUtil::checkString($var, True); + $this->export_uri = $var; + + return $this; + } + + /** + * Required. The format of the exported Data Objects. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Required. The format of the exported Data Objects. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination\Format::class); + $this->format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php new file mode 100644 index 000000000000..18b8f8a0fad6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php @@ -0,0 +1,54 @@ +google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format + */ +class Format +{ + /** + * Unspecified format. + * + * Generated from protobuf enum FORMAT_UNSPECIFIED = 0; + */ + const FORMAT_UNSPECIFIED = 0; + /** + * Exports Data Objects in `JSONL` format. + * + * Generated from protobuf enum JSONL = 2; + */ + const JSONL = 2; + + private static $valueToName = [ + self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED', + self::JSONL => 'JSONL', + ]; + + 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php new file mode 100644 index 000000000000..bc89240cfc6a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php @@ -0,0 +1,33 @@ +google.cloud.vectorsearch.v1.ExportDataObjectsResponse + */ +class ExportDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php new file mode 100644 index 000000000000..19bffcd2399c --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php @@ -0,0 +1,81 @@ +google.cloud.vectorsearch.v1.GetCollectionRequest + */ +class GetCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\GetCollectionRequest + * + * @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. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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. Name of the resource + * + * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php new file mode 100644 index 000000000000..be7fb8fd8310 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php @@ -0,0 +1,92 @@ +google.cloud.vectorsearch.v1.GetDataObjectRequest + */ +class GetDataObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DataObject resource. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * 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 DataObject resource. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * Please see {@see DataObjectServiceClient::dataObjectName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\GetDataObjectRequest + * + * @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 DataObject resource. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DataObject resource. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * 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 DataObject resource. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + * + * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php new file mode 100644 index 000000000000..68af998408f1 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php @@ -0,0 +1,81 @@ +google.cloud.vectorsearch.v1.GetIndexRequest + */ +class GetIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see VectorSearchServiceClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\GetIndexRequest + * + * @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. Name of the resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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. Name of the resource + * + * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php new file mode 100644 index 000000000000..1b6aea8316d2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php @@ -0,0 +1,190 @@ +google.cloud.vectorsearch.v1.ImportDataObjectsMetadata + */ +class ImportDataObjectsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Number of DataObjects that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $success_count = 0; + /** + * Output only. Number of DataObjects that failed during processing. + * + * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the operation was last updated. + * @type int|string $success_count + * Output only. Number of DataObjects that were processed successfully. + * @type int|string $failure_count + * Output only. Number of DataObjects that failed during processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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. The time the operation was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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. Number of DataObjects that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * Output only. Number of DataObjects that were processed successfully. + * + * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt64($var); + $this->success_count = $var; + + return $this; + } + + /** + * Output only. Number of DataObjects that failed during processing. + * + * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * Output only. Number of DataObjects that failed during processing. + * + * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt64($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php new file mode 100644 index 000000000000..7b8aeb8422ab --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php @@ -0,0 +1,114 @@ +google.cloud.vectorsearch.v1.ImportDataObjectsRequest + */ +class ImportDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection to import DataObjects into. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig $gcs_import + * The Cloud Storage location of the input content. + * @type string $name + * Required. The resource name of the Collection to import DataObjects into. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage location of the input content. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig gcs_import = 2; + * @return \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig|null + */ + public function getGcsImport() + { + return $this->readOneof(2); + } + + public function hasGcsImport() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Storage location of the input content. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig gcs_import = 2; + * @param \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig $var + * @return $this + */ + public function setGcsImport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The resource name of the Collection to import DataObjects into. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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 resource name of the Collection to import DataObjects into. + * Format: `projects/{project}/locations/{location}/collections/{collection}`. + * + * 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; + } + + /** + * @return string + */ + public function getConfig() + { + return $this->whichOneof("config"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php new file mode 100644 index 000000000000..f60f8a784d42 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php @@ -0,0 +1,151 @@ +google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig + */ +class GcsImportConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI prefix of the Cloud Storage DataObjects to import. + * + * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $contents_uri = ''; + /** + * Required. URI prefix of the Cloud Storage location to write any errors + * encountered during the import. + * + * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $error_uri = ''; + /** + * Optional. URI prefix of the Cloud Storage location to write DataObject + * `IDs` and `etags` of DataObjects that were successfully imported. The + * service will write the successfully imported DataObjects to sharded files + * under this prefix. If this field is empty, no output will be written. + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $contents_uri + * Required. URI prefix of the Cloud Storage DataObjects to import. + * @type string $error_uri + * Required. URI prefix of the Cloud Storage location to write any errors + * encountered during the import. + * @type string $output_uri + * Optional. URI prefix of the Cloud Storage location to write DataObject + * `IDs` and `etags` of DataObjects that were successfully imported. The + * service will write the successfully imported DataObjects to sharded files + * under this prefix. If this field is empty, no output will be written. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI prefix of the Cloud Storage DataObjects to import. + * + * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getContentsUri() + { + return $this->contents_uri; + } + + /** + * Required. URI prefix of the Cloud Storage DataObjects to import. + * + * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setContentsUri($var) + { + GPBUtil::checkString($var, True); + $this->contents_uri = $var; + + return $this; + } + + /** + * Required. URI prefix of the Cloud Storage location to write any errors + * encountered during the import. + * + * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getErrorUri() + { + return $this->error_uri; + } + + /** + * Required. URI prefix of the Cloud Storage location to write any errors + * encountered during the import. + * + * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setErrorUri($var) + { + GPBUtil::checkString($var, True); + $this->error_uri = $var; + + return $this; + } + + /** + * Optional. URI prefix of the Cloud Storage location to write DataObject + * `IDs` and `etags` of DataObjects that were successfully imported. The + * service will write the successfully imported DataObjects to sharded files + * under this prefix. If this field is empty, no output will be written. + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOutputUri() + { + return $this->output_uri; + } + + /** + * Optional. URI prefix of the Cloud Storage location to write DataObject + * `IDs` and `etags` of DataObjects that were successfully imported. The + * service will write the successfully imported DataObjects to sharded files + * under this prefix. If this field is empty, no output will be written. + * + * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOutputUri($var) + { + GPBUtil::checkString($var, True); + $this->output_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php new file mode 100644 index 000000000000..7509212d5269 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php @@ -0,0 +1,78 @@ +google.cloud.vectorsearch.v1.ImportDataObjectsResponse + */ +class ImportDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Status of the LRO + * + * Generated from protobuf field .google.rpc.Status status = 1; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $status + * Status of the LRO + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Status of the LRO + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Status of the LRO + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php new file mode 100644 index 000000000000..4ff336fedcc6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php @@ -0,0 +1,489 @@ +google.cloud.vectorsearch.v1.Index + */ +class Index extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. User-specified display name of the index + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. User-specified description of the index + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Distance metric used for indexing. If not specified, will default + * to DOT_PRODUCT. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_metric = 0; + /** + * Required. The collection schema field to index. + * + * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index_field = ''; + /** + * Optional. The fields to push into the index to enable fast ANN inline + * filtering. + * + * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter_fields; + /** + * Optional. The fields to push into the index to enable inline data + * retrieval. + * + * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $store_fields; + protected $infra_type; + protected $index_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure $dedicated_infrastructure + * Optional. Dedicated infrastructure for the index. + * @type \Google\Cloud\VectorSearch\V1\DenseScannIndex $dense_scann + * Optional. Dense ScaNN index. + * @type string $name + * Identifier. name of resource + * @type string $display_name + * Optional. User-specified display name of the index + * @type string $description + * Optional. User-specified description of the index + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create time stamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update time stamp + * @type int $distance_metric + * Optional. Distance metric used for indexing. If not specified, will default + * to DOT_PRODUCT. + * @type string $index_field + * Required. The collection schema field to index. + * @type string[] $filter_fields + * Optional. The fields to push into the index to enable fast ANN inline + * filtering. + * @type string[] $store_fields + * Optional. The fields to push into the index to enable inline data + * retrieval. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Dedicated infrastructure for the index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure|null + */ + public function getDedicatedInfrastructure() + { + return $this->readOneof(11); + } + + public function hasDedicatedInfrastructure() + { + return $this->hasOneof(11); + } + + /** + * Optional. Dedicated infrastructure for the index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure $var + * @return $this + */ + public function setDedicatedInfrastructure($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Optional. Dense ScaNN index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\DenseScannIndex|null + */ + public function getDenseScann() + { + return $this->readOneof(12); + } + + public function hasDenseScann() + { + return $this->hasOneof(12); + } + + /** + * Optional. Dense ScaNN index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\DenseScannIndex $var + * @return $this + */ + public function setDenseScann($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseScannIndex::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User-specified display name of the index + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User-specified display name of the index + * + * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. User-specified description of the index + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-specified description of the index + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update time stamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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; + } + + /** + * Optional. Distance metric used for indexing. If not specified, will default + * to DOT_PRODUCT. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDistanceMetric() + { + return $this->distance_metric; + } + + /** + * Optional. Distance metric used for indexing. If not specified, will default + * to DOT_PRODUCT. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDistanceMetric($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DistanceMetric::class); + $this->distance_metric = $var; + + return $this; + } + + /** + * Required. The collection schema field to index. + * + * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getIndexField() + { + return $this->index_field; + } + + /** + * Required. The collection schema field to index. + * + * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setIndexField($var) + { + GPBUtil::checkString($var, True); + $this->index_field = $var; + + return $this; + } + + /** + * Optional. The fields to push into the index to enable fast ANN inline + * filtering. + * + * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getFilterFields() + { + return $this->filter_fields; + } + + /** + * Optional. The fields to push into the index to enable fast ANN inline + * filtering. + * + * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setFilterFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->filter_fields = $arr; + + return $this; + } + + /** + * Optional. The fields to push into the index to enable inline data + * retrieval. + * + * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getStoreFields() + { + return $this->store_fields; + } + + /** + * Optional. The fields to push into the index to enable inline data + * retrieval. + * + * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setStoreFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->store_fields = $arr; + + return $this; + } + + /** + * @return string + */ + public function getInfraType() + { + return $this->whichOneof("infra_type"); + } + + /** + * @return string + */ + public function getIndexType() + { + return $this->whichOneof("index_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php new file mode 100644 index 000000000000..274dbd3cbc56 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php @@ -0,0 +1,221 @@ +google.cloud.vectorsearch.v1.ListCollectionsRequest + */ +class ListCollectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListCollectionsRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListCollectionsRequest + * Please see {@see VectorSearchServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\ListCollectionsRequest + * + * @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. Parent value for ListCollectionsRequest + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results + * @type string $order_by + * Optional. Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListCollectionsRequest + * + * 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. Parent value for ListCollectionsRequest + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php new file mode 100644 index 000000000000..fe7602172c0a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php @@ -0,0 +1,135 @@ +google.cloud.vectorsearch.v1.ListCollectionsResponse + */ +class ListCollectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Collection + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; + */ + private $collections; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unordered list. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\Collection[] $collections + * The list of Collection + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Unordered list. Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Collection + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Collection> + */ + public function getCollections() + { + return $this->collections; + } + + /** + * The list of Collection + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; + * @param \Google\Cloud\VectorSearch\V1\Collection[] $var + * @return $this + */ + public function setCollections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Collection::class); + $this->collections = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Unordered list. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unordered list. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php new file mode 100644 index 000000000000..8f0becae371a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php @@ -0,0 +1,221 @@ +google.cloud.vectorsearch.v1.ListIndexesRequest + */ +class ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListIndexesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListIndexesRequest + * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VectorSearch\V1\ListIndexesRequest + * + * @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. Parent value for ListIndexesRequest + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results + * @type string $order_by + * Optional. Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListIndexesRequest + * + * 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. Parent value for ListIndexesRequest + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php new file mode 100644 index 000000000000..48db430c005f --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php @@ -0,0 +1,101 @@ +google.cloud.vectorsearch.v1.ListIndexesResponse + */ +class ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Index + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; + */ + private $indexes; + /** + * A token identifying a page of results the server should return. + * + * 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 \Google\Cloud\VectorSearch\V1\Index[] $indexes + * The list of Index + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Index + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The list of Index + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; + * @param \Google\Cloud\VectorSearch\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php new file mode 100644 index 000000000000..f8363f5cc8c1 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php @@ -0,0 +1,311 @@ +google.cloud.vectorsearch.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have + * [google.longrunning.Operation.error][google.longrunning.Operation.error] + * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php new file mode 100644 index 000000000000..8fd505929402 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php @@ -0,0 +1,135 @@ +google.cloud.vectorsearch.v1.OutputFields + */ +class OutputFields extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The fields from the data fields to include in the output. + * + * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data_fields; + /** + * Optional. The fields from the vector fields to include in the output. + * + * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $vector_fields; + /** + * Optional. The fields from the DataObject metadata to include in the output. + * + * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metadata_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $data_fields + * Optional. The fields from the data fields to include in the output. + * @type string[] $vector_fields + * Optional. The fields from the vector fields to include in the output. + * @type string[] $metadata_fields + * Optional. The fields from the DataObject metadata to include in the output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The fields from the data fields to include in the output. + * + * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getDataFields() + { + return $this->data_fields; + } + + /** + * Optional. The fields from the data fields to include in the output. + * + * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setDataFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_fields = $arr; + + return $this; + } + + /** + * Optional. The fields from the vector fields to include in the output. + * + * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getVectorFields() + { + return $this->vector_fields; + } + + /** + * Optional. The fields from the vector fields to include in the output. + * + * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setVectorFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->vector_fields = $arr; + + return $this; + } + + /** + * Optional. The fields from the DataObject metadata to include in the output. + * + * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getMetadataFields() + { + return $this->metadata_fields; + } + + /** + * Optional. The fields from the DataObject metadata to include in the output. + * + * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setMetadataFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php new file mode 100644 index 000000000000..3541cbbd21d5 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php @@ -0,0 +1,256 @@ +google.cloud.vectorsearch.v1.QueryDataObjectsRequest + */ +class QueryDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_fields = null; + /** + * Optional. The standard list page size. Default is 100. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * @type \Google\Protobuf\Struct $filter + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields + * Optional. Mask specifying which fields to return. + * @type int $page_size + * Optional. The standard list page size. Default is 100. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] + * call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection for which to query. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\OutputFields|null + */ + public function getOutputFields() + { + return $this->output_fields; + } + + public function hasOutputFields() + { + return isset($this->output_fields); + } + + public function clearOutputFields() + { + unset($this->output_fields); + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\OutputFields $var + * @return $this + */ + public function setOutputFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); + $this->output_fields = $var; + + return $this; + } + + /** + * Optional. The standard list page size. Default is 100. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. Default is 100. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.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 + * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php new file mode 100644 index 000000000000..4e90b7849c2d --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php @@ -0,0 +1,110 @@ +google.cloud.vectorsearch.v1.QueryDataObjectsResponse + */ +class QueryDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of dataObjects that match the query. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $data_objects; + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DataObject[] $data_objects + * Output only. The list of dataObjects that match the query. + * @type string $next_page_token + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to + * obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of dataObjects that match the query. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DataObject> + */ + public function getDataObjects() + { + return $this->data_objects; + } + + /** + * Output only. The list of dataObjects that match the query. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VectorSearch\V1\DataObject[] $var + * @return $this + */ + public function setDataObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DataObject::class); + $this->data_objects = $arr; + + return $this; + } + + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php new file mode 100644 index 000000000000..a0aa74f03057 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php @@ -0,0 +1,75 @@ +google.cloud.vectorsearch.v1.Ranker + */ +class Ranker extends \Google\Protobuf\Internal\Message +{ + protected $ranker; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion $rrf + * Reciprocal Rank Fusion ranking. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Reciprocal Rank Fusion ranking. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ReciprocalRankFusion rrf = 1; + * @return \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion|null + */ + public function getRrf() + { + return $this->readOneof(1); + } + + public function hasRrf() + { + return $this->hasOneof(1); + } + + /** + * Reciprocal Rank Fusion ranking. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.ReciprocalRankFusion rrf = 1; + * @param \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion $var + * @return $this + */ + public function setRrf($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getRanker() + { + return $this->whichOneof("ranker"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php new file mode 100644 index 000000000000..9d529790eaca --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php @@ -0,0 +1,67 @@ +google.cloud.vectorsearch.v1.ReciprocalRankFusion + */ +class ReciprocalRankFusion extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The weights to apply to each search result set during fusion. + * + * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $weights; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float[] $weights + * Required. The weights to apply to each search result set during fusion. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The weights to apply to each search result set during fusion. + * + * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getWeights() + { + return $this->weights; + } + + /** + * Required. The weights to apply to each search result set during fusion. + * + * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float[] $var + * @return $this + */ + public function setWeights($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->weights = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php new file mode 100644 index 000000000000..911a22fc617a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php @@ -0,0 +1,141 @@ +google.cloud.vectorsearch.v1.Search + */ +class Search extends \Google\Protobuf\Internal\Message +{ + protected $search_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\VectorSearch $vector_search + * A vector-based search. + * @type \Google\Cloud\VectorSearch\V1\SemanticSearch $semantic_search + * A semantic search. + * @type \Google\Cloud\VectorSearch\V1\TextSearch $text_search + * A text search operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * A vector-based search. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 1; + * @return \Google\Cloud\VectorSearch\V1\VectorSearch|null + */ + public function getVectorSearch() + { + return $this->readOneof(1); + } + + public function hasVectorSearch() + { + return $this->hasOneof(1); + } + + /** + * A vector-based search. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 1; + * @param \Google\Cloud\VectorSearch\V1\VectorSearch $var + * @return $this + */ + public function setVectorSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VectorSearch::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A semantic search. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 2; + * @return \Google\Cloud\VectorSearch\V1\SemanticSearch|null + */ + public function getSemanticSearch() + { + return $this->readOneof(2); + } + + public function hasSemanticSearch() + { + return $this->hasOneof(2); + } + + /** + * A semantic search. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 2; + * @param \Google\Cloud\VectorSearch\V1\SemanticSearch $var + * @return $this + */ + public function setSemanticSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SemanticSearch::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A text search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 3; + * @return \Google\Cloud\VectorSearch\V1\TextSearch|null + */ + public function getTextSearch() + { + return $this->readOneof(3); + } + + public function hasTextSearch() + { + return $this->hasOneof(3); + } + + /** + * A text search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 3; + * @param \Google\Cloud\VectorSearch\V1\TextSearch $var + * @return $this + */ + public function setTextSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\TextSearch::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSearchType() + { + return $this->whichOneof("search_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php new file mode 100644 index 000000000000..d8b0cb20dfe5 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php @@ -0,0 +1,275 @@ +google.cloud.vectorsearch.v1.SearchDataObjectsRequest + */ +class SearchDataObjectsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The standard list page size. Only supported for KNN. If not set, + * up to search_type.top_k results will be returned. The maximum value is + * 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + protected $search_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\VectorSearch $vector_search + * A vector search operation. + * @type \Google\Cloud\VectorSearch\V1\SemanticSearch $semantic_search + * A semantic search operation. + * @type \Google\Cloud\VectorSearch\V1\TextSearch $text_search + * Optional. A text search operation. + * @type string $parent + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * @type int $page_size + * Optional. The standard list page size. Only supported for KNN. If not set, + * up to search_type.top_k results will be returned. The maximum value is + * 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] + * call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * A vector search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 2; + * @return \Google\Cloud\VectorSearch\V1\VectorSearch|null + */ + public function getVectorSearch() + { + return $this->readOneof(2); + } + + public function hasVectorSearch() + { + return $this->hasOneof(2); + } + + /** + * A vector search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 2; + * @param \Google\Cloud\VectorSearch\V1\VectorSearch $var + * @return $this + */ + public function setVectorSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VectorSearch::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A semantic search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 4; + * @return \Google\Cloud\VectorSearch\V1\SemanticSearch|null + */ + public function getSemanticSearch() + { + return $this->readOneof(4); + } + + public function hasSemanticSearch() + { + return $this->hasOneof(4); + } + + /** + * A semantic search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 4; + * @param \Google\Cloud\VectorSearch\V1\SemanticSearch $var + * @return $this + */ + public function setSemanticSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SemanticSearch::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. A text search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\TextSearch|null + */ + public function getTextSearch() + { + return $this->readOneof(7); + } + + public function hasTextSearch() + { + return $this->hasOneof(7); + } + + /** + * Optional. A text search operation. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\TextSearch $var + * @return $this + */ + public function setTextSearch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\TextSearch::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Required. The resource name of the Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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 Collection for which to search. + * Format: `projects/{project}/locations/{location}/collections/{collection}` + * + * 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. Only supported for KNN. If not set, + * up to search_type.top_k results will be returned. The maximum value is + * 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. Only supported for KNN. If not set, + * up to search_type.top_k results will be returned. The maximum value is + * 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 5 [(.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 + * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] + * of the previous + * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] + * call. + * + * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * @return string + */ + public function getSearchType() + { + return $this->whichOneof("search_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php new file mode 100644 index 000000000000..72f03ef01dc2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php @@ -0,0 +1,109 @@ +google.cloud.vectorsearch.v1.SearchDataObjectsResponse + */ +class SearchDataObjectsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of dataObjects that match the search criteria. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $results; + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\SearchResult[] $results + * Output only. The list of dataObjects that match the search criteria. + * @type string $next_page_token + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to + * obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The list of dataObjects that match the search criteria. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\VectorSearch\V1\SearchResult> + */ + public function getResults() + { + return $this->results; + } + + /** + * Output only. The list of dataObjects that match the search criteria. + * + * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VectorSearch\V1\SearchResult[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\SearchResult::class); + $this->results = $arr; + + return $this; + } + + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Output only. A token to retrieve next page of results. + * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to + * obtain that page. + * + * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php new file mode 100644 index 000000000000..5ed0fb6d89b6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php @@ -0,0 +1,111 @@ +google.cloud.vectorsearch.v1.SearchHint + */ +class SearchHint extends \Google\Protobuf\Internal\Message +{ + protected $index_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint $knn_hint + * Optional. If set, the search will use the system's default + * K-Nearest Neighbor (KNN) index engine. + * @type \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint $index_hint + * Optional. Specifies that the search should use a particular index. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If set, the search will use the system's default + * K-Nearest Neighbor (KNN) index engine. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.KnnHint knn_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint|null + */ + public function getKnnHint() + { + return $this->readOneof(3); + } + + public function hasKnnHint() + { + return $this->hasOneof(3); + } + + /** + * Optional. If set, the search will use the system's default + * K-Nearest Neighbor (KNN) index engine. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.KnnHint knn_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint $var + * @return $this + */ + public function setKnnHint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Specifies that the search should use a particular index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.IndexHint index_hint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint|null + */ + public function getIndexHint() + { + return $this->readOneof(4); + } + + public function hasIndexHint() + { + return $this->hasOneof(4); + } + + /** + * Optional. Specifies that the search should use a particular index. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.IndexHint index_hint = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint $var + * @return $this + */ + public function setIndexHint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getIndexType() + { + return $this->whichOneof("index_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php new file mode 100644 index 000000000000..e002e515f974 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php @@ -0,0 +1,79 @@ +google.cloud.vectorsearch.v1.SearchHint.IndexHint + */ +class IndexHint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the index to use for the search. + * The index must be in the same project, location, and collection. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the index to use for the search. + * The index must be in the same project, location, and collection. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the index to use for the search. + * The index must be in the same project, location, and collection. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * 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 resource name of the index to use for the search. + * The index must be in the same project, location, and collection. + * Format: + * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + * + * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php new file mode 100644 index 000000000000..0253c90e18ef --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php @@ -0,0 +1,34 @@ +google.cloud.vectorsearch.v1.SearchHint.KnnHint + */ +class KnnHint extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php new file mode 100644 index 000000000000..12f1790ab082 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php @@ -0,0 +1,125 @@ +google.cloud.vectorsearch.v1.SearchResult + */ +class SearchResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The matching data object. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_object = null; + /** + * Output only. Similarity distance or ranker score returned by + * BatchSearchDataObjects. + * + * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $distance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object + * Output only. The matching data object. + * @type float $distance + * Output only. Similarity distance or ranker score returned by + * BatchSearchDataObjects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The matching data object. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VectorSearch\V1\DataObject|null + */ + public function getDataObject() + { + return $this->data_object; + } + + public function hasDataObject() + { + return isset($this->data_object); + } + + public function clearDataObject() + { + unset($this->data_object); + } + + /** + * Output only. The matching data object. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VectorSearch\V1\DataObject $var + * @return $this + */ + public function setDataObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); + $this->data_object = $var; + + return $this; + } + + /** + * Output only. Similarity distance or ranker score returned by + * BatchSearchDataObjects. + * + * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getDistance() + { + return isset($this->distance) ? $this->distance : 0.0; + } + + public function hasDistance() + { + return isset($this->distance); + } + + public function clearDistance() + { + unset($this->distance); + } + + /** + * Output only. Similarity distance or ranker score returned by + * BatchSearchDataObjects. + * + * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setDistance($var) + { + GPBUtil::checkDouble($var); + $this->distance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php new file mode 100644 index 000000000000..4dfdde9fb02e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php @@ -0,0 +1,327 @@ +google.cloud.vectorsearch.v1.SemanticSearch + */ +class SemanticSearch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The query text, which is used to generate an embedding according + * to the embedding model specified in the collection config. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_text = ''; + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_field = ''; + /** + * Required. The task type of the query embedding. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_type = 0; + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_fields = null; + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + /** + * Optional. The number of data objects to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $top_k = null; + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to KNN search + * otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $search_hint = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $search_text + * Required. The query text, which is used to generate an embedding according + * to the embedding model specified in the collection config. + * @type string $search_field + * Required. The vector field to search. + * @type int $task_type + * Required. The task type of the query embedding. + * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields + * Optional. The fields to return in the search results. + * @type \Google\Protobuf\Struct $filter + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * @type int $top_k + * Optional. The number of data objects to return. + * @type \Google\Cloud\VectorSearch\V1\SearchHint $search_hint + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to KNN search + * otherwise. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The query text, which is used to generate an embedding according + * to the embedding model specified in the collection config. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSearchText() + { + return $this->search_text; + } + + /** + * Required. The query text, which is used to generate an embedding according + * to the embedding model specified in the collection config. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSearchText($var) + { + GPBUtil::checkString($var, True); + $this->search_text = $var; + + return $this; + } + + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSearchField() + { + return $this->search_field; + } + + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSearchField($var) + { + GPBUtil::checkString($var, True); + $this->search_field = $var; + + return $this; + } + + /** + * Required. The task type of the query embedding. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTaskType() + { + return $this->task_type; + } + + /** + * Required. The task type of the query embedding. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTaskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\EmbeddingTaskType::class); + $this->task_type = $var; + + return $this; + } + + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\OutputFields|null + */ + public function getOutputFields() + { + return $this->output_fields; + } + + public function hasOutputFields() + { + return isset($this->output_fields); + } + + public function clearOutputFields() + { + unset($this->output_fields); + } + + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\OutputFields $var + * @return $this + */ + public function setOutputFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); + $this->output_fields = $var; + + return $this; + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The number of data objects to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTopK() + { + return isset($this->top_k) ? $this->top_k : 0; + } + + public function hasTopK() + { + return isset($this->top_k); + } + + public function clearTopK() + { + unset($this->top_k); + } + + /** + * Optional. The number of data objects to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to KNN search + * otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\SearchHint|null + */ + public function getSearchHint() + { + return $this->search_hint; + } + + public function hasSearchHint() + { + return isset($this->search_hint); + } + + public function clearSearchHint() + { + unset($this->search_hint); + } + + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to KNN search + * otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\SearchHint $var + * @return $this + */ + public function setSearchHint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint::class); + $this->search_hint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php new file mode 100644 index 000000000000..21af72420f0c --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php @@ -0,0 +1,101 @@ +google.cloud.vectorsearch.v1.SparseVector + */ +class SparseVector extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $values; + /** + * Required. The corresponding indices for the values. + * + * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float[] $values + * Required. The values of the vector. + * @type int[] $indices + * Required. The corresponding indices for the values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); + parent::__construct($data); + } + + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Required. The values of the vector. + * + * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param float[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->values = $arr; + + return $this; + } + + /** + * Required. The corresponding indices for the values. + * + * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getIndices() + { + return $this->indices; + } + + /** + * Required. The corresponding indices for the values. + * + * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int[] $var + * @return $this + */ + public function setIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->indices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php new file mode 100644 index 000000000000..65c8ffdbca52 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php @@ -0,0 +1,33 @@ +google.cloud.vectorsearch.v1.SparseVectorField + */ +class SparseVectorField extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php new file mode 100644 index 000000000000..60bd53821ac3 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php @@ -0,0 +1,237 @@ +google.cloud.vectorsearch.v1.TextSearch + */ +class TextSearch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The query text. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_text = ''; + /** + * Required. The data field names to search. + * + * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $data_field_names; + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_fields = null; + /** + * Optional. The number of results to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $top_k = null; + /** + * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, + * represented as a `google.protobuf.Struct`. + * + * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $search_text + * Required. The query text. + * @type string[] $data_field_names + * Required. The data field names to search. + * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields + * Optional. The fields to return in the search results. + * @type int $top_k + * Optional. The number of results to return. + * @type \Google\Protobuf\Struct $filter + * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, + * represented as a `google.protobuf.Struct`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The query text. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSearchText() + { + return $this->search_text; + } + + /** + * Required. The query text. + * + * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSearchText($var) + { + GPBUtil::checkString($var, True); + $this->search_text = $var; + + return $this; + } + + /** + * Required. The data field names to search. + * + * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getDataFieldNames() + { + return $this->data_field_names; + } + + /** + * Required. The data field names to search. + * + * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setDataFieldNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_field_names = $arr; + + return $this; + } + + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\OutputFields|null + */ + public function getOutputFields() + { + return $this->output_fields; + } + + public function hasOutputFields() + { + return isset($this->output_fields); + } + + public function clearOutputFields() + { + unset($this->output_fields); + } + + /** + * Optional. The fields to return in the search results. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\OutputFields $var + * @return $this + */ + public function setOutputFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); + $this->output_fields = $var; + + return $this; + } + + /** + * Optional. The number of results to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTopK() + { + return isset($this->top_k) ? $this->top_k : 0; + } + + public function hasTopK() + { + return isset($this->top_k); + } + + public function clearTopK() + { + unset($this->top_k); + } + + /** + * Optional. The number of results to return. + * + * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, + * represented as a `google.protobuf.Struct`. + * + * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, + * represented as a `google.protobuf.Struct`. + * + * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php new file mode 100644 index 000000000000..2aa5781afe3c --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php @@ -0,0 +1,282 @@ +google.cloud.vectorsearch.v1.UpdateCollectionRequest + */ +class UpdateCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Collection resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be + * overwritten. + * The following fields support update: `display_name`, `description`, + * `labels`, `data_schema`, `vector_schema`. + * For `data_schema` and `vector_schema`, fields can only be added, not + * deleted, but `vertex_embedding_config` in `vector_schema` can be added or + * removed. + * Partial updates for `data_schema` and `vector_schema` are also supported + * by using sub-field paths in `update_mask`, e.g. + * `data_schema.properties.foo` or `vector_schema.my_vector_field`. + * If `*` is provided in the update_mask, full replacement will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VectorSearch\V1\Collection $collection Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Collection resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be + * overwritten. + * + * The following fields support update: `display_name`, `description`, + * `labels`, `data_schema`, `vector_schema`. + * For `data_schema` and `vector_schema`, fields can only be added, not + * deleted, but `vertex_embedding_config` in `vector_schema` can be added or + * removed. + * Partial updates for `data_schema` and `vector_schema` are also supported + * by using sub-field paths in `update_mask`, e.g. + * `data_schema.properties.foo` or `vector_schema.my_vector_field`. + * + * If `*` is provided in the update_mask, full replacement will be performed. + * + * @return \Google\Cloud\VectorSearch\V1\UpdateCollectionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VectorSearch\V1\Collection $collection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCollection($collection) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Collection resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be + * overwritten. + * The following fields support update: `display_name`, `description`, + * `labels`, `data_schema`, `vector_schema`. + * For `data_schema` and `vector_schema`, fields can only be added, not + * deleted, but `vertex_embedding_config` in `vector_schema` can be added or + * removed. + * Partial updates for `data_schema` and `vector_schema` are also supported + * by using sub-field paths in `update_mask`, e.g. + * `data_schema.properties.foo` or `vector_schema.my_vector_field`. + * If `*` is provided in the update_mask, full replacement will be performed. + * @type \Google\Cloud\VectorSearch\V1\Collection $collection + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Collection resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be + * overwritten. + * The following fields support update: `display_name`, `description`, + * `labels`, `data_schema`, `vector_schema`. + * For `data_schema` and `vector_schema`, fields can only be added, not + * deleted, but `vertex_embedding_config` in `vector_schema` can be added or + * removed. + * Partial updates for `data_schema` and `vector_schema` are also supported + * by using sub-field paths in `update_mask`, e.g. + * `data_schema.properties.foo` or `vector_schema.my_vector_field`. + * If `*` is provided in the update_mask, full replacement will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Collection resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields present in the request will be + * overwritten. + * The following fields support update: `display_name`, `description`, + * `labels`, `data_schema`, `vector_schema`. + * For `data_schema` and `vector_schema`, fields can only be added, not + * deleted, but `vertex_embedding_config` in `vector_schema` can be added or + * removed. + * Partial updates for `data_schema` and `vector_schema` are also supported + * by using sub-field paths in `update_mask`, e.g. + * `data_schema.properties.foo` or `vector_schema.my_vector_field`. + * If `*` is provided in the update_mask, full replacement will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\Collection|null + */ + public function getCollection() + { + return $this->collection; + } + + public function hasCollection() + { + return isset($this->collection); + } + + public function clearCollection() + { + unset($this->collection); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Collection $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Collection::class); + $this->collection = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php new file mode 100644 index 000000000000..f69018d6edde --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php @@ -0,0 +1,142 @@ +google.cloud.vectorsearch.v1.UpdateDataObjectRequest + */ +class UpdateDataObjectRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DataObject which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_object = null; + /** + * Optional. The update mask applies to the resource. See + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VectorSearch\V1\DataObject $dataObject Required. The DataObject which replaces the resource on the server. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The update mask applies to the resource. See + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. + * + * @return \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VectorSearch\V1\DataObject $dataObject, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataObject($dataObject) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object + * Required. The DataObject which replaces the resource on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The update mask applies to the resource. See + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The DataObject which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\DataObject|null + */ + public function getDataObject() + { + return $this->data_object; + } + + public function hasDataObject() + { + return isset($this->data_object); + } + + public function clearDataObject() + { + unset($this->data_object); + } + + /** + * Required. The DataObject which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\DataObject $var + * @return $this + */ + public function setDataObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); + $this->data_object = $var; + + return $this; + } + + /** + * Optional. The update mask applies to the resource. See + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The update mask applies to the resource. See + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php new file mode 100644 index 000000000000..5591f43847a6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php @@ -0,0 +1,272 @@ +google.cloud.vectorsearch.v1.UpdateIndexRequest + */ +class UpdateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + /** + * Optional. Specifies the fields to be overwritten in the Index resource by + * the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields present in the + * request with non-empty values will be overwritten. + * The following fields support update: + * * `display_name` + * * `description` + * * `labels` + * * `dedicated_infrastructure.autoscaling_spec.min_replica_count` + * * `dedicated_infrastructure.autoscaling_spec.max_replica_count` + * If `*` is provided in the `update_mask`, full replacement of mutable fields + * will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VectorSearch\V1\Index $index Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Specifies the fields to be overwritten in the Index resource by + * the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields present in the + * request with non-empty values will be overwritten. + * + * The following fields support update: + * * `display_name` + * * `description` + * * `labels` + * * `dedicated_infrastructure.autoscaling_spec.min_replica_count` + * * `dedicated_infrastructure.autoscaling_spec.max_replica_count` + * + * If `*` is provided in the `update_mask`, full replacement of mutable fields + * will be performed. + * + * @return \Google\Cloud\VectorSearch\V1\UpdateIndexRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VectorSearch\V1\Index $index, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIndex($index) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\Index $index + * Required. The resource being updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Specifies the fields to be overwritten in the Index resource by + * the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields present in the + * request with non-empty values will be overwritten. + * The following fields support update: + * * `display_name` + * * `description` + * * `labels` + * * `dedicated_infrastructure.autoscaling_spec.min_replica_count` + * * `dedicated_infrastructure.autoscaling_spec.max_replica_count` + * If `*` is provided in the `update_mask`, full replacement of mutable fields + * will be performed. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VectorSearch\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VectorSearch\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Index::class); + $this->index = $var; + + return $this; + } + + /** + * Optional. Specifies the fields to be overwritten in the Index resource by + * the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields present in the + * request with non-empty values will be overwritten. + * The following fields support update: + * * `display_name` + * * `description` + * * `labels` + * * `dedicated_infrastructure.autoscaling_spec.min_replica_count` + * * `dedicated_infrastructure.autoscaling_spec.max_replica_count` + * If `*` is provided in the `update_mask`, full replacement of mutable fields + * will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Specifies the fields to be overwritten in the Index resource by + * the update. The fields specified in the update_mask are relative to the + * resource, not the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields present in the + * request with non-empty values will be overwritten. + * The following fields support update: + * * `display_name` + * * `description` + * * `labels` + * * `dedicated_infrastructure.autoscaling_spec.min_replica_count` + * * `dedicated_infrastructure.autoscaling_spec.max_replica_count` + * If `*` is provided in the `update_mask`, full replacement of mutable fields + * will be performed. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php new file mode 100644 index 000000000000..a05fb25b7172 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php @@ -0,0 +1,108 @@ +google.cloud.vectorsearch.v1.Vector + */ +class Vector extends \Google\Protobuf\Internal\Message +{ + protected $vector_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DenseVector $dense + * A dense vector. + * @type \Google\Cloud\VectorSearch\V1\SparseVector $sparse + * A sparse vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); + parent::__construct($data); + } + + /** + * A dense vector. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector dense = 2; + * @return \Google\Cloud\VectorSearch\V1\DenseVector|null + */ + public function getDense() + { + return $this->readOneof(2); + } + + public function hasDense() + { + return $this->hasOneof(2); + } + + /** + * A dense vector. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector dense = 2; + * @param \Google\Cloud\VectorSearch\V1\DenseVector $var + * @return $this + */ + public function setDense($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVector::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A sparse vector. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse = 3; + * @return \Google\Cloud\VectorSearch\V1\SparseVector|null + */ + public function getSparse() + { + return $this->readOneof(3); + } + + public function hasSparse() + { + return $this->hasOneof(3); + } + + /** + * A sparse vector. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse = 3; + * @param \Google\Cloud\VectorSearch\V1\SparseVector $var + * @return $this + */ + public function setSparse($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVector::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getVectorType() + { + return $this->whichOneof("vector_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php new file mode 100644 index 000000000000..dfcb5f2c5683 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php @@ -0,0 +1,108 @@ +google.cloud.vectorsearch.v1.VectorField + */ +class VectorField extends \Google\Protobuf\Internal\Message +{ + protected $vector_type_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DenseVectorField $dense_vector + * Dense vector field. + * @type \Google\Cloud\VectorSearch\V1\SparseVectorField $sparse_vector + * Sparse vector field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); + parent::__construct($data); + } + + /** + * Dense vector field. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVectorField dense_vector = 3; + * @return \Google\Cloud\VectorSearch\V1\DenseVectorField|null + */ + public function getDenseVector() + { + return $this->readOneof(3); + } + + public function hasDenseVector() + { + return $this->hasOneof(3); + } + + /** + * Dense vector field. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVectorField dense_vector = 3; + * @param \Google\Cloud\VectorSearch\V1\DenseVectorField $var + * @return $this + */ + public function setDenseVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVectorField::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Sparse vector field. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVectorField sparse_vector = 4; + * @return \Google\Cloud\VectorSearch\V1\SparseVectorField|null + */ + public function getSparseVector() + { + return $this->readOneof(4); + } + + public function hasSparseVector() + { + return $this->hasOneof(4); + } + + /** + * Sparse vector field. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVectorField sparse_vector = 4; + * @param \Google\Cloud\VectorSearch\V1\SparseVectorField $var + * @return $this + */ + public function setSparseVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVectorField::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getVectorTypeConfig() + { + return $this->whichOneof("vector_type_config"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php new file mode 100644 index 000000000000..c068f2a4e9d3 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php @@ -0,0 +1,368 @@ +google.cloud.vectorsearch.v1.VectorSearch + */ +class VectorSearch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_field = ''; + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + /** + * Optional. The number of nearest neighbors to return. + * + * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $top_k = null; + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $output_fields = null; + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to the default KNN + * search otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $search_hint = null; + /** + * Optional. The distance metric to use for the KNN search. If not specified, + * DOT_PRODUCT will be used as the default. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_metric = 0; + protected $vector_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VectorSearch\V1\DenseVector $vector + * A dense vector for the query. + * @type \Google\Cloud\VectorSearch\V1\SparseVector $sparse_vector + * A sparse vector for the query. + * @type string $search_field + * Required. The vector field to search. + * @type \Google\Protobuf\Struct $filter + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * @type int $top_k + * Optional. The number of nearest neighbors to return. + * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields + * Optional. Mask specifying which fields to return. + * @type \Google\Cloud\VectorSearch\V1\SearchHint $search_hint + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to the default KNN + * search otherwise. + * @type int $distance_metric + * Optional. The distance metric to use for the KNN search. If not specified, + * DOT_PRODUCT will be used as the default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); + parent::__construct($data); + } + + /** + * A dense vector for the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector vector = 1; + * @return \Google\Cloud\VectorSearch\V1\DenseVector|null + */ + public function getVector() + { + return $this->readOneof(1); + } + + public function hasVector() + { + return $this->hasOneof(1); + } + + /** + * A dense vector for the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector vector = 1; + * @param \Google\Cloud\VectorSearch\V1\DenseVector $var + * @return $this + */ + public function setVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVector::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A sparse vector for the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse_vector = 2; + * @return \Google\Cloud\VectorSearch\V1\SparseVector|null + */ + public function getSparseVector() + { + return $this->readOneof(2); + } + + public function hasSparseVector() + { + return $this->hasOneof(2); + } + + /** + * A sparse vector for the query. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse_vector = 2; + * @param \Google\Cloud\VectorSearch\V1\SparseVector $var + * @return $this + */ + public function setSparseVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVector::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSearchField() + { + return $this->search_field; + } + + /** + * Required. The vector field to search. + * + * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSearchField($var) + { + GPBUtil::checkString($var, True); + $this->search_field = $var; + + return $this; + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + * represented as a google.protobuf.Struct. + * + * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The number of nearest neighbors to return. + * + * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTopK() + { + return isset($this->top_k) ? $this->top_k : 0; + } + + public function hasTopK() + { + return isset($this->top_k); + } + + public function clearTopK() + { + unset($this->top_k); + } + + /** + * Optional. The number of nearest neighbors to return. + * + * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTopK($var) + { + GPBUtil::checkInt32($var); + $this->top_k = $var; + + return $this; + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\OutputFields|null + */ + public function getOutputFields() + { + return $this->output_fields; + } + + public function hasOutputFields() + { + return isset($this->output_fields); + } + + public function clearOutputFields() + { + unset($this->output_fields); + } + + /** + * Optional. Mask specifying which fields to return. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\OutputFields $var + * @return $this + */ + public function setOutputFields($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); + $this->output_fields = $var; + + return $this; + } + + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to the default KNN + * search otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\SearchHint|null + */ + public function getSearchHint() + { + return $this->search_hint; + } + + public function hasSearchHint() + { + return isset($this->search_hint); + } + + public function clearSearchHint() + { + unset($this->search_hint); + } + + /** + * Optional. Sets the search hint. If no strategy is specified, the service + * will use an index if one is available, and fall back to the default KNN + * search otherwise. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\SearchHint $var + * @return $this + */ + public function setSearchHint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint::class); + $this->search_hint = $var; + + return $this; + } + + /** + * Optional. The distance metric to use for the KNN search. If not specified, + * DOT_PRODUCT will be used as the default. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDistanceMetric() + { + return $this->distance_metric; + } + + /** + * Optional. The distance metric to use for the KNN search. If not specified, + * DOT_PRODUCT will be used as the default. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDistanceMetric($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DistanceMetric::class); + $this->distance_metric = $var; + + return $this; + } + + /** + * @return string + */ + public function getVectorType() + { + return $this->whichOneof("vector_type"); + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php new file mode 100644 index 000000000000..441e52948d3e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php @@ -0,0 +1,152 @@ +google.cloud.vectorsearch.v1.VertexEmbeddingConfig + */ +class VertexEmbeddingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Required: ID of the embedding model to use. See + * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models + * for the list of supported models. + * + * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $model_id = ''; + /** + * Required. Required: Text template for the input to the model. The template + * must contain one or more references to fields in the DataObject, e.g.: + * "Movie Title: {title} ---- Movie Plot: {plot}". + * + * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $text_template = ''; + /** + * Required. Required: Task type for the embeddings. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model_id + * Required. Required: ID of the embedding model to use. See + * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models + * for the list of supported models. + * @type string $text_template + * Required. Required: Text template for the input to the model. The template + * must contain one or more references to fields in the DataObject, e.g.: + * "Movie Title: {title} ---- Movie Plot: {plot}". + * @type int $task_type + * Required. Required: Task type for the embeddings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vectorsearch\V1\EmbeddingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Required: ID of the embedding model to use. See + * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models + * for the list of supported models. + * + * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getModelId() + { + return $this->model_id; + } + + /** + * Required. Required: ID of the embedding model to use. See + * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models + * for the list of supported models. + * + * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setModelId($var) + { + GPBUtil::checkString($var, True); + $this->model_id = $var; + + return $this; + } + + /** + * Required. Required: Text template for the input to the model. The template + * must contain one or more references to fields in the DataObject, e.g.: + * "Movie Title: {title} ---- Movie Plot: {plot}". + * + * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTextTemplate() + { + return $this->text_template; + } + + /** + * Required. Required: Text template for the input to the model. The template + * must contain one or more references to fields in the DataObject, e.g.: + * "Movie Title: {title} ---- Movie Plot: {plot}". + * + * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTextTemplate($var) + { + GPBUtil::checkString($var, True); + $this->text_template = $var; + + return $this; + } + + /** + * Required. Required: Task type for the embeddings. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTaskType() + { + return $this->task_type; + } + + /** + * Required. Required: Task type for the embeddings. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTaskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\EmbeddingTaskType::class); + $this->task_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php new file mode 100644 index 000000000000..901f38ec5006 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setAggregate($aggregate); + + // Call the API and handle any network failures. + try { + /** @var AggregateDataObjectsResponse $response */ + $response = $dataObjectSearchServiceClient->aggregateDataObjects($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 = DataObjectSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; + + aggregate_data_objects_sample($formattedParent, $aggregate); +} +// [END vectorsearch_v1_generated_DataObjectSearchService_AggregateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php new file mode 100644 index 000000000000..f4c1b6907b50 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setSearches($searches); + + // Call the API and handle any network failures. + try { + /** @var BatchSearchDataObjectsResponse $response */ + $response = $dataObjectSearchServiceClient->batchSearchDataObjects($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 = DataObjectSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + batch_search_data_objects_sample($formattedParent); +} +// [END vectorsearch_v1_generated_DataObjectSearchService_BatchSearchDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php new file mode 100644 index 000000000000..4dd8d9aff4a8 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/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 vectorsearch_v1_generated_DataObjectSearchService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php new file mode 100644 index 000000000000..37706aa0e667 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 vectorsearch_v1_generated_DataObjectSearchService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php new file mode 100644 index 000000000000..84e7266cbc2e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataObjectSearchServiceClient->queryDataObjects($request); + + /** @var DataObject $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 = DataObjectSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + query_data_objects_sample($formattedParent); +} +// [END vectorsearch_v1_generated_DataObjectSearchService_QueryDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php new file mode 100644 index 000000000000..1b87176767b6 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $dataObjectSearchServiceClient->searchDataObjects($request); + + /** @var SearchResult $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 = DataObjectSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + search_data_objects_sample($formattedParent); +} +// [END vectorsearch_v1_generated_DataObjectSearchService_SearchDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php new file mode 100644 index 000000000000..03b5d12f1736 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php @@ -0,0 +1,104 @@ +setParent($formattedRequestsParent) + ->setDataObjectId($requestsDataObjectId) + ->setDataObject($requestsDataObject); + $requests = [$createDataObjectRequest,]; + $request = (new BatchCreateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateDataObjectsResponse $response */ + $response = $dataObjectServiceClient->batchCreateDataObjects($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 = DataObjectServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $formattedRequestsParent = DataObjectServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $requestsDataObjectId = '[DATA_OBJECT_ID]'; + + batch_create_data_objects_sample($formattedParent, $formattedRequestsParent, $requestsDataObjectId); +} +// [END vectorsearch_v1_generated_DataObjectService_BatchCreateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php new file mode 100644 index 000000000000..9bcdc587e81d --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php @@ -0,0 +1,91 @@ +setName($formattedRequestsName); + $requests = [$deleteDataObjectRequest,]; + $request = (new BatchDeleteDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + $dataObjectServiceClient->batchDeleteDataObjects($request); + printf('Call completed successfully.' . PHP_EOL); + } 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 = DataObjectServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $formattedRequestsName = DataObjectServiceClient::dataObjectName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[DATAOBJECT]' + ); + + batch_delete_data_objects_sample($formattedParent, $formattedRequestsName); +} +// [END vectorsearch_v1_generated_DataObjectService_BatchDeleteDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php new file mode 100644 index 000000000000..148400e360b5 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php @@ -0,0 +1,85 @@ +setDataObject($requestsDataObject); + $requests = [$updateDataObjectRequest,]; + $request = (new BatchUpdateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateDataObjectsResponse $response */ + $response = $dataObjectServiceClient->batchUpdateDataObjects($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 = DataObjectServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + batch_update_data_objects_sample($formattedParent); +} +// [END vectorsearch_v1_generated_DataObjectService_BatchUpdateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php new file mode 100644 index 000000000000..0adc95b4be0a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setDataObjectId($dataObjectId) + ->setDataObject($dataObject); + + // Call the API and handle any network failures. + try { + /** @var DataObject $response */ + $response = $dataObjectServiceClient->createDataObject($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 = DataObjectServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $dataObjectId = '[DATA_OBJECT_ID]'; + + create_data_object_sample($formattedParent, $dataObjectId); +} +// [END vectorsearch_v1_generated_DataObjectService_CreateDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php new file mode 100644 index 000000000000..1f544ed85ecc --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $dataObjectServiceClient->deleteDataObject($request); + printf('Call completed successfully.' . PHP_EOL); + } 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 = DataObjectServiceClient::dataObjectName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[DATAOBJECT]' + ); + + delete_data_object_sample($formattedName); +} +// [END vectorsearch_v1_generated_DataObjectService_DeleteDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php new file mode 100644 index 000000000000..c9998dfb9cd8 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataObject $response */ + $response = $dataObjectServiceClient->getDataObject($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 = DataObjectServiceClient::dataObjectName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[DATAOBJECT]' + ); + + get_data_object_sample($formattedName); +} +// [END vectorsearch_v1_generated_DataObjectService_GetDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php new file mode 100644 index 000000000000..9edd13df81e2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/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 vectorsearch_v1_generated_DataObjectService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php new file mode 100644 index 000000000000..9af82c4d0882 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 vectorsearch_v1_generated_DataObjectService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php new file mode 100644 index 000000000000..1fd6306c28dc --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php @@ -0,0 +1,59 @@ +setDataObject($dataObject); + + // Call the API and handle any network failures. + try { + /** @var DataObject $response */ + $response = $dataObjectServiceClient->updateDataObject($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END vectorsearch_v1_generated_DataObjectService_UpdateDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php new file mode 100644 index 000000000000..b5dba9b52e21 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setCollectionId($collectionId) + ->setCollection($collection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->createCollection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Collection $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 = VectorSearchServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $collectionId = '[COLLECTION_ID]'; + + create_collection_sample($formattedParent, $collectionId); +} +// [END vectorsearch_v1_generated_VectorSearchService_CreateCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php new file mode 100644 index 000000000000..929e3279b24e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php @@ -0,0 +1,104 @@ +setIndexField($indexIndexField); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndexId($indexId) + ->setIndex($index); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->createIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $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 = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + $indexId = '[INDEX_ID]'; + $indexIndexField = '[INDEX_FIELD]'; + + create_index_sample($formattedParent, $indexId, $indexIndexField); +} +// [END vectorsearch_v1_generated_VectorSearchService_CreateIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php new file mode 100644 index 000000000000..7ab95231c955 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->deleteCollection($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 = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + delete_collection_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_DeleteCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php new file mode 100644 index 000000000000..ebcaa4e77d8a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->deleteIndex($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 = VectorSearchServiceClient::indexName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[INDEX]' + ); + + delete_index_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_DeleteIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php new file mode 100644 index 000000000000..c3081a2d0c6f --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->exportDataObjects($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDataObjectsResponse $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 +{ + $formattedName = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + export_data_objects_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_ExportDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php new file mode 100644 index 000000000000..d02572d30bf2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Collection $response */ + $response = $vectorSearchServiceClient->getCollection($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 = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + get_collection_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_GetCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php new file mode 100644 index 000000000000..140b096be0dd --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Index $response */ + $response = $vectorSearchServiceClient->getIndex($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 = VectorSearchServiceClient::indexName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[INDEX]' + ); + + get_index_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_GetIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php new file mode 100644 index 000000000000..2dac0088703d --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/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 vectorsearch_v1_generated_VectorSearchService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php new file mode 100644 index 000000000000..a5c5f7f3da75 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->importDataObjects($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDataObjectsResponse $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 +{ + $formattedName = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + import_data_objects_sample($formattedName); +} +// [END vectorsearch_v1_generated_VectorSearchService_ImportDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php new file mode 100644 index 000000000000..5121f672420e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vectorSearchServiceClient->listCollections($request); + + /** @var Collection $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 = VectorSearchServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_collections_sample($formattedParent); +} +// [END vectorsearch_v1_generated_VectorSearchService_ListCollections_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php new file mode 100644 index 000000000000..6aaa50ebb75a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vectorSearchServiceClient->listIndexes($request); + + /** @var Index $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 = VectorSearchServiceClient::collectionName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]' + ); + + list_indexes_sample($formattedParent); +} +// [END vectorsearch_v1_generated_VectorSearchService_ListIndexes_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php new file mode 100644 index 000000000000..6a4b493270e4 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php @@ -0,0 +1,78 @@ +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 vectorsearch_v1_generated_VectorSearchService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php new file mode 100644 index 000000000000..928fc297b03e --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php @@ -0,0 +1,71 @@ +setCollection($collection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->updateCollection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Collection $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()); + } +} +// [END vectorsearch_v1_generated_VectorSearchService_UpdateCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php new file mode 100644 index 000000000000..91bbca2bab09 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php @@ -0,0 +1,84 @@ +setIndexField($indexIndexField); + $request = (new UpdateIndexRequest()) + ->setIndex($index); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vectorSearchServiceClient->updateIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $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 +{ + $indexIndexField = '[INDEX_FIELD]'; + + update_index_sample($indexIndexField); +} +// [END vectorsearch_v1_generated_VectorSearchService_UpdateIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php new file mode 100644 index 000000000000..b9a1446b05b9 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php @@ -0,0 +1,441 @@ + aggregateDataObjectsAsync(AggregateDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchSearchDataObjectsAsync(BatchSearchDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface queryDataObjectsAsync(QueryDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchDataObjectsAsync(SearchDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DataObjectSearchServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.DataObjectSearchService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/data_object_search_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_object_search_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_object_search_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_object_search_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a collection + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * + * @return string The formatted collection resource. + */ + public static function collectionName(string $project, string $location, string $collection): string + { + return self::getPathTemplate('collection')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName(string $project, string $location, string $collection, string $index): string + { + return self::getPathTemplate('index')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'index' => $index, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - collection: projects/{project}/locations/{location}/collections/{collection} + * - index: projects/{project}/locations/{location}/collections/{collection}/indexes/{index} + * + * 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|ClientOptions $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 'vectorsearch.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VectorSearch\V1\DataObjectSearchServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DataObjectSearchServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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); + } + + /** + * Aggregates data objects. + * + * The async variant is + * {@see DataObjectSearchServiceClient::aggregateDataObjectsAsync()} . + * + * @example samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php + * + * @param AggregateDataObjectsRequest $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 AggregateDataObjectsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function aggregateDataObjects(AggregateDataObjectsRequest $request, array $callOptions = []): AggregateDataObjectsResponse + { + return $this->startApiCall('AggregateDataObjects', $request, $callOptions)->wait(); + } + + /** + * Batch searches data objects. + * + * The async variant is + * {@see DataObjectSearchServiceClient::batchSearchDataObjectsAsync()} . + * + * @example samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php + * + * @param BatchSearchDataObjectsRequest $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 BatchSearchDataObjectsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchSearchDataObjects(BatchSearchDataObjectsRequest $request, array $callOptions = []): BatchSearchDataObjectsResponse + { + return $this->startApiCall('BatchSearchDataObjects', $request, $callOptions)->wait(); + } + + /** + * Queries data objects. + * + * The async variant is + * {@see DataObjectSearchServiceClient::queryDataObjectsAsync()} . + * + * @example samples/V1/DataObjectSearchServiceClient/query_data_objects.php + * + * @param QueryDataObjectsRequest $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 queryDataObjects(QueryDataObjectsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('QueryDataObjects', $request, $callOptions); + } + + /** + * Searches data objects. + * + * The async variant is + * {@see DataObjectSearchServiceClient::searchDataObjectsAsync()} . + * + * @example samples/V1/DataObjectSearchServiceClient/search_data_objects.php + * + * @param SearchDataObjectsRequest $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 searchDataObjects(SearchDataObjectsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchDataObjects', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataObjectSearchServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataObjectSearchServiceClient/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. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see DataObjectSearchServiceClient::listLocationsAsync()} + * . + * + * @example samples/V1/DataObjectSearchServiceClient/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); + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php new file mode 100644 index 000000000000..a63ea4145fee --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php @@ -0,0 +1,520 @@ + batchCreateDataObjectsAsync(BatchCreateDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeleteDataObjectsAsync(BatchDeleteDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateDataObjectsAsync(BatchUpdateDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataObjectAsync(CreateDataObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataObjectAsync(DeleteDataObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataObjectAsync(GetDataObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataObjectAsync(UpdateDataObjectRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class DataObjectServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.DataObjectService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/data_object_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/data_object_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/data_object_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/data_object_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a collection + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * + * @return string The formatted collection resource. + */ + public static function collectionName(string $project, string $location, string $collection): string + { + return self::getPathTemplate('collection')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_object + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataObject + * + * @return string The formatted data_object resource. + */ + public static function dataObjectName(string $project, string $location, string $collection, string $dataObject): string + { + return self::getPathTemplate('dataObject')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'dataObject' => $dataObject, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - collection: projects/{project}/locations/{location}/collections/{collection} + * - dataObject: projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject} + * + * 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|ClientOptions $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 'vectorsearch.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VectorSearch\V1\DataObjectServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new DataObjectServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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); + } + + /** + * Creates a batch of dataObjects. + * + * The async variant is + * {@see DataObjectServiceClient::batchCreateDataObjectsAsync()} . + * + * @example samples/V1/DataObjectServiceClient/batch_create_data_objects.php + * + * @param BatchCreateDataObjectsRequest $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 BatchCreateDataObjectsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateDataObjects(BatchCreateDataObjectsRequest $request, array $callOptions = []): BatchCreateDataObjectsResponse + { + return $this->startApiCall('BatchCreateDataObjects', $request, $callOptions)->wait(); + } + + /** + * Deletes dataObjects in a batch. + * + * The async variant is + * {@see DataObjectServiceClient::batchDeleteDataObjectsAsync()} . + * + * @example samples/V1/DataObjectServiceClient/batch_delete_data_objects.php + * + * @param BatchDeleteDataObjectsRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeleteDataObjects(BatchDeleteDataObjectsRequest $request, array $callOptions = []): void + { + $this->startApiCall('BatchDeleteDataObjects', $request, $callOptions)->wait(); + } + + /** + * Updates dataObjects in a batch. + * + * The async variant is + * {@see DataObjectServiceClient::batchUpdateDataObjectsAsync()} . + * + * @example samples/V1/DataObjectServiceClient/batch_update_data_objects.php + * + * @param BatchUpdateDataObjectsRequest $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 BatchUpdateDataObjectsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateDataObjects(BatchUpdateDataObjectsRequest $request, array $callOptions = []): BatchUpdateDataObjectsResponse + { + return $this->startApiCall('BatchUpdateDataObjects', $request, $callOptions)->wait(); + } + + /** + * Creates a dataObject. + * + * The async variant is {@see DataObjectServiceClient::createDataObjectAsync()} . + * + * @example samples/V1/DataObjectServiceClient/create_data_object.php + * + * @param CreateDataObjectRequest $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 DataObject + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataObject(CreateDataObjectRequest $request, array $callOptions = []): DataObject + { + return $this->startApiCall('CreateDataObject', $request, $callOptions)->wait(); + } + + /** + * Deletes a dataObject. + * + * The async variant is {@see DataObjectServiceClient::deleteDataObjectAsync()} . + * + * @example samples/V1/DataObjectServiceClient/delete_data_object.php + * + * @param DeleteDataObjectRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDataObject(DeleteDataObjectRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataObject', $request, $callOptions)->wait(); + } + + /** + * Gets a data object. + * + * The async variant is {@see DataObjectServiceClient::getDataObjectAsync()} . + * + * @example samples/V1/DataObjectServiceClient/get_data_object.php + * + * @param GetDataObjectRequest $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 DataObject + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataObject(GetDataObjectRequest $request, array $callOptions = []): DataObject + { + return $this->startApiCall('GetDataObject', $request, $callOptions)->wait(); + } + + /** + * Updates a dataObject. + * + * The async variant is {@see DataObjectServiceClient::updateDataObjectAsync()} . + * + * @example samples/V1/DataObjectServiceClient/update_data_object.php + * + * @param UpdateDataObjectRequest $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 DataObject + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataObject(UpdateDataObjectRequest $request, array $callOptions = []): DataObject + { + return $this->startApiCall('UpdateDataObject', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DataObjectServiceClient::getLocationAsync()} . + * + * @example samples/V1/DataObjectServiceClient/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. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see DataObjectServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DataObjectServiceClient/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); + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php new file mode 100644 index 000000000000..208792b9cc85 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php @@ -0,0 +1,762 @@ + createCollectionAsync(CreateCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCollectionAsync(DeleteCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataObjectsAsync(ExportDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCollectionAsync(GetCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataObjectsAsync(ImportDataObjectsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCollectionsAsync(ListCollectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCollectionAsync(UpdateCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIndexAsync(UpdateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class VectorSearchServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.VectorSearchService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/vector_search_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/vector_search_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/vector_search_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/vector_search_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 = $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 collection + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * + * @return string The formatted collection resource. + */ + public static function collectionName(string $project, string $location, string $collection): string + { + return self::getPathTemplate('collection')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName(string $project, string $location, string $collection, string $index): string + { + return self::getPathTemplate('index')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'index' => $index, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - collection: projects/{project}/locations/{location}/collections/{collection} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - index: projects/{project}/locations/{location}/collections/{collection}/indexes/{index} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $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 'vectorsearch.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VectorSearch\V1\VectorSearchServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new VectorSearchServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @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. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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 new Collection in a given project and location. + * + * The async variant is {@see VectorSearchServiceClient::createCollectionAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/create_collection.php + * + * @param CreateCollectionRequest $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 createCollection(CreateCollectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCollection', $request, $callOptions)->wait(); + } + + /** + * Creates a new Index in a given project and location. + * + * The async variant is {@see VectorSearchServiceClient::createIndexAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/create_index.php + * + * @param CreateIndexRequest $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 createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Collection. + * + * The async variant is {@see VectorSearchServiceClient::deleteCollectionAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/delete_collection.php + * + * @param DeleteCollectionRequest $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 deleteCollection(DeleteCollectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCollection', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Index. + * + * The async variant is {@see VectorSearchServiceClient::deleteIndexAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/delete_index.php + * + * @param DeleteIndexRequest $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 deleteIndex(DeleteIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); + } + + /** + * Initiates a Long-Running Operation to export DataObjects from a Collection. + * + * The async variant is {@see VectorSearchServiceClient::exportDataObjectsAsync()} + * . + * + * @example samples/V1/VectorSearchServiceClient/export_data_objects.php + * + * @param ExportDataObjectsRequest $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 exportDataObjects(ExportDataObjectsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportDataObjects', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Collection. + * + * The async variant is {@see VectorSearchServiceClient::getCollectionAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/get_collection.php + * + * @param GetCollectionRequest $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 Collection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCollection(GetCollectionRequest $request, array $callOptions = []): Collection + { + return $this->startApiCall('GetCollection', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Index. + * + * The async variant is {@see VectorSearchServiceClient::getIndexAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/get_index.php + * + * @param GetIndexRequest $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 Index + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIndex(GetIndexRequest $request, array $callOptions = []): Index + { + return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); + } + + /** + * Initiates a Long-Running Operation to import DataObjects into a Collection. + * + * The async variant is {@see VectorSearchServiceClient::importDataObjectsAsync()} + * . + * + * @example samples/V1/VectorSearchServiceClient/import_data_objects.php + * + * @param ImportDataObjectsRequest $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 importDataObjects(ImportDataObjectsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportDataObjects', $request, $callOptions)->wait(); + } + + /** + * Lists Collections in a given project and location. + * + * The async variant is {@see VectorSearchServiceClient::listCollectionsAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/list_collections.php + * + * @param ListCollectionsRequest $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 listCollections(ListCollectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCollections', $request, $callOptions); + } + + /** + * Lists Indexes in a given project and location. + * + * The async variant is {@see VectorSearchServiceClient::listIndexesAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/list_indexes.php + * + * @param ListIndexesRequest $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 listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIndexes', $request, $callOptions); + } + + /** + * Updates the parameters of a single Collection. + * + * The async variant is {@see VectorSearchServiceClient::updateCollectionAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/update_collection.php + * + * @param UpdateCollectionRequest $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 updateCollection(UpdateCollectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCollection', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Index. + * + * The async variant is {@see VectorSearchServiceClient::updateIndexAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/update_index.php + * + * @param UpdateIndexRequest $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 updateIndex(UpdateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIndex', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see VectorSearchServiceClient::getLocationAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/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. + + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. + * + * The async variant is {@see VectorSearchServiceClient::listLocationsAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/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); + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..4e80203638a5 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json @@ -0,0 +1,181 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.vectorsearch.v1", + "libraryPackage": "Google\\Cloud\\VectorSearch\\V1", + "services": { + "DataObjectSearchService": { + "clients": { + "grpc": { + "libraryClient": "DataObjectSearchServiceGapicClient", + "rpcs": { + "AggregateDataObjects": { + "methods": [ + "aggregateDataObjects" + ] + }, + "BatchSearchDataObjects": { + "methods": [ + "batchSearchDataObjects" + ] + }, + "QueryDataObjects": { + "methods": [ + "queryDataObjects" + ] + }, + "SearchDataObjects": { + "methods": [ + "searchDataObjects" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "DataObjectService": { + "clients": { + "grpc": { + "libraryClient": "DataObjectServiceGapicClient", + "rpcs": { + "BatchCreateDataObjects": { + "methods": [ + "batchCreateDataObjects" + ] + }, + "BatchDeleteDataObjects": { + "methods": [ + "batchDeleteDataObjects" + ] + }, + "BatchUpdateDataObjects": { + "methods": [ + "batchUpdateDataObjects" + ] + }, + "CreateDataObject": { + "methods": [ + "createDataObject" + ] + }, + "DeleteDataObject": { + "methods": [ + "deleteDataObject" + ] + }, + "GetDataObject": { + "methods": [ + "getDataObject" + ] + }, + "UpdateDataObject": { + "methods": [ + "updateDataObject" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "VectorSearchService": { + "clients": { + "grpc": { + "libraryClient": "VectorSearchServiceGapicClient", + "rpcs": { + "CreateCollection": { + "methods": [ + "createCollection" + ] + }, + "CreateIndex": { + "methods": [ + "createIndex" + ] + }, + "DeleteCollection": { + "methods": [ + "deleteCollection" + ] + }, + "DeleteIndex": { + "methods": [ + "deleteIndex" + ] + }, + "ExportDataObjects": { + "methods": [ + "exportDataObjects" + ] + }, + "GetCollection": { + "methods": [ + "getCollection" + ] + }, + "GetIndex": { + "methods": [ + "getIndex" + ] + }, + "ImportDataObjects": { + "methods": [ + "importDataObjects" + ] + }, + "ListCollections": { + "methods": [ + "listCollections" + ] + }, + "ListIndexes": { + "methods": [ + "listIndexes" + ] + }, + "UpdateCollection": { + "methods": [ + "updateCollection" + ] + }, + "UpdateIndex": { + "methods": [ + "updateIndex" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json new file mode 100644 index 000000000000..50aeb62f8c33 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.cloud.vectorsearch.v1.DataObjectSearchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "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 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "AggregateDataObjects": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "BatchSearchDataObjects": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "QueryDataObjects": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "SearchDataObjects": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_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" + } + } + } + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php new file mode 100644 index 000000000000..8db464a2a450 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php @@ -0,0 +1,130 @@ + [ + 'google.cloud.vectorsearch.v1.DataObjectSearchService' => [ + 'AggregateDataObjects' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\AggregateDataObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSearchDataObjects' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'QueryDataObjects' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataObjects', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\QueryDataObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDataObjects' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse', + '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', + ], + 'templateMap' => [ + 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', + 'index' => 'projects/{project}/locations/{location}/collections/{collection}/indexes/{index}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php new file mode 100644 index 000000000000..68333383a6e5 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vectorsearch.v1.DataObjectSearchService' => [ + 'AggregateDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:aggregate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSearchDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchSearch', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'QueryDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:query', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:search', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json new file mode 100644 index 000000000000..a78004bb0501 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json @@ -0,0 +1,103 @@ +{ + "interfaces": { + "google.cloud.vectorsearch.v1.DataObjectService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ] + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + } + }, + "methods": { + "BatchCreateDataObjects": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "BatchDeleteDataObjects": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "BatchUpdateDataObjects": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateDataObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteDataObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetDataObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataObject": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_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" + } + } + } + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php new file mode 100644 index 000000000000..a66571732eb9 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php @@ -0,0 +1,151 @@ + [ + 'google.cloud.vectorsearch.v1.DataObjectService' => [ + 'BatchCreateDataObjects' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchCreateDataObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteDataObjects' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateDataObjects' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchUpdateDataObjectsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDataObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDataObject' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', + 'headerParams' => [ + [ + 'keyName' => 'data_object.name', + 'fieldAccessors' => [ + 'getDataObject', + 'getName', + ], + ], + ], + ], + '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', + ], + 'templateMap' => [ + 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', + 'dataObject' => 'projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php new file mode 100644 index 000000000000..d92a9eabd1e4 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php @@ -0,0 +1,186 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vectorsearch.v1.DataObjectService' => [ + 'BatchCreateDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataObject' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects', + 'body' => 'data_object', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'data_object_id', + ], + ], + 'DeleteDataObject' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataObject' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDataObject' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}', + 'body' => 'data_object', + 'placeholders' => [ + 'data_object.name' => [ + 'getters' => [ + 'getDataObject', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json new file mode 100644 index 000000000000..e055528d9e03 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json @@ -0,0 +1,116 @@ +{ + "interfaces": { + "google.cloud.vectorsearch.v1.VectorSearchService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ] + }, + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "CreateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ExportDataObjects": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportDataObjects": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListCollections": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateIndex": { + "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" + } + } + } + } +} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php new file mode 100644 index 000000000000..5e588fcd5a52 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php @@ -0,0 +1,286 @@ + [ + 'google.cloud.vectorsearch.v1.VectorSearchService' => [ + 'CreateCollection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Collection', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Index', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCollection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportDataObjects' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\ExportDataObjectsResponse', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\ExportDataObjectsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportDataObjects' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\ImportDataObjectsResponse', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\ImportDataObjectsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCollection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Collection', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'collection.name', + 'fieldAccessors' => [ + 'getCollection', + 'getName', + ], + ], + ], + ], + 'UpdateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Index', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index.name', + 'fieldAccessors' => [ + 'getIndex', + 'getName', + ], + ], + ], + ], + 'GetCollection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\Collection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\Index', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCollections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCollections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\ListCollectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VectorSearch\V1\ListIndexesResponse', + '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', + ], + 'templateMap' => [ + 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'index' => 'projects/{project}/locations/{location}/collections/{collection}/indexes/{index}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php new file mode 100644 index 000000000000..e6f18f8e46f2 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php @@ -0,0 +1,246 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.vectorsearch.v1.VectorSearchService' => [ + 'CreateCollection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/collections', + 'body' => 'collection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'collection_id', + ], + ], + 'CreateIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/indexes', + 'body' => 'index', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'index_id', + ], + ], + 'DeleteCollection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCollection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDataObjects' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}:importDataObjects', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCollections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/collections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/indexes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCollection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{collection.name=projects/*/locations/*/collections/*}', + 'body' => 'collection', + 'placeholders' => [ + 'collection.name' => [ + 'getters' => [ + 'getCollection', + 'getName', + ], + ], + ], + ], + 'UpdateIndex' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}', + 'body' => 'index', + 'placeholders' => [ + 'index.name' => [ + 'getters' => [ + 'getIndex', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php new file mode 100644 index 000000000000..4fd194a1ff95 --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php @@ -0,0 +1,510 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataObjectSearchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataObjectSearchServiceClient($options); + } + + /** @test */ + public function aggregateDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AggregateDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; + $request = (new AggregateDataObjectsRequest()) + ->setParent($formattedParent) + ->setAggregate($aggregate); + $response = $gapicClient->aggregateDataObjects($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.vectorsearch.v1.DataObjectSearchService/AggregateDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAggregate(); + $this->assertProtobufEquals($aggregate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregateDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; + $request = (new AggregateDataObjectsRequest()) + ->setParent($formattedParent) + ->setAggregate($aggregate); + try { + $gapicClient->aggregateDataObjects($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 batchSearchDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchSearchDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $searches = []; + $request = (new BatchSearchDataObjectsRequest()) + ->setParent($formattedParent) + ->setSearches($searches); + $response = $gapicClient->batchSearchDataObjects($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.vectorsearch.v1.DataObjectSearchService/BatchSearchDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSearches(); + $this->assertProtobufEquals($searches, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchSearchDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $searches = []; + $request = (new BatchSearchDataObjectsRequest()) + ->setParent($formattedParent) + ->setSearches($searches); + try { + $gapicClient->batchSearchDataObjects($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 queryDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataObjectsElement = new DataObject(); + $dataObjects = [ + $dataObjectsElement, + ]; + $expectedResponse = new QueryDataObjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataObjects($dataObjects); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new QueryDataObjectsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->queryDataObjects($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataObjects()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectSearchService/QueryDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new QueryDataObjectsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->queryDataObjects($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 searchDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resultsElement = new SearchResult(); + $results = [ + $resultsElement, + ]; + $expectedResponse = new SearchDataObjectsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResults($results); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new SearchDataObjectsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->searchDataObjects($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectSearchService/SearchDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new SearchDataObjectsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->searchDataObjects($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 aggregateDataObjectsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AggregateDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; + $request = (new AggregateDataObjectsRequest()) + ->setParent($formattedParent) + ->setAggregate($aggregate); + $response = $gapicClient->aggregateDataObjectsAsync($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.vectorsearch.v1.DataObjectSearchService/AggregateDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAggregate(); + $this->assertProtobufEquals($aggregate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php new file mode 100644 index 000000000000..4153f2fdcc4f --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php @@ -0,0 +1,710 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DataObjectServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DataObjectServiceClient($options); + } + + /** @test */ + public function batchCreateDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchCreateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreateDataObjects($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.vectorsearch.v1.DataObjectService/BatchCreateDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchCreateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->batchCreateDataObjects($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 batchDeleteDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchDeleteDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $gapicClient->batchDeleteDataObjects($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectService/BatchDeleteDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchDeleteDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->batchDeleteDataObjects($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 batchUpdateDataObjectsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchUpdateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchUpdateDataObjects($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.vectorsearch.v1.DataObjectService/BatchUpdateDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateDataObjectsExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchUpdateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->batchUpdateDataObjects($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 createDataObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $dataObjectId2 = 'dataObjectId21879679481'; + $etag = 'etag3123477'; + $expectedResponse = new DataObject(); + $expectedResponse->setName($name); + $expectedResponse->setDataObjectId($dataObjectId2); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $dataObjectId = 'dataObjectId-806981690'; + $dataObject = new DataObject(); + $request = (new CreateDataObjectRequest()) + ->setParent($formattedParent) + ->setDataObjectId($dataObjectId) + ->setDataObject($dataObject); + $response = $gapicClient->createDataObject($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.vectorsearch.v1.DataObjectService/CreateDataObject', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataObjectId(); + $this->assertProtobufEquals($dataObjectId, $actualValue); + $actualValue = $actualRequestObject->getDataObject(); + $this->assertProtobufEquals($dataObject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataObjectExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $dataObjectId = 'dataObjectId-806981690'; + $dataObject = new DataObject(); + $request = (new CreateDataObjectRequest()) + ->setParent($formattedParent) + ->setDataObjectId($dataObjectId) + ->setDataObject($dataObject); + try { + $gapicClient->createDataObject($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 deleteDataObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); + $request = (new DeleteDataObjectRequest()) + ->setName($formattedName); + $gapicClient->deleteDataObject($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectService/DeleteDataObject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataObjectExceptionTest() + { + $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->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); + $request = (new DeleteDataObjectRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataObject($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 getDataObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dataObjectId = 'dataObjectId-806981690'; + $etag = 'etag3123477'; + $expectedResponse = new DataObject(); + $expectedResponse->setName($name2); + $expectedResponse->setDataObjectId($dataObjectId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); + $request = (new GetDataObjectRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataObject($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.vectorsearch.v1.DataObjectService/GetDataObject', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataObjectExceptionTest() + { + $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->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); + $request = (new GetDataObjectRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataObject($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 updateDataObjectTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $dataObjectId = 'dataObjectId-806981690'; + $etag = 'etag3123477'; + $expectedResponse = new DataObject(); + $expectedResponse->setName($name); + $expectedResponse->setDataObjectId($dataObjectId); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $dataObject = new DataObject(); + $request = (new UpdateDataObjectRequest()) + ->setDataObject($dataObject); + $response = $gapicClient->updateDataObject($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.vectorsearch.v1.DataObjectService/UpdateDataObject', $actualFuncCall); + $actualValue = $actualRequestObject->getDataObject(); + $this->assertProtobufEquals($dataObject, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataObjectExceptionTest() + { + $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 + $dataObject = new DataObject(); + $request = (new UpdateDataObjectRequest()) + ->setDataObject($dataObject); + try { + $gapicClient->updateDataObject($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 batchCreateDataObjectsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateDataObjectsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $requests = []; + $request = (new BatchCreateDataObjectsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreateDataObjectsAsync($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.vectorsearch.v1.DataObjectService/BatchCreateDataObjects', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php new file mode 100644 index 000000000000..e78cd9f0334a --- /dev/null +++ b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php @@ -0,0 +1,1599 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return VectorSearchServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new VectorSearchServiceClient($options); + } + + /** @test */ + public function createCollectionTest() + { + $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/createCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $collectionId = 'collectionId-821242276'; + $collection = new Collection(); + $request = (new CreateCollectionRequest()) + ->setParent($formattedParent) + ->setCollectionId($collectionId) + ->setCollection($collection); + $response = $gapicClient->createCollection($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.vectorsearch.v1.VectorSearchService/CreateCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $actualValue = $actualApiRequestObject->getCollection(); + $this->assertProtobufEquals($collection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCollectionTest'); + $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 createCollectionExceptionTest() + { + $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/createCollectionTest'); + $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]'); + $collectionId = 'collectionId-821242276'; + $collection = new Collection(); + $request = (new CreateCollectionRequest()) + ->setParent($formattedParent) + ->setCollectionId($collectionId) + ->setCollection($collection); + $response = $gapicClient->createCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCollectionTest'); + 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 createIndexTest() + { + $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/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $indexField = 'indexField1673840461'; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIndexField($indexField); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $indexId = 'indexId112508840'; + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndexId($indexId) + ->setIndex($index); + $response = $gapicClient->createIndex($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.vectorsearch.v1.VectorSearchService/CreateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndexId(); + $this->assertProtobufEquals($indexId, $actualValue); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + $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 createIndexExceptionTest() + { + $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/createIndexTest'); + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $indexId = 'indexId112508840'; + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndexId($indexId) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + 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 deleteCollectionTest() + { + $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/deleteCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new DeleteCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCollection($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.vectorsearch.v1.VectorSearchService/DeleteCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); + $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 deleteCollectionExceptionTest() + { + $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/deleteCollectionTest'); + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new DeleteCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); + 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 deleteIndexTest() + { + $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/deleteIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndex($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.vectorsearch.v1.VectorSearchService/DeleteIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); + $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 deleteIndexExceptionTest() + { + $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/deleteIndexTest'); + $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->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); + 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 exportDataObjectsTest() + { + $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/exportDataObjectsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportDataObjectsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataObjectsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ExportDataObjectsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDataObjects($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.vectorsearch.v1.VectorSearchService/ExportDataObjects', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataObjectsTest'); + $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 exportDataObjectsExceptionTest() + { + $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/exportDataObjectsTest'); + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ExportDataObjectsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDataObjects($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataObjectsTest'); + 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 getCollectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new GetCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getCollection($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.vectorsearch.v1.VectorSearchService/GetCollection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCollectionExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new GetCollectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getCollection($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 getIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $indexField = 'indexField1673840461'; + $expectedResponse = new Index(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIndexField($indexField); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->getIndex($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.vectorsearch.v1.VectorSearchService/GetIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexExceptionTest() + { + $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->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->getIndex($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 importDataObjectsTest() + { + $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/importDataObjectsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDataObjectsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataObjectsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ImportDataObjectsRequest()) + ->setName($formattedName); + $response = $gapicClient->importDataObjects($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.vectorsearch.v1.VectorSearchService/ImportDataObjects', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataObjectsTest'); + $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 importDataObjectsExceptionTest() + { + $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/importDataObjectsTest'); + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ImportDataObjectsRequest()) + ->setName($formattedName); + $response = $gapicClient->importDataObjects($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataObjectsTest'); + 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 listCollectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $collectionsElement = new Collection(); + $collections = [ + $collectionsElement, + ]; + $expectedResponse = new ListCollectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCollections($collections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCollectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCollections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCollections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.VectorSearchService/ListCollections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionsExceptionTest() + { + $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 ListCollectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCollections($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 listIndexesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexesElement = new Index(); + $indexes = [ + $indexesElement, + ]; + $expectedResponse = new ListIndexesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexes($indexes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIndexes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.vectorsearch.v1.VectorSearchService/ListIndexes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesExceptionTest() + { + $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIndexes($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 updateCollectionTest() + { + $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/updateCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $collection = new Collection(); + $request = (new UpdateCollectionRequest()) + ->setCollection($collection); + $response = $gapicClient->updateCollection($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.vectorsearch.v1.VectorSearchService/UpdateCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getCollection(); + $this->assertProtobufEquals($collection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCollectionTest'); + $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 updateCollectionExceptionTest() + { + $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/updateCollectionTest'); + $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 + $collection = new Collection(); + $request = (new UpdateCollectionRequest()) + ->setCollection($collection); + $response = $gapicClient->updateCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateCollectionTest'); + 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 updateIndexTest() + { + $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/updateIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $indexField = 'indexField1673840461'; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIndexField($indexField); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new UpdateIndexRequest()) + ->setIndex($index); + $response = $gapicClient->updateIndex($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.vectorsearch.v1.VectorSearchService/UpdateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + $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 updateIndexExceptionTest() + { + $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/updateIndexTest'); + $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 + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new UpdateIndexRequest()) + ->setIndex($index); + $response = $gapicClient->updateIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + 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() + { + $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 createCollectionAsyncTest() + { + $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/createCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $collectionId = 'collectionId-821242276'; + $collection = new Collection(); + $request = (new CreateCollectionRequest()) + ->setParent($formattedParent) + ->setCollectionId($collectionId) + ->setCollection($collection); + $response = $gapicClient->createCollectionAsync($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.vectorsearch.v1.VectorSearchService/CreateCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $actualValue = $actualApiRequestObject->getCollection(); + $this->assertProtobufEquals($collection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCollectionTest'); + $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()); + } +} From 4fe6245285fc00aa5207a3b3a03c47ecda9c70b4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Sun, 12 Apr 2026 10:05:42 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata}/V1/EncryptionSpec.php | 0 .../metadata/V1/VectorsearchService.php | 3 +- .../list_locations.php | 21 +- .../list_locations.php | 21 +- .../list_locations.php | 21 +- .../update_index.php | 0 .../Client/DataObjectSearchServiceClient.php | 21 +- .../src/V1/Client/DataObjectServiceClient.php | 21 +- .../V1/Client/VectorSearchServiceClient.php | 71 +- VectorSearch/src/V1/Collection.php | 60 + .../src}/V1/EncryptionSpec.php | 0 .../src}/V1/UpdateIndexRequest.php | 0 VectorSearch/src/V1/gapic_metadata.json | 5 + .../vector_search_service_client_config.json | 5 + ...ector_search_service_descriptor_config.php | 21 + ...ctor_search_service_rest_client_config.php | 13 + .../Client/VectorSearchServiceClientTest.php | 135 ++ .../Google/Cloud/Vectorsearch/V1/Common.php | 24 - .../Cloud/Vectorsearch/V1/DataObject.php | 28 - .../V1/DataObjectSearchService.php | 32 - .../Vectorsearch/V1/DataObjectService.php | 31 - .../Cloud/Vectorsearch/V1/EmbeddingConfig.php | 25 - .../Vectorsearch/V1/VectorsearchService.php | 38 - .../V1/AggregateDataObjectsRequest.php | 154 -- .../V1/AggregateDataObjectsResponse.php | 68 - .../VectorSearch/V1/AggregationMethod.php | 54 - .../V1/BatchCreateDataObjectsRequest.php | 118 -- .../V1/BatchCreateDataObjectsResponse.php | 68 - .../V1/BatchDeleteDataObjectsRequest.php | 128 -- .../V1/BatchSearchDataObjectsRequest.php | 149 -- .../CombineResultsOptions.php | 159 -- .../V1/BatchSearchDataObjectsResponse.php | 71 - .../V1/BatchUpdateDataObjectsRequest.php | 138 -- .../V1/BatchUpdateDataObjectsResponse.php | 34 - .../Cloud/VectorSearch/V1/Collection.php | 411 ----- .../V1/CreateCollectionRequest.php | 257 --- .../V1/CreateDataObjectRequest.php | 189 -- .../VectorSearch/V1/CreateIndexRequest.php | 267 --- .../Cloud/VectorSearch/V1/DataObject.php | 317 ---- .../V1/DedicatedInfrastructure.php | 121 -- .../AutoscalingSpec.php | 125 -- .../V1/DedicatedInfrastructure/Mode.php | 61 - .../V1/DeleteCollectionRequest.php | 155 -- .../V1/DeleteDataObjectRequest.php | 134 -- .../VectorSearch/V1/DeleteIndexRequest.php | 165 -- .../Cloud/VectorSearch/V1/DenseScannIndex.php | 67 - .../V1/DenseScannIndex/FeatureNormType.php | 61 - .../Cloud/VectorSearch/V1/DenseVector.php | 67 - .../VectorSearch/V1/DenseVectorField.php | 115 -- .../Cloud/VectorSearch/V1/DistanceMetric.php | 61 - .../VectorSearch/V1/EmbeddingTaskType.php | 103 -- .../V1/ExportDataObjectsMetadata.php | 121 -- .../V1/ExportDataObjectsRequest.php | 118 -- .../GcsExportDestination.php | 105 -- .../GcsExportDestination/Format.php | 54 - .../V1/ExportDataObjectsResponse.php | 33 - .../VectorSearch/V1/GetCollectionRequest.php | 81 - .../VectorSearch/V1/GetDataObjectRequest.php | 92 - .../Cloud/VectorSearch/V1/GetIndexRequest.php | 81 - .../V1/ImportDataObjectsMetadata.php | 190 -- .../V1/ImportDataObjectsRequest.php | 114 -- .../GcsImportConfig.php | 151 -- .../V1/ImportDataObjectsResponse.php | 78 - .../Google/Cloud/VectorSearch/V1/Index.php | 489 ----- .../V1/ListCollectionsRequest.php | 221 --- .../V1/ListCollectionsResponse.php | 135 -- .../VectorSearch/V1/ListIndexesRequest.php | 221 --- .../VectorSearch/V1/ListIndexesResponse.php | 101 -- .../VectorSearch/V1/OperationMetadata.php | 311 ---- .../Cloud/VectorSearch/V1/OutputFields.php | 135 -- .../V1/QueryDataObjectsRequest.php | 256 --- .../V1/QueryDataObjectsResponse.php | 110 -- .../Google/Cloud/VectorSearch/V1/Ranker.php | 75 - .../VectorSearch/V1/ReciprocalRankFusion.php | 67 - .../Google/Cloud/VectorSearch/V1/Search.php | 141 -- .../V1/SearchDataObjectsRequest.php | 275 --- .../V1/SearchDataObjectsResponse.php | 109 -- .../Cloud/VectorSearch/V1/SearchHint.php | 111 -- .../VectorSearch/V1/SearchHint/IndexHint.php | 79 - .../VectorSearch/V1/SearchHint/KnnHint.php | 34 - .../Cloud/VectorSearch/V1/SearchResult.php | 125 -- .../Cloud/VectorSearch/V1/SemanticSearch.php | 327 ---- .../Cloud/VectorSearch/V1/SparseVector.php | 101 -- .../VectorSearch/V1/SparseVectorField.php | 33 - .../Cloud/VectorSearch/V1/TextSearch.php | 237 --- .../V1/UpdateCollectionRequest.php | 282 --- .../V1/UpdateDataObjectRequest.php | 142 -- .../Google/Cloud/VectorSearch/V1/Vector.php | 108 -- .../Cloud/VectorSearch/V1/VectorField.php | 108 -- .../Cloud/VectorSearch/V1/VectorSearch.php | 368 ---- .../VectorSearch/V1/VertexEmbeddingConfig.php | 152 -- .../aggregate_data_objects.php | 80 - .../batch_search_data_objects.php | 79 - .../get_location.php | 57 - .../list_locations.php | 78 - .../query_data_objects.php | 81 - .../search_data_objects.php | 81 - .../batch_create_data_objects.php | 104 -- .../batch_delete_data_objects.php | 91 - .../batch_update_data_objects.php | 85 - .../create_data_object.php | 85 - .../delete_data_object.php | 76 - .../get_data_object.php | 78 - .../DataObjectServiceClient/get_location.php | 57 - .../list_locations.php | 78 - .../update_data_object.php | 59 - .../create_collection.php | 92 - .../create_index.php | 104 -- .../delete_collection.php | 84 - .../delete_index.php | 87 - .../export_data_objects.php | 89 - .../get_collection.php | 75 - .../VectorSearchServiceClient/get_index.php | 76 - .../get_location.php | 57 - .../import_data_objects.php | 88 - .../list_collections.php | 76 - .../list_indexes.php | 80 - .../list_locations.php | 78 - .../update_collection.php | 71 - .../Client/DataObjectSearchServiceClient.php | 441 ----- .../src/V1/Client/DataObjectServiceClient.php | 520 ------ .../V1/Client/VectorSearchServiceClient.php | 762 -------- .../v1/src/V1/gapic_metadata.json | 181 -- ...a_object_search_service_client_config.json | 64 - ...bject_search_service_descriptor_config.php | 130 -- ...ject_search_service_rest_client_config.php | 148 -- .../data_object_service_client_config.json | 103 -- .../data_object_service_descriptor_config.php | 151 -- ...data_object_service_rest_client_config.php | 186 -- .../vector_search_service_client_config.json | 116 -- ...ector_search_service_descriptor_config.php | 286 --- ...ctor_search_service_rest_client_config.php | 246 --- .../DataObjectSearchServiceClientTest.php | 510 ------ .../V1/Client/DataObjectServiceClientTest.php | 710 -------- .../Client/VectorSearchServiceClientTest.php | 1599 ----------------- 135 files changed, 381 insertions(+), 18482 deletions(-) rename {owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch => VectorSearch/metadata}/V1/EncryptionSpec.php (100%) rename {owl-bot-staging/VectorSearch/v1 => VectorSearch}/samples/V1/VectorSearchServiceClient/update_index.php (100%) rename {owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch => VectorSearch/src}/V1/EncryptionSpec.php (100%) rename {owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch => VectorSearch/src}/V1/UpdateIndexRequest.php (100%) delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php delete mode 100644 owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php delete mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php delete mode 100644 owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php b/VectorSearch/metadata/V1/EncryptionSpec.php similarity index 100% rename from owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EncryptionSpec.php rename to VectorSearch/metadata/V1/EncryptionSpec.php diff --git a/VectorSearch/metadata/V1/VectorsearchService.php b/VectorSearch/metadata/V1/VectorsearchService.php index cffa51fcfaa9..163e08d1aa1e 100644 --- a/VectorSearch/metadata/V1/VectorsearchService.php +++ b/VectorSearch/metadata/V1/VectorsearchService.php @@ -21,6 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Vectorsearch\V1\Common::initOnce(); \GPBMetadata\Google\Cloud\Vectorsearch\V1\EmbeddingConfig::initOnce(); + \GPBMetadata\Google\Cloud\Vectorsearch\V1\EncryptionSpec::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); @@ -28,7 +29,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); \GPBMetadata\Google\Rpc\Status::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\x99C\x0A7google/cloud/vectorsearch/v1/vectorsearch_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xAF\x05\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12I\x0A\x06labels\x18\x04 \x03(\x0B24.google.cloud.vectorsearch.v1.Collection.LabelsEntryB\x03\xE0A\x01\x12V\x0A\x0Dvector_schema\x18\x07 \x03(\x0B2:.google.cloud.vectorsearch.v1.Collection.VectorSchemaEntryB\x03\xE0A\x01\x121\x0A\x0Bdata_schema\x18\x0A \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A^\x0A\x11VectorSchemaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.VectorField:\x028\x01:\x87\x01\xEAA\x83\x01\x0A&vectorsearch.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}*\x0Bcollections2\x0Acollection\"\xB5\x01\x0A\x0BVectorField\x12F\x0A\x0Cdense_vector\x18\x03 \x01(\x0B2..google.cloud.vectorsearch.v1.DenseVectorFieldH\x00\x12H\x0A\x0Dsparse_vector\x18\x04 \x01(\x0B2/.google.cloud.vectorsearch.v1.SparseVectorFieldH\x00B\x14\x0A\x12vector_type_config\"\x81\x01\x0A\x10DenseVectorField\x12\x12\x0A\x0Adimensions\x18\x01 \x01(\x05\x12Y\x0A\x17vertex_embedding_config\x18\x03 \x01(\x0B23.google.cloud.vectorsearch.v1.VertexEmbeddingConfigB\x03\xE0A\x01\"\x13\x0A\x11SparseVectorField\"\xB5\x01\x0A\x16ListCollectionsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x8B\x01\x0A\x17ListCollectionsResponse\x12=\x0A\x0Bcollections\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"T\x0A\x14GetCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\"\xD9\x01\x0A\x17CreateCollectionRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12A\x0A\x0Acollection\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB3\x01\x0A\x17UpdateCollectionRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12A\x0A\x0Acollection\x18\x02 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"x\x0A\x17DeleteCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA0\x06\x0A\x05Index\x12^\x0A\x18dedicated_infrastructure\x18\x0B \x01(\x0B25.google.cloud.vectorsearch.v1.DedicatedInfrastructureB\x03\xE0A\x01H\x00\x12I\x0A\x0Bdense_scann\x18\x0C \x01(\x0B2-.google.cloud.vectorsearch.v1.DenseScannIndexB\x03\xE0A\x01H\x01\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x0A \x03(\x0B2/.google.cloud.vectorsearch.v1.Index.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fdistance_metric\x18\x04 \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01\x12\x18\x0A\x0Bindex_field\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dfilter_fields\x18\x06 \x03(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cstore_fields\x18\x07 \x03(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x89\x01\xEAA\x85\x01\x0A!vectorsearch.googleapis.com/Index\x12Pprojects/{project}/locations/{location}/collections/{collection}/indexes/{index}*\x07indexes2\x05indexB\x0C\x0A\x0Ainfra_typeB\x0C\x0A\x0Aindex_type\"\xC5\x01\x0A\x12CreateIndexRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x05index\x18\x03 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"n\x0A\x12DeleteIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x12ListIndexesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!vectorsearch.googleapis.com/Index\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13ListIndexesResponse\x124\x0A\x07indexes\x18\x01 \x03(\x0B2#.google.cloud.vectorsearch.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"J\x0A\x0FGetIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x9F\x02\x0A\x18ImportDataObjectsRequest\x12\\\x0A\x0Agcs_import\x18\x02 \x01(\x0B2F.google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfigH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A]\x0A\x0FGcsImportConfig\x12\x19\x0A\x0Ccontents_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09error_uri\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Aoutput_uri\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06config\"\xBF\x01\x0A\x19ImportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1A\x0A\x0Dsuccess_count\x18\x03 \x01(\x03B\x03\xE0A\x03\x12\x1A\x0A\x0Dfailure_count\x18\x04 \x01(\x03B\x03\xE0A\x03\"?\x0A\x19ImportDataObjectsResponse\x12\"\x0A\x06status\x18\x01 \x01(\x0B2\x12.google.rpc.Status\"\x97\x03\x0A\x18ExportDataObjectsRequest\x12f\x0A\x0Fgcs_destination\x18\x02 \x01(\x0B2K.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestinationH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A\xC5\x01\x0A\x14GcsExportDestination\x12\x17\x0A\x0Aexport_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12g\x0A\x06format\x18\x02 \x01(\x0E2R.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.FormatB\x03\xE0A\x02\"+\x0A\x06Format\x12\x16\x0A\x12FORMAT_UNSPECIFIED\x10\x00\x12\x09\x0A\x05JSONL\x10\x02B\x0D\x0A\x0Bdestination\"\x87\x01\x0A\x19ExportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bfinish_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x1B\x0A\x19ExportDataObjectsResponse\"\xFF\x02\x0A\x17DedicatedInfrastructure\x12R\x0A\x04mode\x18\x01 \x01(\x0E2:.google.cloud.vectorsearch.v1.DedicatedInfrastructure.ModeB\x03\xE0A\x01H\x00\x88\x01\x01\x12d\x0A\x10autoscaling_spec\x18\x02 \x01(\x0B2E.google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpecB\x03\xE0A\x01\x1AQ\x0A\x0FAutoscalingSpec\x12\x1E\x0A\x11min_replica_count\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x1E\x0A\x11max_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x01\"N\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11STORAGE_OPTIMIZED\x10\x01\x12\x19\x0A\x15PERFORMANCE_OPTIMIZED\x10\x02B\x07\x0A\x05_mode\"\xC2\x01\x0A\x0FDenseScannIndex\x12]\x0A\x11feature_norm_type\x18\x02 \x01(\x0E2=.google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormTypeB\x03\xE0A\x01\"P\x0A\x0FFeatureNormType\x12!\x0A\x1DFEATURE_NORM_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x10\x0A\x0CUNIT_L2_NORM\x10\x022\xAB\x13\x0A\x13VectorSearchService\x12\xC0\x01\x0A\x0FListCollections\x124.google.cloud.vectorsearch.v1.ListCollectionsRequest\x1A5.google.cloud.vectorsearch.v1.ListCollectionsResponse\"@\xDAA\x06parent\x82\xD3\xE4\x93\x021\x12//v1/{parent=projects/*/locations/*}/collections\x12\xAD\x01\x0A\x0DGetCollection\x122.google.cloud.vectorsearch.v1.GetCollectionRequest\x1A(.google.cloud.vectorsearch.v1.Collection\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/collections/*}\x12\xF2\x01\x0A\x10CreateCollection\x125.google.cloud.vectorsearch.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02=\"//v1/{parent=projects/*/locations/*}/collections:\x0Acollection\x12\xF4\x01\x0A\x10UpdateCollection\x125.google.cloud.vectorsearch.v1.UpdateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02H2:/v1/{collection.name=projects/*/locations/*/collections/*}:\x0Acollection\x12\xD5\x01\x0A\x10DeleteCollection\x125.google.cloud.vectorsearch.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"k\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x021*//v1/{name=projects/*/locations/*/collections/*}\x12\xBE\x01\x0A\x0BListIndexes\x120.google.cloud.vectorsearch.v1.ListIndexesRequest\x1A1.google.cloud.vectorsearch.v1.ListIndexesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/collections/*}/indexes\x12\xA8\x01\x0A\x08GetIndex\x12-.google.cloud.vectorsearch.v1.GetIndexRequest\x1A#.google.cloud.vectorsearch.v1.Index\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xDD\x01\x0A\x0BCreateIndex\x120.google.cloud.vectorsearch.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x15parent,index,index_id\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/collections/*}/indexes:\x05index\x12\xD5\x01\x0A\x0BDeleteIndex\x120.google.cloud.vectorsearch.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xF2\x01\x0A\x11ImportDataObjects\x126.google.cloud.vectorsearch.v1.ImportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ImportDataObjectsResponse\x12\x19ImportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:importDataObjects:\x01*\x12\xF2\x01\x0A\x11ExportDataObjects\x126.google.cloud.vectorsearch.v1.ExportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ExportDataObjectsResponse\x12\x19ExportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE4\x01\x0A com.google.cloud.vectorsearch.v1B\x18VectorSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" + "\x0A\xA5G\x0A7google/cloud/vectorsearch/v1/vectorsearch_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A2google/cloud/vectorsearch/v1/encryption_spec.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFE\x05\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12I\x0A\x06labels\x18\x04 \x03(\x0B24.google.cloud.vectorsearch.v1.Collection.LabelsEntryB\x03\xE0A\x01\x12V\x0A\x0Dvector_schema\x18\x07 \x03(\x0B2:.google.cloud.vectorsearch.v1.Collection.VectorSchemaEntryB\x03\xE0A\x01\x121\x0A\x0Bdata_schema\x18\x0A \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12M\x0A\x0Fencryption_spec\x18\x0B \x01(\x0B2,.google.cloud.vectorsearch.v1.EncryptionSpecB\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A^\x0A\x11VectorSchemaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.VectorField:\x028\x01:\x87\x01\xEAA\x83\x01\x0A&vectorsearch.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}*\x0Bcollections2\x0Acollection\"\xB5\x01\x0A\x0BVectorField\x12F\x0A\x0Cdense_vector\x18\x03 \x01(\x0B2..google.cloud.vectorsearch.v1.DenseVectorFieldH\x00\x12H\x0A\x0Dsparse_vector\x18\x04 \x01(\x0B2/.google.cloud.vectorsearch.v1.SparseVectorFieldH\x00B\x14\x0A\x12vector_type_config\"\x81\x01\x0A\x10DenseVectorField\x12\x12\x0A\x0Adimensions\x18\x01 \x01(\x05\x12Y\x0A\x17vertex_embedding_config\x18\x03 \x01(\x0B23.google.cloud.vectorsearch.v1.VertexEmbeddingConfigB\x03\xE0A\x01\"\x13\x0A\x11SparseVectorField\"\xB5\x01\x0A\x16ListCollectionsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x8B\x01\x0A\x17ListCollectionsResponse\x12=\x0A\x0Bcollections\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"T\x0A\x14GetCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\"\xD9\x01\x0A\x17CreateCollectionRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12A\x0A\x0Acollection\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB3\x01\x0A\x17UpdateCollectionRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12A\x0A\x0Acollection\x18\x02 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"x\x0A\x17DeleteCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA0\x06\x0A\x05Index\x12^\x0A\x18dedicated_infrastructure\x18\x0B \x01(\x0B25.google.cloud.vectorsearch.v1.DedicatedInfrastructureB\x03\xE0A\x01H\x00\x12I\x0A\x0Bdense_scann\x18\x0C \x01(\x0B2-.google.cloud.vectorsearch.v1.DenseScannIndexB\x03\xE0A\x01H\x01\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x0A \x03(\x0B2/.google.cloud.vectorsearch.v1.Index.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fdistance_metric\x18\x04 \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01\x12\x18\x0A\x0Bindex_field\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dfilter_fields\x18\x06 \x03(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cstore_fields\x18\x07 \x03(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x89\x01\xEAA\x85\x01\x0A!vectorsearch.googleapis.com/Index\x12Pprojects/{project}/locations/{location}/collections/{collection}/indexes/{index}*\x07indexes2\x05indexB\x0C\x0A\x0Ainfra_typeB\x0C\x0A\x0Aindex_type\"\xC5\x01\x0A\x12CreateIndexRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x05index\x18\x03 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA4\x01\x0A\x12UpdateIndexRequest\x127\x0A\x05index\x18\x01 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"n\x0A\x12DeleteIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x12ListIndexesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!vectorsearch.googleapis.com/Index\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13ListIndexesResponse\x124\x0A\x07indexes\x18\x01 \x03(\x0B2#.google.cloud.vectorsearch.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"J\x0A\x0FGetIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x9F\x02\x0A\x18ImportDataObjectsRequest\x12\\\x0A\x0Agcs_import\x18\x02 \x01(\x0B2F.google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfigH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A]\x0A\x0FGcsImportConfig\x12\x19\x0A\x0Ccontents_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09error_uri\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Aoutput_uri\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06config\"\xBF\x01\x0A\x19ImportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1A\x0A\x0Dsuccess_count\x18\x03 \x01(\x03B\x03\xE0A\x03\x12\x1A\x0A\x0Dfailure_count\x18\x04 \x01(\x03B\x03\xE0A\x03\"?\x0A\x19ImportDataObjectsResponse\x12\"\x0A\x06status\x18\x01 \x01(\x0B2\x12.google.rpc.Status\"\x97\x03\x0A\x18ExportDataObjectsRequest\x12f\x0A\x0Fgcs_destination\x18\x02 \x01(\x0B2K.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestinationH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A\xC5\x01\x0A\x14GcsExportDestination\x12\x17\x0A\x0Aexport_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12g\x0A\x06format\x18\x02 \x01(\x0E2R.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.FormatB\x03\xE0A\x02\"+\x0A\x06Format\x12\x16\x0A\x12FORMAT_UNSPECIFIED\x10\x00\x12\x09\x0A\x05JSONL\x10\x02B\x0D\x0A\x0Bdestination\"\x87\x01\x0A\x19ExportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bfinish_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x1B\x0A\x19ExportDataObjectsResponse\"\xFF\x02\x0A\x17DedicatedInfrastructure\x12R\x0A\x04mode\x18\x01 \x01(\x0E2:.google.cloud.vectorsearch.v1.DedicatedInfrastructure.ModeB\x03\xE0A\x01H\x00\x88\x01\x01\x12d\x0A\x10autoscaling_spec\x18\x02 \x01(\x0B2E.google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpecB\x03\xE0A\x01\x1AQ\x0A\x0FAutoscalingSpec\x12\x1E\x0A\x11min_replica_count\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x1E\x0A\x11max_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x01\"N\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11STORAGE_OPTIMIZED\x10\x01\x12\x19\x0A\x15PERFORMANCE_OPTIMIZED\x10\x02B\x07\x0A\x05_mode\"\xC2\x01\x0A\x0FDenseScannIndex\x12]\x0A\x11feature_norm_type\x18\x02 \x01(\x0E2=.google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormTypeB\x03\xE0A\x01\"P\x0A\x0FFeatureNormType\x12!\x0A\x1DFEATURE_NORM_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x10\x0A\x0CUNIT_L2_NORM\x10\x022\x8D\x15\x0A\x13VectorSearchService\x12\xC0\x01\x0A\x0FListCollections\x124.google.cloud.vectorsearch.v1.ListCollectionsRequest\x1A5.google.cloud.vectorsearch.v1.ListCollectionsResponse\"@\xDAA\x06parent\x82\xD3\xE4\x93\x021\x12//v1/{parent=projects/*/locations/*}/collections\x12\xAD\x01\x0A\x0DGetCollection\x122.google.cloud.vectorsearch.v1.GetCollectionRequest\x1A(.google.cloud.vectorsearch.v1.Collection\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/collections/*}\x12\xF2\x01\x0A\x10CreateCollection\x125.google.cloud.vectorsearch.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02=\"//v1/{parent=projects/*/locations/*}/collections:\x0Acollection\x12\xF4\x01\x0A\x10UpdateCollection\x125.google.cloud.vectorsearch.v1.UpdateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02H2:/v1/{collection.name=projects/*/locations/*/collections/*}:\x0Acollection\x12\xD5\x01\x0A\x10DeleteCollection\x125.google.cloud.vectorsearch.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"k\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x021*//v1/{name=projects/*/locations/*/collections/*}\x12\xBE\x01\x0A\x0BListIndexes\x120.google.cloud.vectorsearch.v1.ListIndexesRequest\x1A1.google.cloud.vectorsearch.v1.ListIndexesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/collections/*}/indexes\x12\xA8\x01\x0A\x08GetIndex\x12-.google.cloud.vectorsearch.v1.GetIndexRequest\x1A#.google.cloud.vectorsearch.v1.Index\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xDD\x01\x0A\x0BCreateIndex\x120.google.cloud.vectorsearch.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x15parent,index,index_id\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/collections/*}/indexes:\x05index\x12\xDF\x01\x0A\x0BUpdateIndex\x120.google.cloud.vectorsearch.v1.UpdateIndexRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x11index,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}:\x05index\x12\xD5\x01\x0A\x0BDeleteIndex\x120.google.cloud.vectorsearch.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xF2\x01\x0A\x11ImportDataObjects\x126.google.cloud.vectorsearch.v1.ImportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ImportDataObjectsResponse\x12\x19ImportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:importDataObjects:\x01*\x12\xF2\x01\x0A\x11ExportDataObjects\x126.google.cloud.vectorsearch.v1.ExportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ExportDataObjectsResponse\x12\x19ExportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE4\x01\x0A com.google.cloud.vectorsearch.v1B\x18VectorSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/VectorSearch/samples/V1/DataObjectSearchServiceClient/list_locations.php b/VectorSearch/samples/V1/DataObjectSearchServiceClient/list_locations.php index 3cbda8122f71..37706aa0e667 100644 --- a/VectorSearch/samples/V1/DataObjectSearchServiceClient/list_locations.php +++ b/VectorSearch/samples/V1/DataObjectSearchServiceClient/list_locations.php @@ -31,13 +31,22 @@ /** * Lists information about the supported locations for this service. -This method can be called in two ways: -* **List all public locations:** Use the path `GET /v1/locations`. -* **List project-visible locations:** Use the path -`GET /v1/projects/{project_id}/locations`. This may include public -locations as well as private or other locations specifically visible -to the project. +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/VectorSearch/samples/V1/DataObjectServiceClient/list_locations.php b/VectorSearch/samples/V1/DataObjectServiceClient/list_locations.php index df6a8138cd7f..9af82c4d0882 100644 --- a/VectorSearch/samples/V1/DataObjectServiceClient/list_locations.php +++ b/VectorSearch/samples/V1/DataObjectServiceClient/list_locations.php @@ -31,13 +31,22 @@ /** * Lists information about the supported locations for this service. -This method can be called in two ways: -* **List all public locations:** Use the path `GET /v1/locations`. -* **List project-visible locations:** Use the path -`GET /v1/projects/{project_id}/locations`. This may include public -locations as well as private or other locations specifically visible -to the project. +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/VectorSearch/samples/V1/VectorSearchServiceClient/list_locations.php b/VectorSearch/samples/V1/VectorSearchServiceClient/list_locations.php index 03b13fe77816..6a4b493270e4 100644 --- a/VectorSearch/samples/V1/VectorSearchServiceClient/list_locations.php +++ b/VectorSearch/samples/V1/VectorSearchServiceClient/list_locations.php @@ -31,13 +31,22 @@ /** * Lists information about the supported locations for this service. -This method can be called in two ways: -* **List all public locations:** Use the path `GET /v1/locations`. -* **List project-visible locations:** Use the path -`GET /v1/projects/{project_id}/locations`. This may include public -locations as well as private or other locations specifically visible -to the project. +This method lists locations based on the resource scope provided in +the [ListLocationsRequest.name] field: + +* **Global locations**: If `name` is empty, the method lists the +public locations available to all projects. * **Project-specific +locations**: If `name` follows the format +`projects/{project}`, the method lists locations visible to that +specific project. This includes public, private, or other +project-specific locations enabled for the project. + +For gRPC and client library implementations, the resource name is +passed as the `name` field. For direct service calls, the resource +name is +incorporated into the request path based on the specific service +implementation and version. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php b/VectorSearch/samples/V1/VectorSearchServiceClient/update_index.php similarity index 100% rename from owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_index.php rename to VectorSearch/samples/V1/VectorSearchServiceClient/update_index.php diff --git a/VectorSearch/src/V1/Client/DataObjectSearchServiceClient.php b/VectorSearch/src/V1/Client/DataObjectSearchServiceClient.php index c3ce8ab5cb4e..9bfe20796f91 100644 --- a/VectorSearch/src/V1/Client/DataObjectSearchServiceClient.php +++ b/VectorSearch/src/V1/Client/DataObjectSearchServiceClient.php @@ -401,13 +401,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. - This method can be called in two ways: - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see DataObjectSearchServiceClient::listLocationsAsync()} * . diff --git a/VectorSearch/src/V1/Client/DataObjectServiceClient.php b/VectorSearch/src/V1/Client/DataObjectServiceClient.php index a4c54240ca89..c7c7b92003b3 100644 --- a/VectorSearch/src/V1/Client/DataObjectServiceClient.php +++ b/VectorSearch/src/V1/Client/DataObjectServiceClient.php @@ -484,13 +484,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. - This method can be called in two ways: - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see DataObjectServiceClient::listLocationsAsync()} . * diff --git a/VectorSearch/src/V1/Client/VectorSearchServiceClient.php b/VectorSearch/src/V1/Client/VectorSearchServiceClient.php index 524d07ff44bd..56b7b5cdf47a 100644 --- a/VectorSearch/src/V1/Client/VectorSearchServiceClient.php +++ b/VectorSearch/src/V1/Client/VectorSearchServiceClient.php @@ -53,6 +53,7 @@ use Google\Cloud\VectorSearch\V1\ListCollectionsRequest; use Google\Cloud\VectorSearch\V1\ListIndexesRequest; use Google\Cloud\VectorSearch\V1\UpdateCollectionRequest; +use Google\Cloud\VectorSearch\V1\UpdateIndexRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; @@ -84,6 +85,7 @@ * @method PromiseInterface listCollectionsAsync(ListCollectionsRequest $request, array $optionalArgs = []) * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) * @method PromiseInterface updateCollectionAsync(UpdateCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIndexAsync(UpdateIndexRequest $request, array $optionalArgs = []) * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) */ @@ -202,6 +204,27 @@ public static function collectionName(string $project, string $location, string ]); } + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a index * resource. @@ -245,6 +268,7 @@ public static function locationName(string $project, string $location): string * The following name formats are supported: * Template: Pattern * - collection: projects/{project}/locations/{location}/collections/{collection} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} * - index: projects/{project}/locations/{location}/collections/{collection}/indexes/{index} * - location: projects/{project}/locations/{location} * @@ -640,6 +664,32 @@ public function updateCollection(UpdateCollectionRequest $request, array $callOp return $this->startApiCall('UpdateCollection', $request, $callOptions)->wait(); } + /** + * Updates the parameters of a single Index. + * + * The async variant is {@see VectorSearchServiceClient::updateIndexAsync()} . + * + * @example samples/V1/VectorSearchServiceClient/update_index.php + * + * @param UpdateIndexRequest $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 updateIndex(UpdateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIndex', $request, $callOptions)->wait(); + } + /** * Gets information about a location. * @@ -668,13 +718,22 @@ public function getLocation(GetLocationRequest $request, array $callOptions = [] /** * Lists information about the supported locations for this service. - This method can be called in two ways: - * **List all public locations:** Use the path `GET /v1/locations`. - * **List project-visible locations:** Use the path - `GET /v1/projects/{project_id}/locations`. This may include public - locations as well as private or other locations specifically visible - to the project. + This method lists locations based on the resource scope provided in + the [ListLocationsRequest.name] field: + + * **Global locations**: If `name` is empty, the method lists the + public locations available to all projects. * **Project-specific + locations**: If `name` follows the format + `projects/{project}`, the method lists locations visible to that + specific project. This includes public, private, or other + project-specific locations enabled for the project. + + For gRPC and client library implementations, the resource name is + passed as the `name` field. For direct service calls, the resource + name is + incorporated into the request path based on the specific service + implementation and version. * * The async variant is {@see VectorSearchServiceClient::listLocationsAsync()} . * diff --git a/VectorSearch/src/V1/Collection.php b/VectorSearch/src/V1/Collection.php index 326b681fa417..da1eeca2f43f 100644 --- a/VectorSearch/src/V1/Collection.php +++ b/VectorSearch/src/V1/Collection.php @@ -63,10 +63,20 @@ class Collection extends \Google\Protobuf\Internal\Message * Optional. JSON Schema for data. * Field names must contain only alphanumeric characters, * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). * * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; */ protected $data_schema = null; + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_spec = null; /** * Constructor. @@ -94,6 +104,12 @@ class Collection extends \Google\Protobuf\Internal\Message * Optional. JSON Schema for data. * Field names must contain only alphanumeric characters, * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). + * @type \Google\Cloud\VectorSearch\V1\EncryptionSpec $encryption_spec + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. * } */ public function __construct($data = NULL) { @@ -311,6 +327,8 @@ public function setVectorSchema($var) * Optional. JSON Schema for data. * Field names must contain only alphanumeric characters, * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). * * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Struct|null @@ -334,6 +352,8 @@ public function clearDataSchema() * Optional. JSON Schema for data. * Field names must contain only alphanumeric characters, * underscores, and hyphens. + * The schema must be compliant with + * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). * * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\Struct $var @@ -347,5 +367,45 @@ public function setDataSchema($var) return $this; } + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VectorSearch\V1\EncryptionSpec|null + */ + public function getEncryptionSpec() + { + return $this->encryption_spec; + } + + public function hasEncryptionSpec() + { + return isset($this->encryption_spec); + } + + public function clearEncryptionSpec() + { + unset($this->encryption_spec); + } + + /** + * Optional. Immutable. Specifies the customer-managed encryption key spec for + * a Collection. If set, this Collection and all sub-resources of this + * Collection will be secured by this key. + * + * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VectorSearch\V1\EncryptionSpec $var + * @return $this + */ + public function setEncryptionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\EncryptionSpec::class); + $this->encryption_spec = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php b/VectorSearch/src/V1/EncryptionSpec.php similarity index 100% rename from owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EncryptionSpec.php rename to VectorSearch/src/V1/EncryptionSpec.php diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php b/VectorSearch/src/V1/UpdateIndexRequest.php similarity index 100% rename from owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateIndexRequest.php rename to VectorSearch/src/V1/UpdateIndexRequest.php diff --git a/VectorSearch/src/V1/gapic_metadata.json b/VectorSearch/src/V1/gapic_metadata.json index 1e63d85d5ae1..4e80203638a5 100644 --- a/VectorSearch/src/V1/gapic_metadata.json +++ b/VectorSearch/src/V1/gapic_metadata.json @@ -158,6 +158,11 @@ "updateCollection" ] }, + "UpdateIndex": { + "methods": [ + "updateIndex" + ] + }, "GetLocation": { "methods": [ "getLocation" diff --git a/VectorSearch/src/V1/resources/vector_search_service_client_config.json b/VectorSearch/src/V1/resources/vector_search_service_client_config.json index b12401d4259e..e055528d9e03 100644 --- a/VectorSearch/src/V1/resources/vector_search_service_client_config.json +++ b/VectorSearch/src/V1/resources/vector_search_service_client_config.json @@ -95,6 +95,11 @@ "retry_codes_name": "retry_policy_3_codes", "retry_params_name": "retry_policy_3_params" }, + "UpdateIndex": { + "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/VectorSearch/src/V1/resources/vector_search_service_descriptor_config.php b/VectorSearch/src/V1/resources/vector_search_service_descriptor_config.php index 84102a30af02..5e588fcd5a52 100644 --- a/VectorSearch/src/V1/resources/vector_search_service_descriptor_config.php +++ b/VectorSearch/src/V1/resources/vector_search_service_descriptor_config.php @@ -157,6 +157,26 @@ ], ], ], + 'UpdateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Index', + 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index.name', + 'fieldAccessors' => [ + 'getIndex', + 'getName', + ], + ], + ], + ], 'GetCollection' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\VectorSearch\V1\Collection', @@ -257,6 +277,7 @@ ], 'templateMap' => [ 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', 'index' => 'projects/{project}/locations/{location}/collections/{collection}/indexes/{index}', 'location' => 'projects/{project}/locations/{location}', ], diff --git a/VectorSearch/src/V1/resources/vector_search_service_rest_client_config.php b/VectorSearch/src/V1/resources/vector_search_service_rest_client_config.php index 83b6c4befda9..e6f18f8e46f2 100644 --- a/VectorSearch/src/V1/resources/vector_search_service_rest_client_config.php +++ b/VectorSearch/src/V1/resources/vector_search_service_rest_client_config.php @@ -180,6 +180,19 @@ ], ], ], + 'UpdateIndex' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}', + 'body' => 'index', + 'placeholders' => [ + 'index.name' => [ + 'getters' => [ + 'getIndex', + 'getName', + ], + ], + ], + ], ], 'google.longrunning.Operations' => [ 'CancelOperation' => [ diff --git a/VectorSearch/tests/Unit/V1/Client/VectorSearchServiceClientTest.php b/VectorSearch/tests/Unit/V1/Client/VectorSearchServiceClientTest.php index 485c7021b73d..aa47e7d6cbbe 100644 --- a/VectorSearch/tests/Unit/V1/Client/VectorSearchServiceClientTest.php +++ b/VectorSearch/tests/Unit/V1/Client/VectorSearchServiceClientTest.php @@ -48,6 +48,7 @@ use Google\Cloud\VectorSearch\V1\ListIndexesRequest; use Google\Cloud\VectorSearch\V1\ListIndexesResponse; use Google\Cloud\VectorSearch\V1\UpdateCollectionRequest; +use Google\Cloud\VectorSearch\V1\UpdateIndexRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; @@ -1274,6 +1275,140 @@ public function updateCollectionExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function updateIndexTest() + { + $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/updateIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $indexField = 'indexField1673840461'; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIndexField($indexField); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new UpdateIndexRequest())->setIndex($index); + $response = $gapicClient->updateIndex($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.vectorsearch.v1.VectorSearchService/UpdateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + $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 updateIndexExceptionTest() + { + $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/updateIndexTest'); + $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 + $index = new Index(); + $indexIndexField = 'indexIndexField-1984372294'; + $index->setIndexField($indexIndexField); + $request = (new UpdateIndexRequest())->setIndex($index); + $response = $gapicClient->updateIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + 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/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php deleted file mode 100644 index cd467ddbc772..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/Common.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x84\x03\x0A)google/cloud/vectorsearch/v1/common.proto\x12\x1Cgoogle.cloud.vectorsearch.v1*W\x0A\x0EDistanceMetric\x12\x1F\x0A\x1BDISTANCE_METRIC_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x01\x12\x13\x0A\x0FCOSINE_DISTANCE\x10\x02B\xD7\x01\x0A com.google.cloud.vectorsearch.v1B\x0BCommonProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php deleted file mode 100644 index a0be445d7b98..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObject.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB1\x09\x0A.google/cloud/vectorsearch/v1/data_object.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x19google/api/resource.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAD\x04\x0A\x0ADataObject\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1B\x0A\x0Edata_object_id\x18\x02 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12*\x0A\x04data\x18\x06 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12K\x0A\x07vectors\x18\x07 \x03(\x0B25.google.cloud.vectorsearch.v1.DataObject.VectorsEntryB\x03\xE0A\x01\x12\x11\x0A\x04etag\x18\x08 \x01(\x09B\x03\xE0A\x01\x1AT\x0A\x0CVectorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x123\x0A\x05value\x18\x02 \x01(\x0B2\$.google.cloud.vectorsearch.v1.Vector:\x028\x01:\xA0\x01\xEAA\x9C\x01\x0A&vectorsearch.googleapis.com/DataObject\x12Yprojects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}*\x0BdataObjects2\x0AdataObject\"\x91\x01\x0A\x06Vector\x12:\x0A\x05dense\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.DenseVectorH\x00\x12<\x0A\x06sparse\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.SparseVectorH\x00B\x0D\x0A\x0Bvector_type\"\"\x0A\x0BDenseVector\x12\x13\x0A\x06values\x18\x01 \x03(\x02B\x03\xE0A\x02\"9\x0A\x0CSparseVector\x12\x13\x0A\x06values\x18\x01 \x03(\x02B\x03\xE0A\x02\x12\x14\x0A\x07indices\x18\x02 \x03(\x05B\x03\xE0A\x02B\xDB\x01\x0A com.google.cloud.vectorsearch.v1B\x0FDataObjectProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php deleted file mode 100644 index 34f80ed9d5b4..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectSearchService.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD6)\x0A=google/cloud/vectorsearch/v1/data_object_search_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A.google/cloud/vectorsearch/v1/data_object.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A\x1Cgoogle/protobuf/struct.proto\"b\x0A\x0COutputFields\x12\x18\x0A\x0Bdata_fields\x18\x01 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dvector_fields\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1C\x0A\x0Fmetadata_fields\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x85\x02\x0A\x0ASearchHint\x12I\x0A\x08knn_hint\x18\x03 \x01(\x0B20.google.cloud.vectorsearch.v1.SearchHint.KnnHintB\x03\xE0A\x01H\x00\x12M\x0A\x0Aindex_hint\x18\x04 \x01(\x0B22.google.cloud.vectorsearch.v1.SearchHint.IndexHintB\x03\xE0A\x01H\x00\x1AD\x0A\x09IndexHint\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x1A\x09\x0A\x07KnnHintB\x0C\x0A\x0Aindex_type\"\xE6\x01\x0A\x06Search\x12C\x0A\x0Dvector_search\x18\x01 \x01(\x0B2*.google.cloud.vectorsearch.v1.VectorSearchH\x00\x12G\x0A\x0Fsemantic_search\x18\x02 \x01(\x0B2,.google.cloud.vectorsearch.v1.SemanticSearchH\x00\x12?\x0A\x0Btext_search\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.TextSearchH\x00B\x0D\x0A\x0Bsearch_type\"\xE3\x03\x0A\x0CVectorSearch\x12;\x0A\x06vector\x18\x01 \x01(\x0B2).google.cloud.vectorsearch.v1.DenseVectorH\x00\x12C\x0A\x0Dsparse_vector\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.SparseVectorH\x00\x12\x19\x0A\x0Csearch_field\x18\x08 \x01(\x09B\x03\xE0A\x02\x12,\x0A\x06filter\x18\x04 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x05 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12F\x0A\x0Doutput_fields\x18\x07 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12B\x0A\x0Bsearch_hint\x18\x09 \x01(\x0B2(.google.cloud.vectorsearch.v1.SearchHintB\x03\xE0A\x01\x12J\x0A\x0Fdistance_metric\x18\x0B \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01B\x0D\x0A\x0Bvector_typeB\x08\x0A\x06_top_k\"\xEB\x02\x0A\x0ESemanticSearch\x12\x18\x0A\x0Bsearch_text\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Csearch_field\x18\x02 \x01(\x09B\x03\xE0A\x02\x12G\x0A\x09task_type\x18\x05 \x01(\x0E2/.google.cloud.vectorsearch.v1.EmbeddingTaskTypeB\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12,\x0A\x06filter\x18\x06 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x04 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12B\x0A\x0Bsearch_hint\x18\x07 \x01(\x0B2(.google.cloud.vectorsearch.v1.SearchHintB\x03\xE0A\x01B\x08\x0A\x06_top_k\"\xDE\x01\x0A\x0ATextSearch\x12\x18\x0A\x0Bsearch_text\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1D\x0A\x10data_field_names\x18\x02 \x03(\x09B\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x03 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x17\x0A\x05top_k\x18\x04 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12,\x0A\x06filter\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01B\x08\x0A\x06_top_k\"\xEE\x02\x0A\x18SearchDataObjectsRequest\x12C\x0A\x0Dvector_search\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.VectorSearchH\x00\x12G\x0A\x0Fsemantic_search\x18\x04 \x01(\x0B2,.google.cloud.vectorsearch.v1.SemanticSearchH\x00\x12D\x0A\x0Btext_search\x18\x07 \x01(\x0B2(.google.cloud.vectorsearch.v1.TextSearchB\x03\xE0A\x01H\x00\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x05 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x06 \x01(\x09B\x03\xE0A\x01B\x0D\x0A\x0Bsearch_type\"{\x0A\x0CSearchResult\x12B\x0A\x0Bdata_object\x18\x01 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\x12\x1A\x0A\x08distance\x18\x02 \x01(\x01B\x03\xE0A\x03H\x00\x88\x01\x01B\x0B\x0A\x09_distance\"{\x0A\x19SearchDataObjectsResponse\x12@\x0A\x07results\x18\x01 \x03(\x0B2*.google.cloud.vectorsearch.v1.SearchResultB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x02 \x01(\x09B\x03\xE0A\x03\"\xD4\x01\x0A\x1BAggregateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12,\x0A\x06filter\x18\x02 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12G\x0A\x09aggregate\x18\x03 \x01(\x0E2/.google.cloud.vectorsearch.v1.AggregationMethodB\x03\xE0A\x02\"W\x0A\x1CAggregateDataObjectsResponse\x127\x0A\x11aggregate_results\x18\x01 \x03(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x03\"\x80\x02\x0A\x17QueryDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12,\x0A\x06filter\x18\x02 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12F\x0A\x0Doutput_fields\x18\x07 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x05 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x06 \x01(\x09B\x03\xE0A\x01\"}\x0A\x18QueryDataObjectsResponse\x12C\x0A\x0Cdata_objects\x18\x04 \x03(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\x12\x1C\x0A\x0Fnext_page_token\x18\x03 \x01(\x09B\x03\xE0A\x03\"\xB6\x03\x0A\x1DBatchSearchDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12;\x0A\x08searches\x18\x02 \x03(\x0B2\$.google.cloud.vectorsearch.v1.SearchB\x03\xE0A\x02\x12g\x0A\x07combine\x18\x03 \x01(\x0B2Q.google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptionsB\x03\xE0A\x01\x1A\xAE\x01\x0A\x15CombineResultsOptions\x129\x0A\x06ranker\x18\x01 \x01(\x0B2\$.google.cloud.vectorsearch.v1.RankerB\x03\xE0A\x02\x12F\x0A\x0Doutput_fields\x18\x02 \x01(\x0B2*.google.cloud.vectorsearch.v1.OutputFieldsB\x03\xE0A\x01\x12\x12\x0A\x05top_k\x18\x03 \x01(\x05B\x03\xE0A\x01\"U\x0A\x06Ranker\x12A\x0A\x03rrf\x18\x01 \x01(\x0B22.google.cloud.vectorsearch.v1.ReciprocalRankFusionH\x00B\x08\x0A\x06ranker\",\x0A\x14ReciprocalRankFusion\x12\x14\x0A\x07weights\x18\x01 \x03(\x01B\x03\xE0A\x02\"o\x0A\x1EBatchSearchDataObjectsResponse\x12M\x0A\x07results\x18\x01 \x03(\x0B27.google.cloud.vectorsearch.v1.SearchDataObjectsResponseB\x03\xE0A\x03*B\x0A\x11AggregationMethod\x12\"\x0A\x1EAGGREGATION_METHOD_UNSPECIFIED\x10\x00\x12\x09\x0A\x05COUNT\x10\x012\xE6\x07\x0A\x17DataObjectSearchService\x12\xD5\x01\x0A\x11SearchDataObjects\x126.google.cloud.vectorsearch.v1.SearchDataObjectsRequest\x1A7.google.cloud.vectorsearch.v1.SearchDataObjectsResponse\"O\x82\xD3\xE4\x93\x02I\"D/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:search:\x01*\x12\xD1\x01\x0A\x10QueryDataObjects\x125.google.cloud.vectorsearch.v1.QueryDataObjectsRequest\x1A6.google.cloud.vectorsearch.v1.QueryDataObjectsResponse\"N\x82\xD3\xE4\x93\x02H\"C/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:query:\x01*\x12\xE1\x01\x0A\x14AggregateDataObjects\x129.google.cloud.vectorsearch.v1.AggregateDataObjectsRequest\x1A:.google.cloud.vectorsearch.v1.AggregateDataObjectsResponse\"R\x82\xD3\xE4\x93\x02L\"G/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:aggregate:\x01*\x12\xE9\x01\x0A\x16BatchSearchDataObjects\x12;.google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchSearchDataObjectsResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchSearch:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE8\x01\x0A com.google.cloud.vectorsearch.v1B\x1CDataObjectSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php deleted file mode 100644 index b3cfadbf1eaa..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/DataObjectService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAC\x1A\x0A6google/cloud/vectorsearch/v1/data_object_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A.google/cloud/vectorsearch/v1/data_object.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xBA\x01\x0A\x17CreateDataObjectRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1B\x0A\x0Edata_object_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Bdata_object\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x02\"\xAD\x01\x0A\x1DBatchCreateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.cloud.vectorsearch.v1.CreateDataObjectRequestB\x03\xE0A\x02\"e\x0A\x1EBatchCreateDataObjectsResponse\x12C\x0A\x0Cdata_objects\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x03\"T\x0A\x14GetDataObjectRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/DataObject\"\x93\x01\x0A\x17UpdateDataObjectRequest\x12B\x0A\x0Bdata_object\x18\x01 \x01(\x0B2(.google.cloud.vectorsearch.v1.DataObjectB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xAD\x01\x0A\x1DBatchUpdateDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.cloud.vectorsearch.v1.UpdateDataObjectRequestB\x03\xE0A\x02\" \x0A\x1EBatchUpdateDataObjectsResponse\"j\x0A\x17DeleteDataObjectRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/DataObject\x12\x11\x0A\x04etag\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xAD\x01\x0A\x1DBatchDeleteDataObjectsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12L\x0A\x08requests\x18\x03 \x03(\x0B25.google.cloud.vectorsearch.v1.DeleteDataObjectRequestB\x03\xE0A\x022\xF4\x0C\x0A\x11DataObjectService\x12\xEB\x01\x0A\x10CreateDataObject\x125.google.cloud.vectorsearch.v1.CreateDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"v\xDAA!parent,data_object,data_object_id\x82\xD3\xE4\x93\x02L\"=/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:\x0Bdata_object\x12\xE9\x01\x0A\x16BatchCreateDataObjects\x12;.google.cloud.vectorsearch.v1.BatchCreateDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchCreateDataObjectsResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate:\x01*\x12\xBB\x01\x0A\x0DGetDataObject\x122.google.cloud.vectorsearch.v1.GetDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}\x12\xED\x01\x0A\x10UpdateDataObject\x125.google.cloud.vectorsearch.v1.UpdateDataObjectRequest\x1A(.google.cloud.vectorsearch.v1.DataObject\"x\xDAA\x17data_object,update_mask\x82\xD3\xE4\x93\x02X2I/v1/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}:\x0Bdata_object\x12\xFB\x01\x0A\x16BatchUpdateDataObjects\x12;.google.cloud.vectorsearch.v1.BatchUpdateDataObjectsRequest\x1A<.google.cloud.vectorsearch.v1.BatchUpdateDataObjectsResponse\"f\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate:\x01*\x12\xAF\x01\x0A\x10DeleteDataObject\x125.google.cloud.vectorsearch.v1.DeleteDataObjectRequest\x1A\x16.google.protobuf.Empty\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}\x12\xD5\x01\x0A\x16BatchDeleteDataObjects\x12;.google.cloud.vectorsearch.v1.BatchDeleteDataObjectsRequest\x1A\x16.google.protobuf.Empty\"f\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02N\"I/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE2\x01\x0A com.google.cloud.vectorsearch.v1B\x16DataObjectServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php deleted file mode 100644 index ac217693e49c..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/EmbeddingConfig.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC2\x05\x0A3google/cloud/vectorsearch/v1/embedding_config.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\"\x93\x01\x0A\x15VertexEmbeddingConfig\x12\x15\x0A\x08model_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dtext_template\x18\x02 \x01(\x09B\x03\xE0A\x02\x12G\x0A\x09task_type\x18\x03 \x01(\x0E2/.google.cloud.vectorsearch.v1.EmbeddingTaskTypeB\x03\xE0A\x02*\xEB\x01\x0A\x11EmbeddingTaskType\x12#\x0A\x1FEMBEDDING_TASK_TYPE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRETRIEVAL_QUERY\x10\x01\x12\x16\x0A\x12RETRIEVAL_DOCUMENT\x10\x02\x12\x17\x0A\x13SEMANTIC_SIMILARITY\x10\x03\x12\x12\x0A\x0ECLASSIFICATION\x10\x04\x12\x0E\x0A\x0ACLUSTERING\x10\x05\x12\x16\x0A\x12QUESTION_ANSWERING\x10\x06\x12\x15\x0A\x11FACT_VERIFICATION\x10\x07\x12\x18\x0A\x14CODE_RETRIEVAL_QUERY\x10\x08B\xE0\x01\x0A com.google.cloud.vectorsearch.v1B\x14EmbeddingConfigProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php b/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php deleted file mode 100644 index 163e08d1aa1e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/GPBMetadata/Google/Cloud/Vectorsearch/V1/VectorsearchService.php +++ /dev/null @@ -1,38 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA5G\x0A7google/cloud/vectorsearch/v1/vectorsearch_service.proto\x12\x1Cgoogle.cloud.vectorsearch.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/vectorsearch/v1/common.proto\x1A3google/cloud/vectorsearch/v1/embedding_config.proto\x1A2google/cloud/vectorsearch/v1/encryption_spec.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\"\xFE\x05\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12I\x0A\x06labels\x18\x04 \x03(\x0B24.google.cloud.vectorsearch.v1.Collection.LabelsEntryB\x03\xE0A\x01\x12V\x0A\x0Dvector_schema\x18\x07 \x03(\x0B2:.google.cloud.vectorsearch.v1.Collection.VectorSchemaEntryB\x03\xE0A\x01\x121\x0A\x0Bdata_schema\x18\x0A \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x01\x12M\x0A\x0Fencryption_spec\x18\x0B \x01(\x0B2,.google.cloud.vectorsearch.v1.EncryptionSpecB\x06\xE0A\x05\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A^\x0A\x11VectorSchemaEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.vectorsearch.v1.VectorField:\x028\x01:\x87\x01\xEAA\x83\x01\x0A&vectorsearch.googleapis.com/Collection\x12@projects/{project}/locations/{location}/collections/{collection}*\x0Bcollections2\x0Acollection\"\xB5\x01\x0A\x0BVectorField\x12F\x0A\x0Cdense_vector\x18\x03 \x01(\x0B2..google.cloud.vectorsearch.v1.DenseVectorFieldH\x00\x12H\x0A\x0Dsparse_vector\x18\x04 \x01(\x0B2/.google.cloud.vectorsearch.v1.SparseVectorFieldH\x00B\x14\x0A\x12vector_type_config\"\x81\x01\x0A\x10DenseVectorField\x12\x12\x0A\x0Adimensions\x18\x01 \x01(\x05\x12Y\x0A\x17vertex_embedding_config\x18\x03 \x01(\x0B23.google.cloud.vectorsearch.v1.VertexEmbeddingConfigB\x03\xE0A\x01\"\x13\x0A\x11SparseVectorField\"\xB5\x01\x0A\x16ListCollectionsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x8B\x01\x0A\x17ListCollectionsResponse\x12=\x0A\x0Bcollections\x18\x01 \x03(\x0B2(.google.cloud.vectorsearch.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"T\x0A\x14GetCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\"\xD9\x01\x0A\x17CreateCollectionRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&vectorsearch.googleapis.com/Collection\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12A\x0A\x0Acollection\x18\x03 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xB3\x01\x0A\x17UpdateCollectionRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12A\x0A\x0Acollection\x18\x02 \x01(\x0B2(.google.cloud.vectorsearch.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"x\x0A\x17DeleteCollectionRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA0\x06\x0A\x05Index\x12^\x0A\x18dedicated_infrastructure\x18\x0B \x01(\x0B25.google.cloud.vectorsearch.v1.DedicatedInfrastructureB\x03\xE0A\x01H\x00\x12I\x0A\x0Bdense_scann\x18\x0C \x01(\x0B2-.google.cloud.vectorsearch.v1.DenseScannIndexB\x03\xE0A\x01H\x01\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x19\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x09 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x0A \x03(\x0B2/.google.cloud.vectorsearch.v1.Index.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x0Fdistance_metric\x18\x04 \x01(\x0E2,.google.cloud.vectorsearch.v1.DistanceMetricB\x03\xE0A\x01\x12\x18\x0A\x0Bindex_field\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dfilter_fields\x18\x06 \x03(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cstore_fields\x18\x07 \x03(\x09B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\x89\x01\xEAA\x85\x01\x0A!vectorsearch.googleapis.com/Index\x12Pprojects/{project}/locations/{location}/collections/{collection}/indexes/{index}*\x07indexes2\x05indexB\x0C\x0A\x0Ainfra_typeB\x0C\x0A\x0Aindex_type\"\xC5\x01\x0A\x12CreateIndexRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x05index\x18\x03 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xA4\x01\x0A\x12UpdateIndexRequest\x127\x0A\x05index\x18\x01 \x01(\x0B2#.google.cloud.vectorsearch.v1.IndexB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"n\x0A\x12DeleteIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x12ListIndexesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!vectorsearch.googleapis.com/Index\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13ListIndexesResponse\x124\x0A\x07indexes\x18\x01 \x03(\x0B2#.google.cloud.vectorsearch.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"J\x0A\x0FGetIndexRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!vectorsearch.googleapis.com/Index\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x9F\x02\x0A\x18ImportDataObjectsRequest\x12\\\x0A\x0Agcs_import\x18\x02 \x01(\x0B2F.google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfigH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A]\x0A\x0FGcsImportConfig\x12\x19\x0A\x0Ccontents_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09error_uri\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Aoutput_uri\x18\x03 \x01(\x09B\x03\xE0A\x01B\x08\x0A\x06config\"\xBF\x01\x0A\x19ImportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1A\x0A\x0Dsuccess_count\x18\x03 \x01(\x03B\x03\xE0A\x03\x12\x1A\x0A\x0Dfailure_count\x18\x04 \x01(\x03B\x03\xE0A\x03\"?\x0A\x19ImportDataObjectsResponse\x12\"\x0A\x06status\x18\x01 \x01(\x0B2\x12.google.rpc.Status\"\x97\x03\x0A\x18ExportDataObjectsRequest\x12f\x0A\x0Fgcs_destination\x18\x02 \x01(\x0B2K.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestinationH\x00\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&vectorsearch.googleapis.com/Collection\x1A\xC5\x01\x0A\x14GcsExportDestination\x12\x17\x0A\x0Aexport_uri\x18\x01 \x01(\x09B\x03\xE0A\x02\x12g\x0A\x06format\x18\x02 \x01(\x0E2R.google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.FormatB\x03\xE0A\x02\"+\x0A\x06Format\x12\x16\x0A\x12FORMAT_UNSPECIFIED\x10\x00\x12\x09\x0A\x05JSONL\x10\x02B\x0D\x0A\x0Bdestination\"\x87\x01\x0A\x19ExportDataObjectsMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bfinish_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x1B\x0A\x19ExportDataObjectsResponse\"\xFF\x02\x0A\x17DedicatedInfrastructure\x12R\x0A\x04mode\x18\x01 \x01(\x0E2:.google.cloud.vectorsearch.v1.DedicatedInfrastructure.ModeB\x03\xE0A\x01H\x00\x88\x01\x01\x12d\x0A\x10autoscaling_spec\x18\x02 \x01(\x0B2E.google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpecB\x03\xE0A\x01\x1AQ\x0A\x0FAutoscalingSpec\x12\x1E\x0A\x11min_replica_count\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x1E\x0A\x11max_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x01\"N\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11STORAGE_OPTIMIZED\x10\x01\x12\x19\x0A\x15PERFORMANCE_OPTIMIZED\x10\x02B\x07\x0A\x05_mode\"\xC2\x01\x0A\x0FDenseScannIndex\x12]\x0A\x11feature_norm_type\x18\x02 \x01(\x0E2=.google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormTypeB\x03\xE0A\x01\"P\x0A\x0FFeatureNormType\x12!\x0A\x1DFEATURE_NORM_TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x10\x0A\x0CUNIT_L2_NORM\x10\x022\x8D\x15\x0A\x13VectorSearchService\x12\xC0\x01\x0A\x0FListCollections\x124.google.cloud.vectorsearch.v1.ListCollectionsRequest\x1A5.google.cloud.vectorsearch.v1.ListCollectionsResponse\"@\xDAA\x06parent\x82\xD3\xE4\x93\x021\x12//v1/{parent=projects/*/locations/*}/collections\x12\xAD\x01\x0A\x0DGetCollection\x122.google.cloud.vectorsearch.v1.GetCollectionRequest\x1A(.google.cloud.vectorsearch.v1.Collection\">\xDAA\x04name\x82\xD3\xE4\x93\x021\x12//v1/{name=projects/*/locations/*/collections/*}\x12\xF2\x01\x0A\x10CreateCollection\x125.google.cloud.vectorsearch.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02=\"//v1/{parent=projects/*/locations/*}/collections:\x0Acollection\x12\xF4\x01\x0A\x10UpdateCollection\x125.google.cloud.vectorsearch.v1.UpdateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1F\x0A\x0ACollection\x12\x11OperationMetadata\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02H2:/v1/{collection.name=projects/*/locations/*/collections/*}:\x0Acollection\x12\xD5\x01\x0A\x10DeleteCollection\x125.google.cloud.vectorsearch.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"k\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x021*//v1/{name=projects/*/locations/*/collections/*}\x12\xBE\x01\x0A\x0BListIndexes\x120.google.cloud.vectorsearch.v1.ListIndexesRequest\x1A1.google.cloud.vectorsearch.v1.ListIndexesResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/collections/*}/indexes\x12\xA8\x01\x0A\x08GetIndex\x12-.google.cloud.vectorsearch.v1.GetIndexRequest\x1A#.google.cloud.vectorsearch.v1.Index\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xDD\x01\x0A\x0BCreateIndex\x120.google.cloud.vectorsearch.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x15parent,index,index_id\x82\xD3\xE4\x93\x02B\"9/v1/{parent=projects/*/locations/*/collections/*}/indexes:\x05index\x12\xDF\x01\x0A\x0BUpdateIndex\x120.google.cloud.vectorsearch.v1.UpdateIndexRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1A\x0A\x05Index\x12\x11OperationMetadata\xDAA\x11index,update_mask\x82\xD3\xE4\x93\x02H2?/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}:\x05index\x12\xD5\x01\x0A\x0BDeleteIndex\x120.google.cloud.vectorsearch.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/collections/*/indexes/*}\x12\xF2\x01\x0A\x11ImportDataObjects\x126.google.cloud.vectorsearch.v1.ImportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ImportDataObjectsResponse\x12\x19ImportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:importDataObjects:\x01*\x12\xF2\x01\x0A\x11ExportDataObjects\x126.google.cloud.vectorsearch.v1.ExportDataObjectsRequest\x1A\x1D.google.longrunning.Operation\"\x85\x01\xCAA6\x0A\x19ExportDataObjectsResponse\x12\x19ExportDataObjectsMetadata\x82\xD3\xE4\x93\x02F\"A/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects:\x01*\x1AO\xCAA\x1Bvectorsearch.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xE4\x01\x0A com.google.cloud.vectorsearch.v1B\x18VectorSearchServiceProtoP\x01ZDcloud.google.com/go/vectorsearch/apiv1/vectorsearchpb;vectorsearchpb\xAA\x02\x1CGoogle.Cloud.VectorSearch.V1\xCA\x02\x1CGoogle\\Cloud\\VectorSearch\\V1\xEA\x02\x1FGoogle::Cloud::VectorSearch::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php deleted file mode 100644 index d5b23e5eed71..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.vectorsearch.v1.AggregateDataObjectsRequest - */ -class AggregateDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Required. The aggregation method to apply to the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $aggregate = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * @type \Google\Protobuf\Struct $filter - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * @type int $aggregate - * Required. The aggregation method to apply to the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->filter = $var; - - return $this; - } - - /** - * Required. The aggregation method to apply to the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAggregate() - { - return $this->aggregate; - } - - /** - * Required. The aggregation method to apply to the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.AggregationMethod aggregate = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAggregate($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\AggregationMethod::class); - $this->aggregate = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php deleted file mode 100644 index 8ea65dd63840..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregateDataObjectsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.vectorsearch.v1.AggregateDataObjectsResponse - */ -class AggregateDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The aggregated results of the query. - * - * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $aggregate_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct[] $aggregate_results - * Output only. The aggregated results of the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The aggregated results of the query. - * - * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Protobuf\Struct> - */ - public function getAggregateResults() - { - return $this->aggregate_results; - } - - /** - * Output only. The aggregated results of the query. - * - * Generated from protobuf field repeated .google.protobuf.Struct aggregate_results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Struct[] $var - * @return $this - */ - public function setAggregateResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); - $this->aggregate_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php deleted file mode 100644 index fed256de20ce..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/AggregationMethod.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.vectorsearch.v1.AggregationMethod - */ -class AggregationMethod -{ - /** - * Should not be used. - * - * Generated from protobuf enum AGGREGATION_METHOD_UNSPECIFIED = 0; - */ - const AGGREGATION_METHOD_UNSPECIFIED = 0; - /** - * Count the number of data objects that match the filter. - * - * Generated from protobuf enum COUNT = 1; - */ - const COUNT = 1; - - private static $valueToName = [ - self::AGGREGATION_METHOD_UNSPECIFIED => 'AGGREGATION_METHOD_UNSPECIFIED', - self::COUNT => 'COUNT', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php deleted file mode 100644 index 7312e88d14d3..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.vectorsearch.v1.BatchCreateDataObjectsRequest - */ -class BatchCreateDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection to create the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the CreateDataObjectRequest messages must match this - * field. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The request message specifying the resources to create. - * A maximum of 1000 DataObjects can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection to create the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the CreateDataObjectRequest messages must match this - * field. - * @type \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest[] $requests - * Required. The request message specifying the resources to create. - * A maximum of 1000 DataObjects can be created in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection to create the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the CreateDataObjectRequest messages must match this - * field. - * - * 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 Collection to create the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the CreateDataObjectRequest messages must match this - * field. - * - * 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 request message specifying the resources to create. - * A maximum of 1000 DataObjects can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\CreateDataObjectRequest> - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The request message specifying the resources to create. - * A maximum of 1000 DataObjects can be created in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.CreateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest[] $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php deleted file mode 100644 index 724830369569..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchCreateDataObjectsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.vectorsearch.v1.BatchCreateDataObjectsResponse - */ -class BatchCreateDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. DataObjects created. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $data_objects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DataObject[] $data_objects - * Output only. DataObjects created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. DataObjects created. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DataObject> - */ - public function getDataObjects() - { - return $this->data_objects; - } - - /** - * Output only. DataObjects created. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VectorSearch\V1\DataObject[] $var - * @return $this - */ - public function setDataObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DataObject::class); - $this->data_objects = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php deleted file mode 100644 index 0288323d7c76..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchDeleteDataObjectsRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.vectorsearch.v1.BatchDeleteDataObjectsRequest - */ -class BatchDeleteDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection to delete the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The request message specifying the resources to delete. - * A maximum of 1000 DataObjects can be deleted in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * @param string $parent Required. The resource name of the Collection to delete the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. Please see - * {@see DataObjectServiceClient::collectionName()} for help formatting this field. - * @param \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $requests Required. The request message specifying the resources to delete. - * A maximum of 1000 DataObjects can be deleted in a batch. - * - * @return \Google\Cloud\VectorSearch\V1\BatchDeleteDataObjectsRequest - * - * @experimental - */ - public static function build(string $parent, array $requests): self - { - return (new self()) - ->setParent($parent) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection to delete the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * @type \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $requests - * Required. The request message specifying the resources to delete. - * A maximum of 1000 DataObjects can be deleted in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection to delete the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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 Collection to delete the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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 request message specifying the resources to delete. - * A maximum of 1000 DataObjects can be deleted in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest> - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The request message specifying the resources to delete. - * A maximum of 1000 DataObjects can be deleted in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DeleteDataObjectRequest requests = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest[] $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php deleted file mode 100644 index e0a0b9bef1c4..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest - */ -class BatchSearchDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A list of search requests to execute in parallel. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $searches; - /** - * Optional. Options for combining the results of the batch search operations. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $combine = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * @type \Google\Cloud\VectorSearch\V1\Search[] $searches - * Required. A list of search requests to execute in parallel. - * @type \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions $combine - * Optional. Options for combining the results of the batch search operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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. A list of search requests to execute in parallel. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Search> - */ - public function getSearches() - { - return $this->searches; - } - - /** - * Required. A list of search requests to execute in parallel. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Search searches = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\Search[] $var - * @return $this - */ - public function setSearches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Search::class); - $this->searches = $arr; - - return $this; - } - - /** - * Optional. Options for combining the results of the batch search operations. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions|null - */ - public function getCombine() - { - return $this->combine; - } - - public function hasCombine() - { - return isset($this->combine); - } - - public function clearCombine() - { - unset($this->combine); - } - - /** - * Optional. Options for combining the results of the batch search operations. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions combine = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions $var - * @return $this - */ - public function setCombine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsRequest\CombineResultsOptions::class); - $this->combine = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php deleted file mode 100644 index 35714245de22..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsRequest/CombineResultsOptions.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.vectorsearch.v1.BatchSearchDataObjectsRequest.CombineResultsOptions - */ -class CombineResultsOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ranker to use for combining the results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ranker = null; - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_fields = null; - /** - * Optional. The number of results to return. If not set, a default value - * will be used. - * - * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $top_k = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\Ranker $ranker - * Required. The ranker to use for combining the results. - * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields - * Optional. Mask specifying which fields to return. - * @type int $top_k - * Optional. The number of results to return. If not set, a default value - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ranker to use for combining the results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\Ranker|null - */ - public function getRanker() - { - return $this->ranker; - } - - public function hasRanker() - { - return isset($this->ranker); - } - - public function clearRanker() - { - unset($this->ranker); - } - - /** - * Required. The ranker to use for combining the results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Ranker ranker = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\Ranker $var - * @return $this - */ - public function setRanker($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Ranker::class); - $this->ranker = $var; - - return $this; - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\OutputFields|null - */ - public function getOutputFields() - { - return $this->output_fields; - } - - public function hasOutputFields() - { - return isset($this->output_fields); - } - - public function clearOutputFields() - { - unset($this->output_fields); - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\OutputFields $var - * @return $this - */ - public function setOutputFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); - $this->output_fields = $var; - - return $this; - } - - /** - * Optional. The number of results to return. If not set, a default value - * will be used. - * - * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTopK() - { - return $this->top_k; - } - - /** - * Optional. The number of results to return. If not set, a default value - * will be used. - * - * Generated from protobuf field int32 top_k = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTopK($var) - { - GPBUtil::checkInt32($var); - $this->top_k = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php deleted file mode 100644 index d872d51f5956..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchSearchDataObjectsResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.vectorsearch.v1.BatchSearchDataObjectsResponse - */ -class BatchSearchDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A list of search responses, one for each request in the batch. - * If a ranker is used, a single ranked list of results is returned. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse[] $results - * Output only. A list of search responses, one for each request in the batch. - * If a ranker is used, a single ranked list of results is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A list of search responses, one for each request in the batch. - * If a ranker is used, a single ranked list of results is returned. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse> - */ - public function getResults() - { - return $this->results; - } - - /** - * Output only. A list of search responses, one for each request in the batch. - * If a ranker is used, a single ranked list of results is returned. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchDataObjectsResponse results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse[] $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse::class); - $this->results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php deleted file mode 100644 index b2d8e7c61cea..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.vectorsearch.v1.BatchUpdateDataObjectsRequest - */ -class BatchUpdateDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection to update the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the UpdateDataObjectRequest messages must match this - * field. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The request message specifying the resources to update. - * A maximum of 1000 DataObjects can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * @param string $parent Required. The resource name of the Collection to update the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the UpdateDataObjectRequest messages must match this - * field. Please see - * {@see DataObjectServiceClient::collectionName()} for help formatting this field. - * @param \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $requests Required. The request message specifying the resources to update. - * A maximum of 1000 DataObjects can be updated in a batch. - * - * @return \Google\Cloud\VectorSearch\V1\BatchUpdateDataObjectsRequest - * - * @experimental - */ - public static function build(string $parent, array $requests): self - { - return (new self()) - ->setParent($parent) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection to update the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the UpdateDataObjectRequest messages must match this - * field. - * @type \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $requests - * Required. The request message specifying the resources to update. - * A maximum of 1000 DataObjects can be updated in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection to update the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the UpdateDataObjectRequest messages must match this - * field. - * - * 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 Collection to update the DataObjects in. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * The parent field in the UpdateDataObjectRequest messages must match this - * field. - * - * 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 request message specifying the resources to update. - * A maximum of 1000 DataObjects can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest> - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The request message specifying the resources to update. - * A maximum of 1000 DataObjects can be updated in a batch. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.UpdateDataObjectRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest[] $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php deleted file mode 100644 index dba807289c3b..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/BatchUpdateDataObjectsResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.vectorsearch.v1.BatchUpdateDataObjectsResponse - */ -class BatchUpdateDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php deleted file mode 100644 index da1eeca2f43f..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Collection.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.vectorsearch.v1.Collection - */ -class Collection extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. User-specified display name of the collection - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-specified description of the collection - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Schema for vector fields. Only vector fields in this schema will - * be searchable. Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * - * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $vector_schema; - /** - * Optional. JSON Schema for data. - * Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * The schema must be compliant with - * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). - * - * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_schema = null; - /** - * Optional. Immutable. Specifies the customer-managed encryption key spec for - * a Collection. If set, this Collection and all sub-resources of this - * Collection will be secured by this key. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. name of resource - * @type string $display_name - * Optional. User-specified display name of the collection - * @type string $description - * Optional. User-specified description of the collection - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $vector_schema - * Optional. Schema for vector fields. Only vector fields in this schema will - * be searchable. Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * @type \Google\Protobuf\Struct $data_schema - * Optional. JSON Schema for data. - * Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * The schema must be compliant with - * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). - * @type \Google\Cloud\VectorSearch\V1\EncryptionSpec $encryption_spec - * Optional. Immutable. Specifies the customer-managed encryption key spec for - * a Collection. If set, this Collection and all sub-resources of this - * Collection will be secured by this key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User-specified display name of the collection - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User-specified display name of the collection - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-specified description of the collection - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-specified description of the collection - * - * Generated from protobuf field string description = 9 [(.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. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Schema for vector fields. Only vector fields in this schema will - * be searchable. Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * - * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVectorSchema() - { - return $this->vector_schema; - } - - /** - * Optional. Schema for vector fields. Only vector fields in this schema will - * be searchable. Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * - * Generated from protobuf field map vector_schema = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVectorSchema($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\VectorField::class); - $this->vector_schema = $arr; - - return $this; - } - - /** - * Optional. JSON Schema for data. - * Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * The schema must be compliant with - * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). - * - * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getDataSchema() - { - return $this->data_schema; - } - - public function hasDataSchema() - { - return isset($this->data_schema); - } - - public function clearDataSchema() - { - unset($this->data_schema); - } - - /** - * Optional. JSON Schema for data. - * Field names must contain only alphanumeric characters, - * underscores, and hyphens. - * The schema must be compliant with - * [JSON Schema Draft 7](https://json-schema.org/draft-07/schema). - * - * Generated from protobuf field .google.protobuf.Struct data_schema = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->data_schema = $var; - - return $this; - } - - /** - * Optional. Immutable. Specifies the customer-managed encryption key spec for - * a Collection. If set, this Collection and all sub-resources of this - * Collection will be secured by this key. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\EncryptionSpec|null - */ - public function getEncryptionSpec() - { - return $this->encryption_spec; - } - - public function hasEncryptionSpec() - { - return isset($this->encryption_spec); - } - - public function clearEncryptionSpec() - { - unset($this->encryption_spec); - } - - /** - * Optional. Immutable. Specifies the customer-managed encryption key spec for - * a Collection. If set, this Collection and all sub-resources of this - * Collection will be secured by this key. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EncryptionSpec encryption_spec = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\EncryptionSpec $var - * @return $this - */ - public function setEncryptionSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\EncryptionSpec::class); - $this->encryption_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php deleted file mode 100644 index ad98dfd9a292..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateCollectionRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.vectorsearch.v1.CreateCollectionRequest - */ -class CreateCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. ID of the Collection to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see VectorSearchServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VectorSearch\V1\Collection $collection Required. The resource being created - * @param string $collectionId Required. ID of the Collection to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\VectorSearch\V1\CreateCollectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VectorSearch\V1\Collection $collection, string $collectionId): self - { - return (new self()) - ->setParent($parent) - ->setCollection($collection) - ->setCollectionId($collectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $collection_id - * Required. ID of the Collection to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\VectorSearch\V1\Collection $collection - * Required. The resource being created - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. ID of the Collection to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. ID of the Collection to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\Collection|null - */ - public function getCollection() - { - return $this->collection; - } - - public function hasCollection() - { - return isset($this->collection); - } - - public function clearCollection() - { - unset($this->collection); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\Collection $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Collection::class); - $this->collection = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php deleted file mode 100644 index 48de8c4ab540..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateDataObjectRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.vectorsearch.v1.CreateDataObjectRequest - */ -class CreateDataObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection to create the DataObject in. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the dataObject to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_object_id = ''; - /** - * Required. The DataObject to create. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_object = null; - - /** - * @param string $parent Required. The resource name of the Collection to create the DataObject in. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * Please see {@see DataObjectServiceClient::collectionName()} for help formatting this field. - * @param \Google\Cloud\VectorSearch\V1\DataObject $dataObject Required. The DataObject to create. - * @param string $dataObjectId Required. The id of the dataObject to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\VectorSearch\V1\CreateDataObjectRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VectorSearch\V1\DataObject $dataObject, string $dataObjectId): self - { - return (new self()) - ->setParent($parent) - ->setDataObject($dataObject) - ->setDataObjectId($dataObjectId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection to create the DataObject in. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * @type string $data_object_id - * Required. The id of the dataObject to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object - * Required. The DataObject to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection to create the DataObject in. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection to create the DataObject in. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 id of the dataObject to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDataObjectId() - { - return $this->data_object_id; - } - - /** - * Required. The id of the dataObject to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDataObjectId($var) - { - GPBUtil::checkString($var, True); - $this->data_object_id = $var; - - return $this; - } - - /** - * Required. The DataObject to create. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\DataObject|null - */ - public function getDataObject() - { - return $this->data_object; - } - - public function hasDataObject() - { - return isset($this->data_object); - } - - public function clearDataObject() - { - unset($this->data_object); - } - - /** - * Required. The DataObject to create. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\DataObject $var - * @return $this - */ - public function setDataObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); - $this->data_object = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php deleted file mode 100644 index a97225541f3c..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/CreateIndexRequest.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.vectorsearch.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection for which to create the - * Index. Format: - * `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. ID of the Index to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the Collection for which to create the - * Index. Format: - * `projects/{project}/locations/{location}/collections/{collection}` - * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. - * @param \Google\Cloud\VectorSearch\V1\Index $index Required. The resource being created - * @param string $indexId Required. ID of the Index to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\VectorSearch\V1\CreateIndexRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VectorSearch\V1\Index $index, string $indexId): self - { - return (new self()) - ->setParent($parent) - ->setIndex($index) - ->setIndexId($indexId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection for which to create the - * Index. Format: - * `projects/{project}/locations/{location}/collections/{collection}` - * @type string $index_id - * Required. ID of the Index to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\VectorSearch\V1\Index $index - * Required. The resource being created - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection for which to create the - * Index. Format: - * `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection for which to create the - * Index. Format: - * `projects/{project}/locations/{location}/collections/{collection}` - * - * 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. ID of the Index to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIndexId() - { - return $this->index_id; - } - - /** - * Required. ID of the Index to create. - * The id must be 1-63 characters long, and comply with - * [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Specifically, it must be 1-63 characters long and match the regular - * expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIndexId($var) - { - GPBUtil::checkString($var, True); - $this->index_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Index::class); - $this->index = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php deleted file mode 100644 index 2501187cbe74..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DataObject.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.vectorsearch.v1.DataObject - */ -class DataObject extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The fully qualified resource name of the dataObject. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` - * The data_object_id must be 1-63 characters - * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The id of the dataObject. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_object_id = ''; - /** - * Output only. Timestamp the dataObject was created at. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Timestamp the dataObject was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. The data of the dataObject. - * - * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data = null; - /** - * Optional. The vectors of the dataObject. - * - * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $vectors; - /** - * Optional. The etag of the dataObject. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The fully qualified resource name of the dataObject. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` - * The data_object_id must be 1-63 characters - * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * @type string $data_object_id - * Output only. The id of the dataObject. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Timestamp the dataObject was created at. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp the dataObject was last updated. - * @type \Google\Protobuf\Struct $data - * Optional. The data of the dataObject. - * @type array|\Google\Protobuf\Internal\MapField $vectors - * Optional. The vectors of the dataObject. - * @type string $etag - * Optional. The etag of the dataObject. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The fully qualified resource name of the dataObject. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` - * The data_object_id must be 1-63 characters - * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The fully qualified resource name of the dataObject. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{data_object_id}` - * The data_object_id must be 1-63 characters - * long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The id of the dataObject. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDataObjectId() - { - return $this->data_object_id; - } - - /** - * Output only. The id of the dataObject. - * - * Generated from protobuf field string data_object_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDataObjectId($var) - { - GPBUtil::checkString($var, True); - $this->data_object_id = $var; - - return $this; - } - - /** - * Output only. Timestamp the dataObject was created at. - * - * 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 the dataObject was created at. - * - * 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 the dataObject 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 the dataObject 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; - } - - /** - * Optional. The data of the dataObject. - * - * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * Optional. The data of the dataObject. - * - * Generated from protobuf field .google.protobuf.Struct data = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->data = $var; - - return $this; - } - - /** - * Optional. The vectors of the dataObject. - * - * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVectors() - { - return $this->vectors; - } - - /** - * Optional. The vectors of the dataObject. - * - * Generated from protobuf field map vectors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVectors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Vector::class); - $this->vectors = $arr; - - return $this; - } - - /** - * Optional. The etag of the dataObject. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The etag of the dataObject. - * - * Generated from protobuf field string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php deleted file mode 100644 index 30eb1135250f..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.vectorsearch.v1.DedicatedInfrastructure - */ -class DedicatedInfrastructure extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Mode of the dedicated infrastructure. - * - * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = null; - /** - * Optional. Autoscaling specification. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $autoscaling_spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Optional. Mode of the dedicated infrastructure. - * @type \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec $autoscaling_spec - * Optional. Autoscaling specification. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Mode of the dedicated infrastructure. - * - * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return isset($this->mode) ? $this->mode : 0; - } - - public function hasMode() - { - return isset($this->mode); - } - - public function clearMode() - { - unset($this->mode); - } - - /** - * Optional. Mode of the dedicated infrastructure. - * - * Generated from protobuf field optional .google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Autoscaling specification. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec|null - */ - public function getAutoscalingSpec() - { - return $this->autoscaling_spec; - } - - public function hasAutoscalingSpec() - { - return isset($this->autoscaling_spec); - } - - public function clearAutoscalingSpec() - { - unset($this->autoscaling_spec); - } - - /** - * Optional. Autoscaling specification. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec autoscaling_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec $var - * @return $this - */ - public function setAutoscalingSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure\AutoscalingSpec::class); - $this->autoscaling_spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php deleted file mode 100644 index 7435105a9140..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/AutoscalingSpec.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.vectorsearch.v1.DedicatedInfrastructure.AutoscalingSpec - */ -class AutoscalingSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The minimum number of replicas. If not set or set to `0`, - * defaults to `2`. Must be >= `1` and <= `1000`. - * - * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_replica_count = 0; - /** - * Optional. The maximum number of replicas. Must be >= - * `min_replica_count` and <= `1000`. - * For the v1beta version, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `5`. - * For all other versions, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `2`. - * - * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_replica_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_replica_count - * Optional. The minimum number of replicas. If not set or set to `0`, - * defaults to `2`. Must be >= `1` and <= `1000`. - * @type int $max_replica_count - * Optional. The maximum number of replicas. Must be >= - * `min_replica_count` and <= `1000`. - * For the v1beta version, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `5`. - * For all other versions, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `2`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The minimum number of replicas. If not set or set to `0`, - * defaults to `2`. Must be >= `1` and <= `1000`. - * - * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinReplicaCount() - { - return $this->min_replica_count; - } - - /** - * Optional. The minimum number of replicas. If not set or set to `0`, - * defaults to `2`. Must be >= `1` and <= `1000`. - * - * Generated from protobuf field int32 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->min_replica_count = $var; - - return $this; - } - - /** - * Optional. The maximum number of replicas. Must be >= - * `min_replica_count` and <= `1000`. - * For the v1beta version, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `5`. - * For all other versions, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `2`. - * - * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxReplicaCount() - { - return $this->max_replica_count; - } - - /** - * Optional. The maximum number of replicas. Must be >= - * `min_replica_count` and <= `1000`. - * For the v1beta version, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `5`. - * For all other versions, if not set or set to `0`, defaults to - * the greater of `min_replica_count` and `2`. - * - * Generated from protobuf field int32 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->max_replica_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php deleted file mode 100644 index 2a01db202e2d..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DedicatedInfrastructure/Mode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vectorsearch.v1.DedicatedInfrastructure.Mode - */ -class Mode -{ - /** - * Default will use `PERFORMANCE_OPTIMIZED`. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * This is storage optimized variation. - * - * Generated from protobuf enum STORAGE_OPTIMIZED = 1; - */ - const STORAGE_OPTIMIZED = 1; - /** - * This is Performance optimized on E2 or equivalent family. - * - * Generated from protobuf enum PERFORMANCE_OPTIMIZED = 2; - */ - const PERFORMANCE_OPTIMIZED = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::STORAGE_OPTIMIZED => 'STORAGE_OPTIMIZED', - self::PERFORMANCE_OPTIMIZED => 'PERFORMANCE_OPTIMIZED', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php deleted file mode 100644 index a15a54e937b2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteCollectionRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.vectorsearch.v1.DeleteCollectionRequest - */ -class DeleteCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\DeleteCollectionRequest - * - * @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. Name of the resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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. Name of the resource - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php deleted file mode 100644 index 7b02cd1fe558..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteDataObjectRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.vectorsearch.v1.DeleteDataObjectRequest - */ -class DeleteDataObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the DataObject resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of the DataObject. - * If an etag is provided and does not match the current etag of the - * DataObject, deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. The name of the DataObject resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * Please see {@see DataObjectServiceClient::dataObjectName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\DeleteDataObjectRequest - * - * @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 DataObject resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * @type string $etag - * Optional. The current etag of the DataObject. - * If an etag is provided and does not match the current etag of the - * DataObject, deletion will be blocked and an ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the DataObject resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * 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 DataObject resource to be deleted. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * 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. The current etag of the DataObject. - * If an etag is provided and does not match the current etag of the - * DataObject, deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of the DataObject. - * If an etag is provided and does not match the current etag of the - * DataObject, deletion will be blocked and an ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php deleted file mode 100644 index 312854bce6d7..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DeleteIndexRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.vectorsearch.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Index to delete. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The resource name of the Index to delete. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * Please see {@see VectorSearchServiceClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\DeleteIndexRequest - * - * @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 resource name of the Index to delete. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Index to delete. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * 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 resource name of the Index to delete. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php deleted file mode 100644 index 597ff9a9b6ac..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vectorsearch.v1.DenseScannIndex - */ -class DenseScannIndex extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Feature norm type. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $feature_norm_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $feature_norm_type - * Optional. Feature norm type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Feature norm type. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFeatureNormType() - { - return $this->feature_norm_type; - } - - /** - * Optional. Feature norm type. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType feature_norm_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFeatureNormType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DenseScannIndex\FeatureNormType::class); - $this->feature_norm_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php deleted file mode 100644 index fb2ac5c5d670..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseScannIndex/FeatureNormType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vectorsearch.v1.DenseScannIndex.FeatureNormType - */ -class FeatureNormType -{ - /** - * Unspecified feature norm type. - * - * Generated from protobuf enum FEATURE_NORM_TYPE_UNSPECIFIED = 0; - */ - const FEATURE_NORM_TYPE_UNSPECIFIED = 0; - /** - * No norm applied. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * Unit L2 norm. - * - * Generated from protobuf enum UNIT_L2_NORM = 2; - */ - const UNIT_L2_NORM = 2; - - private static $valueToName = [ - self::FEATURE_NORM_TYPE_UNSPECIFIED => 'FEATURE_NORM_TYPE_UNSPECIFIED', - self::NONE => 'NONE', - self::UNIT_L2_NORM => 'UNIT_L2_NORM', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php deleted file mode 100644 index c3e81f1d2b3a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVector.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vectorsearch.v1.DenseVector - */ -class DenseVector extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float[] $values - * Required. The values of the vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); - parent::__construct($data); - } - - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php deleted file mode 100644 index bb67c3ad25a6..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DenseVectorField.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.vectorsearch.v1.DenseVectorField - */ -class DenseVectorField extends \Google\Protobuf\Internal\Message -{ - /** - * Dimensionality of the vector field. - * - * Generated from protobuf field int32 dimensions = 1; - */ - protected $dimensions = 0; - /** - * Optional. Configuration for generating embeddings for the vector field. If - * not specified, the embedding field must be populated in the DataObject. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vertex_embedding_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $dimensions - * Dimensionality of the vector field. - * @type \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig $vertex_embedding_config - * Optional. Configuration for generating embeddings for the vector field. If - * not specified, the embedding field must be populated in the DataObject. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Dimensionality of the vector field. - * - * Generated from protobuf field int32 dimensions = 1; - * @return int - */ - public function getDimensions() - { - return $this->dimensions; - } - - /** - * Dimensionality of the vector field. - * - * Generated from protobuf field int32 dimensions = 1; - * @param int $var - * @return $this - */ - public function setDimensions($var) - { - GPBUtil::checkInt32($var); - $this->dimensions = $var; - - return $this; - } - - /** - * Optional. Configuration for generating embeddings for the vector field. If - * not specified, the embedding field must be populated in the DataObject. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig|null - */ - public function getVertexEmbeddingConfig() - { - return $this->vertex_embedding_config; - } - - public function hasVertexEmbeddingConfig() - { - return isset($this->vertex_embedding_config); - } - - public function clearVertexEmbeddingConfig() - { - unset($this->vertex_embedding_config); - } - - /** - * Optional. Configuration for generating embeddings for the vector field. If - * not specified, the embedding field must be populated in the DataObject. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VertexEmbeddingConfig vertex_embedding_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig $var - * @return $this - */ - public function setVertexEmbeddingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VertexEmbeddingConfig::class); - $this->vertex_embedding_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php deleted file mode 100644 index e9956ad6fe10..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/DistanceMetric.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.vectorsearch.v1.DistanceMetric - */ -class DistanceMetric -{ - /** - * Default value, distance metric is not specified. - * - * Generated from protobuf enum DISTANCE_METRIC_UNSPECIFIED = 0; - */ - const DISTANCE_METRIC_UNSPECIFIED = 0; - /** - * Dot product distance metric. - * - * Generated from protobuf enum DOT_PRODUCT = 1; - */ - const DOT_PRODUCT = 1; - /** - * Cosine distance metric. - * - * Generated from protobuf enum COSINE_DISTANCE = 2; - */ - const COSINE_DISTANCE = 2; - - private static $valueToName = [ - self::DISTANCE_METRIC_UNSPECIFIED => 'DISTANCE_METRIC_UNSPECIFIED', - self::DOT_PRODUCT => 'DOT_PRODUCT', - self::COSINE_DISTANCE => 'COSINE_DISTANCE', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php deleted file mode 100644 index 36e86bca6e50..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/EmbeddingTaskType.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.vectorsearch.v1.EmbeddingTaskType - */ -class EmbeddingTaskType -{ - /** - * Unspecified task type. - * - * Generated from protobuf enum EMBEDDING_TASK_TYPE_UNSPECIFIED = 0; - */ - const EMBEDDING_TASK_TYPE_UNSPECIFIED = 0; - /** - * Specifies the given text is a query in a search/retrieval setting. - * - * Generated from protobuf enum RETRIEVAL_QUERY = 1; - */ - const RETRIEVAL_QUERY = 1; - /** - * Specifies the given text is a document from the corpus being searched. - * - * Generated from protobuf enum RETRIEVAL_DOCUMENT = 2; - */ - const RETRIEVAL_DOCUMENT = 2; - /** - * Specifies the given text will be used for STS. - * - * Generated from protobuf enum SEMANTIC_SIMILARITY = 3; - */ - const SEMANTIC_SIMILARITY = 3; - /** - * Specifies that the given text will be classified. - * - * Generated from protobuf enum CLASSIFICATION = 4; - */ - const CLASSIFICATION = 4; - /** - * Specifies that the embeddings will be used for clustering. - * - * Generated from protobuf enum CLUSTERING = 5; - */ - const CLUSTERING = 5; - /** - * Specifies that the embeddings will be used for question answering. - * - * Generated from protobuf enum QUESTION_ANSWERING = 6; - */ - const QUESTION_ANSWERING = 6; - /** - * Specifies that the embeddings will be used for fact verification. - * - * Generated from protobuf enum FACT_VERIFICATION = 7; - */ - const FACT_VERIFICATION = 7; - /** - * Specifies that the embeddings will be used for code retrieval. - * - * Generated from protobuf enum CODE_RETRIEVAL_QUERY = 8; - */ - const CODE_RETRIEVAL_QUERY = 8; - - private static $valueToName = [ - self::EMBEDDING_TASK_TYPE_UNSPECIFIED => 'EMBEDDING_TASK_TYPE_UNSPECIFIED', - self::RETRIEVAL_QUERY => 'RETRIEVAL_QUERY', - self::RETRIEVAL_DOCUMENT => 'RETRIEVAL_DOCUMENT', - self::SEMANTIC_SIMILARITY => 'SEMANTIC_SIMILARITY', - self::CLASSIFICATION => 'CLASSIFICATION', - self::CLUSTERING => 'CLUSTERING', - self::QUESTION_ANSWERING => 'QUESTION_ANSWERING', - self::FACT_VERIFICATION => 'FACT_VERIFICATION', - self::CODE_RETRIEVAL_QUERY => 'CODE_RETRIEVAL_QUERY', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php deleted file mode 100644 index 891402eb6a5a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.vectorsearch.v1.ExportDataObjectsMetadata - */ -class ExportDataObjectsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $finish_time - * Output only. The time the operation finished. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * Output only. The time the operation finished. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php deleted file mode 100644 index 707456e9a116..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.vectorsearch.v1.ExportDataObjectsRequest - */ -class ExportDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection from which we want to export - * Data Objects. Format: - * `projects/{project}/locations/{location}/collections/{collection}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination $gcs_destination - * The Cloud Storage location where user wants to export Data Objects. - * @type string $name - * Required. The resource name of the Collection from which we want to export - * Data Objects. Format: - * `projects/{project}/locations/{location}/collections/{collection}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage location where user wants to export Data Objects. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination gcs_destination = 2; - * @return \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(2); - } - - public function hasGcsDestination() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Storage location where user wants to export Data Objects. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination gcs_destination = 2; - * @param \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The resource name of the Collection from which we want to export - * Data Objects. Format: - * `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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 resource name of the Collection from which we want to export - * Data Objects. Format: - * `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php deleted file mode 100644 index 64fa188a3160..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination - */ -class GcsExportDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI prefix of the Cloud Storage where to export Data Objects. - * The bucket is required to be in the same region as the collection. - * - * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $export_uri = ''; - /** - * Required. The format of the exported Data Objects. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $format = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $export_uri - * Required. URI prefix of the Cloud Storage where to export Data Objects. - * The bucket is required to be in the same region as the collection. - * @type int $format - * Required. The format of the exported Data Objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI prefix of the Cloud Storage where to export Data Objects. - * The bucket is required to be in the same region as the collection. - * - * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExportUri() - { - return $this->export_uri; - } - - /** - * Required. URI prefix of the Cloud Storage where to export Data Objects. - * The bucket is required to be in the same region as the collection. - * - * Generated from protobuf field string export_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExportUri($var) - { - GPBUtil::checkString($var, True); - $this->export_uri = $var; - - return $this; - } - - /** - * Required. The format of the exported Data Objects. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Required. The format of the exported Data Objects. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\ExportDataObjectsRequest\GcsExportDestination\Format::class); - $this->format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php deleted file mode 100644 index 18b8f8a0fad6..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsRequest/GcsExportDestination/Format.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.vectorsearch.v1.ExportDataObjectsRequest.GcsExportDestination.Format - */ -class Format -{ - /** - * Unspecified format. - * - * Generated from protobuf enum FORMAT_UNSPECIFIED = 0; - */ - const FORMAT_UNSPECIFIED = 0; - /** - * Exports Data Objects in `JSONL` format. - * - * Generated from protobuf enum JSONL = 2; - */ - const JSONL = 2; - - private static $valueToName = [ - self::FORMAT_UNSPECIFIED => 'FORMAT_UNSPECIFIED', - self::JSONL => 'JSONL', - ]; - - 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php deleted file mode 100644 index bc89240cfc6a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ExportDataObjectsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vectorsearch.v1.ExportDataObjectsResponse - */ -class ExportDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php deleted file mode 100644 index 19bffcd2399c..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetCollectionRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vectorsearch.v1.GetCollectionRequest - */ -class GetCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\GetCollectionRequest - * - * @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. Name of the resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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. Name of the resource - * - * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php deleted file mode 100644 index be7fb8fd8310..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetDataObjectRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.vectorsearch.v1.GetDataObjectRequest - */ -class GetDataObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the DataObject resource. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * 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 DataObject resource. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * Please see {@see DataObjectServiceClient::dataObjectName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\GetDataObjectRequest - * - * @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 DataObject resource. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the DataObject resource. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * 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 DataObject resource. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` - * - * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php deleted file mode 100644 index 68af998408f1..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/GetIndexRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.vectorsearch.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see VectorSearchServiceClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\GetIndexRequest - * - * @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. Name of the resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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. Name of the resource - * - * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php deleted file mode 100644 index 1b6aea8316d2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsMetadata.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.vectorsearch.v1.ImportDataObjectsMetadata - */ -class ImportDataObjectsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Number of DataObjects that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $success_count = 0; - /** - * Output only. Number of DataObjects that failed during processing. - * - * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the operation was last updated. - * @type int|string $success_count - * Output only. Number of DataObjects that were processed successfully. - * @type int|string $failure_count - * Output only. Number of DataObjects that failed during processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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. The time the operation was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.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. Number of DataObjects that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * Output only. Number of DataObjects that were processed successfully. - * - * Generated from protobuf field int64 success_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt64($var); - $this->success_count = $var; - - return $this; - } - - /** - * Output only. Number of DataObjects that failed during processing. - * - * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * Output only. Number of DataObjects that failed during processing. - * - * Generated from protobuf field int64 failure_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt64($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php deleted file mode 100644 index 7b8aeb8422ab..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.vectorsearch.v1.ImportDataObjectsRequest - */ -class ImportDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection to import DataObjects into. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig $gcs_import - * The Cloud Storage location of the input content. - * @type string $name - * Required. The resource name of the Collection to import DataObjects into. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage location of the input content. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig gcs_import = 2; - * @return \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig|null - */ - public function getGcsImport() - { - return $this->readOneof(2); - } - - public function hasGcsImport() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Storage location of the input content. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig gcs_import = 2; - * @param \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig $var - * @return $this - */ - public function setGcsImport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ImportDataObjectsRequest\GcsImportConfig::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The resource name of the Collection to import DataObjects into. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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 resource name of the Collection to import DataObjects into. - * Format: `projects/{project}/locations/{location}/collections/{collection}`. - * - * 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; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php deleted file mode 100644 index f60f8a784d42..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsRequest/GcsImportConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.vectorsearch.v1.ImportDataObjectsRequest.GcsImportConfig - */ -class GcsImportConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI prefix of the Cloud Storage DataObjects to import. - * - * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $contents_uri = ''; - /** - * Required. URI prefix of the Cloud Storage location to write any errors - * encountered during the import. - * - * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $error_uri = ''; - /** - * Optional. URI prefix of the Cloud Storage location to write DataObject - * `IDs` and `etags` of DataObjects that were successfully imported. The - * service will write the successfully imported DataObjects to sharded files - * under this prefix. If this field is empty, no output will be written. - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $contents_uri - * Required. URI prefix of the Cloud Storage DataObjects to import. - * @type string $error_uri - * Required. URI prefix of the Cloud Storage location to write any errors - * encountered during the import. - * @type string $output_uri - * Optional. URI prefix of the Cloud Storage location to write DataObject - * `IDs` and `etags` of DataObjects that were successfully imported. The - * service will write the successfully imported DataObjects to sharded files - * under this prefix. If this field is empty, no output will be written. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI prefix of the Cloud Storage DataObjects to import. - * - * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getContentsUri() - { - return $this->contents_uri; - } - - /** - * Required. URI prefix of the Cloud Storage DataObjects to import. - * - * Generated from protobuf field string contents_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setContentsUri($var) - { - GPBUtil::checkString($var, True); - $this->contents_uri = $var; - - return $this; - } - - /** - * Required. URI prefix of the Cloud Storage location to write any errors - * encountered during the import. - * - * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getErrorUri() - { - return $this->error_uri; - } - - /** - * Required. URI prefix of the Cloud Storage location to write any errors - * encountered during the import. - * - * Generated from protobuf field string error_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setErrorUri($var) - { - GPBUtil::checkString($var, True); - $this->error_uri = $var; - - return $this; - } - - /** - * Optional. URI prefix of the Cloud Storage location to write DataObject - * `IDs` and `etags` of DataObjects that were successfully imported. The - * service will write the successfully imported DataObjects to sharded files - * under this prefix. If this field is empty, no output will be written. - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOutputUri() - { - return $this->output_uri; - } - - /** - * Optional. URI prefix of the Cloud Storage location to write DataObject - * `IDs` and `etags` of DataObjects that were successfully imported. The - * service will write the successfully imported DataObjects to sharded files - * under this prefix. If this field is empty, no output will be written. - * - * Generated from protobuf field string output_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOutputUri($var) - { - GPBUtil::checkString($var, True); - $this->output_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php deleted file mode 100644 index 7509212d5269..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ImportDataObjectsResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.vectorsearch.v1.ImportDataObjectsResponse - */ -class ImportDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Status of the LRO - * - * Generated from protobuf field .google.rpc.Status status = 1; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * Status of the LRO - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Status of the LRO - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Status of the LRO - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php deleted file mode 100644 index 4ff336fedcc6..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Index.php +++ /dev/null @@ -1,489 +0,0 @@ -google.cloud.vectorsearch.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. User-specified display name of the index - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. User-specified description of the index - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Distance metric used for indexing. If not specified, will default - * to DOT_PRODUCT. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_metric = 0; - /** - * Required. The collection schema field to index. - * - * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index_field = ''; - /** - * Optional. The fields to push into the index to enable fast ANN inline - * filtering. - * - * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $filter_fields; - /** - * Optional. The fields to push into the index to enable inline data - * retrieval. - * - * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $store_fields; - protected $infra_type; - protected $index_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure $dedicated_infrastructure - * Optional. Dedicated infrastructure for the index. - * @type \Google\Cloud\VectorSearch\V1\DenseScannIndex $dense_scann - * Optional. Dense ScaNN index. - * @type string $name - * Identifier. name of resource - * @type string $display_name - * Optional. User-specified display name of the index - * @type string $description - * Optional. User-specified description of the index - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create time stamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update time stamp - * @type int $distance_metric - * Optional. Distance metric used for indexing. If not specified, will default - * to DOT_PRODUCT. - * @type string $index_field - * Required. The collection schema field to index. - * @type string[] $filter_fields - * Optional. The fields to push into the index to enable fast ANN inline - * filtering. - * @type string[] $store_fields - * Optional. The fields to push into the index to enable inline data - * retrieval. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Dedicated infrastructure for the index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure|null - */ - public function getDedicatedInfrastructure() - { - return $this->readOneof(11); - } - - public function hasDedicatedInfrastructure() - { - return $this->hasOneof(11); - } - - /** - * Optional. Dedicated infrastructure for the index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DedicatedInfrastructure dedicated_infrastructure = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure $var - * @return $this - */ - public function setDedicatedInfrastructure($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DedicatedInfrastructure::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Optional. Dense ScaNN index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\DenseScannIndex|null - */ - public function getDenseScann() - { - return $this->readOneof(12); - } - - public function hasDenseScann() - { - return $this->hasOneof(12); - } - - /** - * Optional. Dense ScaNN index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseScannIndex dense_scann = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\DenseScannIndex $var - * @return $this - */ - public function setDenseScann($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseScannIndex::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User-specified display name of the index - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User-specified display name of the index - * - * Generated from protobuf field string display_name = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. User-specified description of the index - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-specified description of the index - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update time stamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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; - } - - /** - * Optional. Distance metric used for indexing. If not specified, will default - * to DOT_PRODUCT. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDistanceMetric() - { - return $this->distance_metric; - } - - /** - * Optional. Distance metric used for indexing. If not specified, will default - * to DOT_PRODUCT. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDistanceMetric($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DistanceMetric::class); - $this->distance_metric = $var; - - return $this; - } - - /** - * Required. The collection schema field to index. - * - * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getIndexField() - { - return $this->index_field; - } - - /** - * Required. The collection schema field to index. - * - * Generated from protobuf field string index_field = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setIndexField($var) - { - GPBUtil::checkString($var, True); - $this->index_field = $var; - - return $this; - } - - /** - * Optional. The fields to push into the index to enable fast ANN inline - * filtering. - * - * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getFilterFields() - { - return $this->filter_fields; - } - - /** - * Optional. The fields to push into the index to enable fast ANN inline - * filtering. - * - * Generated from protobuf field repeated string filter_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setFilterFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->filter_fields = $arr; - - return $this; - } - - /** - * Optional. The fields to push into the index to enable inline data - * retrieval. - * - * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getStoreFields() - { - return $this->store_fields; - } - - /** - * Optional. The fields to push into the index to enable inline data - * retrieval. - * - * Generated from protobuf field repeated string store_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setStoreFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->store_fields = $arr; - - return $this; - } - - /** - * @return string - */ - public function getInfraType() - { - return $this->whichOneof("infra_type"); - } - - /** - * @return string - */ - public function getIndexType() - { - return $this->whichOneof("index_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php deleted file mode 100644 index 274dbd3cbc56..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vectorsearch.v1.ListCollectionsRequest - */ -class ListCollectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListCollectionsRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListCollectionsRequest - * Please see {@see VectorSearchServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\ListCollectionsRequest - * - * @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. Parent value for ListCollectionsRequest - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results - * @type string $order_by - * Optional. Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListCollectionsRequest - * - * 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. Parent value for ListCollectionsRequest - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * 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. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php deleted file mode 100644 index fe7602172c0a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListCollectionsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vectorsearch.v1.ListCollectionsResponse - */ -class ListCollectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Collection - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; - */ - private $collections; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unordered list. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\Collection[] $collections - * The list of Collection - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Unordered list. Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Collection - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Collection> - */ - public function getCollections() - { - return $this->collections; - } - - /** - * The list of Collection - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Collection collections = 1; - * @param \Google\Cloud\VectorSearch\V1\Collection[] $var - * @return $this - */ - public function setCollections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Collection::class); - $this->collections = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Unordered list. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unordered list. Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php deleted file mode 100644 index 8f0becae371a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.vectorsearch.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListIndexesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListIndexesRequest - * Please see {@see VectorSearchServiceClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VectorSearch\V1\ListIndexesRequest - * - * @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. Parent value for ListIndexesRequest - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results - * @type string $order_by - * Optional. Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListIndexesRequest - * - * 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. Parent value for ListIndexesRequest - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * 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. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php deleted file mode 100644 index 48db430c005f..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ListIndexesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vectorsearch.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Index - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; - */ - private $indexes; - /** - * A token identifying a page of results the server should return. - * - * 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 \Google\Cloud\VectorSearch\V1\Index[] $indexes - * The list of Index - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Index - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The list of Index - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.Index indexes = 1; - * @param \Google\Cloud\VectorSearch\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php deleted file mode 100644 index f8363f5cc8c1..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OperationMetadata.php +++ /dev/null @@ -1,311 +0,0 @@ -google.cloud.vectorsearch.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.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. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have - * [google.longrunning.Operation.error][google.longrunning.Operation.error] - * value with a [google.rpc.Status.code][google.rpc.Status.code] of `1`, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php deleted file mode 100644 index 8fd505929402..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/OutputFields.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.vectorsearch.v1.OutputFields - */ -class OutputFields extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The fields from the data fields to include in the output. - * - * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $data_fields; - /** - * Optional. The fields from the vector fields to include in the output. - * - * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $vector_fields; - /** - * Optional. The fields from the DataObject metadata to include in the output. - * - * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metadata_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $data_fields - * Optional. The fields from the data fields to include in the output. - * @type string[] $vector_fields - * Optional. The fields from the vector fields to include in the output. - * @type string[] $metadata_fields - * Optional. The fields from the DataObject metadata to include in the output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The fields from the data fields to include in the output. - * - * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getDataFields() - { - return $this->data_fields; - } - - /** - * Optional. The fields from the data fields to include in the output. - * - * Generated from protobuf field repeated string data_fields = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setDataFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_fields = $arr; - - return $this; - } - - /** - * Optional. The fields from the vector fields to include in the output. - * - * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getVectorFields() - { - return $this->vector_fields; - } - - /** - * Optional. The fields from the vector fields to include in the output. - * - * Generated from protobuf field repeated string vector_fields = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setVectorFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->vector_fields = $arr; - - return $this; - } - - /** - * Optional. The fields from the DataObject metadata to include in the output. - * - * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getMetadataFields() - { - return $this->metadata_fields; - } - - /** - * Optional. The fields from the DataObject metadata to include in the output. - * - * Generated from protobuf field repeated string metadata_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setMetadataFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php deleted file mode 100644 index 3541cbbd21d5..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsRequest.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.vectorsearch.v1.QueryDataObjectsRequest - */ -class QueryDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_fields = null; - /** - * Optional. The standard list page size. Default is 100. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The standard list page token. - * Typically obtained via - * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * @type \Google\Protobuf\Struct $filter - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields - * Optional. Mask specifying which fields to return. - * @type int $page_size - * Optional. The standard list page size. Default is 100. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. The standard list page token. - * Typically obtained via - * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] - * call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection for which to query. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\OutputFields|null - */ - public function getOutputFields() - { - return $this->output_fields; - } - - public function hasOutputFields() - { - return isset($this->output_fields); - } - - public function clearOutputFields() - { - unset($this->output_fields); - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\OutputFields $var - * @return $this - */ - public function setOutputFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); - $this->output_fields = $var; - - return $this; - } - - /** - * Optional. The standard list page size. Default is 100. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The standard list page size. Default is 100. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.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 - * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The standard list page token. - * Typically obtained via - * [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.QueryDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.QueryDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php deleted file mode 100644 index 4e90b7849c2d..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/QueryDataObjectsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.vectorsearch.v1.QueryDataObjectsResponse - */ -class QueryDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of dataObjects that match the query. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $data_objects; - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DataObject[] $data_objects - * Output only. The list of dataObjects that match the query. - * @type string $next_page_token - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to - * obtain that page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of dataObjects that match the query. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\DataObject> - */ - public function getDataObjects() - { - return $this->data_objects; - } - - /** - * Output only. The list of dataObjects that match the query. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.DataObject data_objects = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VectorSearch\V1\DataObject[] $var - * @return $this - */ - public function setDataObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\DataObject::class); - $this->data_objects = $arr; - - return $this; - } - - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php deleted file mode 100644 index a0aa74f03057..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Ranker.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.vectorsearch.v1.Ranker - */ -class Ranker extends \Google\Protobuf\Internal\Message -{ - protected $ranker; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion $rrf - * Reciprocal Rank Fusion ranking. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Reciprocal Rank Fusion ranking. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ReciprocalRankFusion rrf = 1; - * @return \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion|null - */ - public function getRrf() - { - return $this->readOneof(1); - } - - public function hasRrf() - { - return $this->hasOneof(1); - } - - /** - * Reciprocal Rank Fusion ranking. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.ReciprocalRankFusion rrf = 1; - * @param \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion $var - * @return $this - */ - public function setRrf($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\ReciprocalRankFusion::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getRanker() - { - return $this->whichOneof("ranker"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php deleted file mode 100644 index 9d529790eaca..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/ReciprocalRankFusion.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.vectorsearch.v1.ReciprocalRankFusion - */ -class ReciprocalRankFusion extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The weights to apply to each search result set during fusion. - * - * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $weights; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float[] $weights - * Required. The weights to apply to each search result set during fusion. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The weights to apply to each search result set during fusion. - * - * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getWeights() - { - return $this->weights; - } - - /** - * Required. The weights to apply to each search result set during fusion. - * - * Generated from protobuf field repeated double weights = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float[] $var - * @return $this - */ - public function setWeights($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->weights = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php deleted file mode 100644 index 911a22fc617a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Search.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.vectorsearch.v1.Search - */ -class Search extends \Google\Protobuf\Internal\Message -{ - protected $search_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\VectorSearch $vector_search - * A vector-based search. - * @type \Google\Cloud\VectorSearch\V1\SemanticSearch $semantic_search - * A semantic search. - * @type \Google\Cloud\VectorSearch\V1\TextSearch $text_search - * A text search operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * A vector-based search. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 1; - * @return \Google\Cloud\VectorSearch\V1\VectorSearch|null - */ - public function getVectorSearch() - { - return $this->readOneof(1); - } - - public function hasVectorSearch() - { - return $this->hasOneof(1); - } - - /** - * A vector-based search. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 1; - * @param \Google\Cloud\VectorSearch\V1\VectorSearch $var - * @return $this - */ - public function setVectorSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VectorSearch::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A semantic search. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 2; - * @return \Google\Cloud\VectorSearch\V1\SemanticSearch|null - */ - public function getSemanticSearch() - { - return $this->readOneof(2); - } - - public function hasSemanticSearch() - { - return $this->hasOneof(2); - } - - /** - * A semantic search. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 2; - * @param \Google\Cloud\VectorSearch\V1\SemanticSearch $var - * @return $this - */ - public function setSemanticSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SemanticSearch::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A text search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 3; - * @return \Google\Cloud\VectorSearch\V1\TextSearch|null - */ - public function getTextSearch() - { - return $this->readOneof(3); - } - - public function hasTextSearch() - { - return $this->hasOneof(3); - } - - /** - * A text search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 3; - * @param \Google\Cloud\VectorSearch\V1\TextSearch $var - * @return $this - */ - public function setTextSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\TextSearch::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSearchType() - { - return $this->whichOneof("search_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php deleted file mode 100644 index d8b0cb20dfe5..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.vectorsearch.v1.SearchDataObjectsRequest - */ -class SearchDataObjectsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The standard list page size. Only supported for KNN. If not set, - * up to search_type.top_k results will be returned. The maximum value is - * 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The standard list page token. - * Typically obtained via - * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - protected $search_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\VectorSearch $vector_search - * A vector search operation. - * @type \Google\Cloud\VectorSearch\V1\SemanticSearch $semantic_search - * A semantic search operation. - * @type \Google\Cloud\VectorSearch\V1\TextSearch $text_search - * Optional. A text search operation. - * @type string $parent - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * @type int $page_size - * Optional. The standard list page size. Only supported for KNN. If not set, - * up to search_type.top_k results will be returned. The maximum value is - * 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. The standard list page token. - * Typically obtained via - * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] - * call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * A vector search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 2; - * @return \Google\Cloud\VectorSearch\V1\VectorSearch|null - */ - public function getVectorSearch() - { - return $this->readOneof(2); - } - - public function hasVectorSearch() - { - return $this->hasOneof(2); - } - - /** - * A vector search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.VectorSearch vector_search = 2; - * @param \Google\Cloud\VectorSearch\V1\VectorSearch $var - * @return $this - */ - public function setVectorSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\VectorSearch::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A semantic search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 4; - * @return \Google\Cloud\VectorSearch\V1\SemanticSearch|null - */ - public function getSemanticSearch() - { - return $this->readOneof(4); - } - - public function hasSemanticSearch() - { - return $this->hasOneof(4); - } - - /** - * A semantic search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SemanticSearch semantic_search = 4; - * @param \Google\Cloud\VectorSearch\V1\SemanticSearch $var - * @return $this - */ - public function setSemanticSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SemanticSearch::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. A text search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\TextSearch|null - */ - public function getTextSearch() - { - return $this->readOneof(7); - } - - public function hasTextSearch() - { - return $this->hasOneof(7); - } - - /** - * Optional. A text search operation. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.TextSearch text_search = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\TextSearch $var - * @return $this - */ - public function setTextSearch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\TextSearch::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Required. The resource name of the Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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 Collection for which to search. - * Format: `projects/{project}/locations/{location}/collections/{collection}` - * - * 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. Only supported for KNN. If not set, - * up to search_type.top_k results will be returned. The maximum value is - * 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The standard list page size. Only supported for KNN. If not set, - * up to search_type.top_k results will be returned. The maximum value is - * 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 5 [(.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 - * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The standard list page token. - * Typically obtained via - * [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1.SearchDataObjectsResponse.next_page_token] - * of the previous - * [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1.DataObjectSearchService.SearchDataObjects] - * call. - * - * Generated from protobuf field string page_token = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * @return string - */ - public function getSearchType() - { - return $this->whichOneof("search_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php deleted file mode 100644 index 72f03ef01dc2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchDataObjectsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.vectorsearch.v1.SearchDataObjectsResponse - */ -class SearchDataObjectsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The list of dataObjects that match the search criteria. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $results; - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\SearchResult[] $results - * Output only. The list of dataObjects that match the search criteria. - * @type string $next_page_token - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to - * obtain that page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The list of dataObjects that match the search criteria. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\VectorSearch\V1\SearchResult> - */ - public function getResults() - { - return $this->results; - } - - /** - * Output only. The list of dataObjects that match the search criteria. - * - * Generated from protobuf field repeated .google.cloud.vectorsearch.v1.SearchResult results = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VectorSearch\V1\SearchResult[] $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VectorSearch\V1\SearchResult::class); - $this->results = $arr; - - return $this; - } - - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Output only. A token to retrieve next page of results. - * Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to - * obtain that page. - * - * Generated from protobuf field string next_page_token = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php deleted file mode 100644 index 5ed0fb6d89b6..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.vectorsearch.v1.SearchHint - */ -class SearchHint extends \Google\Protobuf\Internal\Message -{ - protected $index_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint $knn_hint - * Optional. If set, the search will use the system's default - * K-Nearest Neighbor (KNN) index engine. - * @type \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint $index_hint - * Optional. Specifies that the search should use a particular index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If set, the search will use the system's default - * K-Nearest Neighbor (KNN) index engine. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.KnnHint knn_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint|null - */ - public function getKnnHint() - { - return $this->readOneof(3); - } - - public function hasKnnHint() - { - return $this->hasOneof(3); - } - - /** - * Optional. If set, the search will use the system's default - * K-Nearest Neighbor (KNN) index engine. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.KnnHint knn_hint = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint $var - * @return $this - */ - public function setKnnHint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint\KnnHint::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Specifies that the search should use a particular index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.IndexHint index_hint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint|null - */ - public function getIndexHint() - { - return $this->readOneof(4); - } - - public function hasIndexHint() - { - return $this->hasOneof(4); - } - - /** - * Optional. Specifies that the search should use a particular index. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint.IndexHint index_hint = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint $var - * @return $this - */ - public function setIndexHint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint\IndexHint::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getIndexType() - { - return $this->whichOneof("index_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php deleted file mode 100644 index e002e515f974..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/IndexHint.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.vectorsearch.v1.SearchHint.IndexHint - */ -class IndexHint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the index to use for the search. - * The index must be in the same project, location, and collection. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the index to use for the search. - * The index must be in the same project, location, and collection. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the index to use for the search. - * The index must be in the same project, location, and collection. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * 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 resource name of the index to use for the search. - * The index must be in the same project, location, and collection. - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` - * - * 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/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php deleted file mode 100644 index 0253c90e18ef..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchHint/KnnHint.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.vectorsearch.v1.SearchHint.KnnHint - */ -class KnnHint extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php deleted file mode 100644 index 12f1790ab082..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SearchResult.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.vectorsearch.v1.SearchResult - */ -class SearchResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The matching data object. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_object = null; - /** - * Output only. Similarity distance or ranker score returned by - * BatchSearchDataObjects. - * - * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $distance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object - * Output only. The matching data object. - * @type float $distance - * Output only. Similarity distance or ranker score returned by - * BatchSearchDataObjects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The matching data object. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VectorSearch\V1\DataObject|null - */ - public function getDataObject() - { - return $this->data_object; - } - - public function hasDataObject() - { - return isset($this->data_object); - } - - public function clearDataObject() - { - unset($this->data_object); - } - - /** - * Output only. The matching data object. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VectorSearch\V1\DataObject $var - * @return $this - */ - public function setDataObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); - $this->data_object = $var; - - return $this; - } - - /** - * Output only. Similarity distance or ranker score returned by - * BatchSearchDataObjects. - * - * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getDistance() - { - return isset($this->distance) ? $this->distance : 0.0; - } - - public function hasDistance() - { - return isset($this->distance); - } - - public function clearDistance() - { - unset($this->distance); - } - - /** - * Output only. Similarity distance or ranker score returned by - * BatchSearchDataObjects. - * - * Generated from protobuf field optional double distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setDistance($var) - { - GPBUtil::checkDouble($var); - $this->distance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php deleted file mode 100644 index 4dfdde9fb02e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SemanticSearch.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.vectorsearch.v1.SemanticSearch - */ -class SemanticSearch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The query text, which is used to generate an embedding according - * to the embedding model specified in the collection config. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_text = ''; - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_field = ''; - /** - * Required. The task type of the query embedding. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_type = 0; - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_fields = null; - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Optional. The number of data objects to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $top_k = null; - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to KNN search - * otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $search_hint = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $search_text - * Required. The query text, which is used to generate an embedding according - * to the embedding model specified in the collection config. - * @type string $search_field - * Required. The vector field to search. - * @type int $task_type - * Required. The task type of the query embedding. - * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields - * Optional. The fields to return in the search results. - * @type \Google\Protobuf\Struct $filter - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * @type int $top_k - * Optional. The number of data objects to return. - * @type \Google\Cloud\VectorSearch\V1\SearchHint $search_hint - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to KNN search - * otherwise. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The query text, which is used to generate an embedding according - * to the embedding model specified in the collection config. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSearchText() - { - return $this->search_text; - } - - /** - * Required. The query text, which is used to generate an embedding according - * to the embedding model specified in the collection config. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSearchText($var) - { - GPBUtil::checkString($var, True); - $this->search_text = $var; - - return $this; - } - - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSearchField() - { - return $this->search_field; - } - - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSearchField($var) - { - GPBUtil::checkString($var, True); - $this->search_field = $var; - - return $this; - } - - /** - * Required. The task type of the query embedding. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTaskType() - { - return $this->task_type; - } - - /** - * Required. The task type of the query embedding. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTaskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\EmbeddingTaskType::class); - $this->task_type = $var; - - return $this; - } - - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\OutputFields|null - */ - public function getOutputFields() - { - return $this->output_fields; - } - - public function hasOutputFields() - { - return isset($this->output_fields); - } - - public function clearOutputFields() - { - unset($this->output_fields); - } - - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\OutputFields $var - * @return $this - */ - public function setOutputFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); - $this->output_fields = $var; - - return $this; - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The number of data objects to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTopK() - { - return isset($this->top_k) ? $this->top_k : 0; - } - - public function hasTopK() - { - return isset($this->top_k); - } - - public function clearTopK() - { - unset($this->top_k); - } - - /** - * Optional. The number of data objects to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTopK($var) - { - GPBUtil::checkInt32($var); - $this->top_k = $var; - - return $this; - } - - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to KNN search - * otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\SearchHint|null - */ - public function getSearchHint() - { - return $this->search_hint; - } - - public function hasSearchHint() - { - return isset($this->search_hint); - } - - public function clearSearchHint() - { - unset($this->search_hint); - } - - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to KNN search - * otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\SearchHint $var - * @return $this - */ - public function setSearchHint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint::class); - $this->search_hint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php deleted file mode 100644 index 21af72420f0c..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVector.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.vectorsearch.v1.SparseVector - */ -class SparseVector extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $values; - /** - * Required. The corresponding indices for the values. - * - * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float[] $values - * Required. The values of the vector. - * @type int[] $indices - * Required. The corresponding indices for the values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); - parent::__construct($data); - } - - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Required. The values of the vector. - * - * Generated from protobuf field repeated float values = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param float[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->values = $arr; - - return $this; - } - - /** - * Required. The corresponding indices for the values. - * - * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getIndices() - { - return $this->indices; - } - - /** - * Required. The corresponding indices for the values. - * - * Generated from protobuf field repeated int32 indices = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int[] $var - * @return $this - */ - public function setIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->indices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php deleted file mode 100644 index 65c8ffdbca52..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/SparseVectorField.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.vectorsearch.v1.SparseVectorField - */ -class SparseVectorField extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php deleted file mode 100644 index 60bd53821ac3..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/TextSearch.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.vectorsearch.v1.TextSearch - */ -class TextSearch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The query text. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_text = ''; - /** - * Required. The data field names to search. - * - * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $data_field_names; - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_fields = null; - /** - * Optional. The number of results to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $top_k = null; - /** - * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, - * represented as a `google.protobuf.Struct`. - * - * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $search_text - * Required. The query text. - * @type string[] $data_field_names - * Required. The data field names to search. - * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields - * Optional. The fields to return in the search results. - * @type int $top_k - * Optional. The number of results to return. - * @type \Google\Protobuf\Struct $filter - * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, - * represented as a `google.protobuf.Struct`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The query text. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSearchText() - { - return $this->search_text; - } - - /** - * Required. The query text. - * - * Generated from protobuf field string search_text = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSearchText($var) - { - GPBUtil::checkString($var, True); - $this->search_text = $var; - - return $this; - } - - /** - * Required. The data field names to search. - * - * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getDataFieldNames() - { - return $this->data_field_names; - } - - /** - * Required. The data field names to search. - * - * Generated from protobuf field repeated string data_field_names = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setDataFieldNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_field_names = $arr; - - return $this; - } - - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\OutputFields|null - */ - public function getOutputFields() - { - return $this->output_fields; - } - - public function hasOutputFields() - { - return isset($this->output_fields); - } - - public function clearOutputFields() - { - unset($this->output_fields); - } - - /** - * Optional. The fields to return in the search results. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\OutputFields $var - * @return $this - */ - public function setOutputFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); - $this->output_fields = $var; - - return $this; - } - - /** - * Optional. The number of results to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTopK() - { - return isset($this->top_k) ? $this->top_k : 0; - } - - public function hasTopK() - { - return isset($this->top_k); - } - - public function clearTopK() - { - unset($this->top_k); - } - - /** - * Optional. The number of results to return. - * - * Generated from protobuf field optional int32 top_k = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTopK($var) - { - GPBUtil::checkInt32($var); - $this->top_k = $var; - - return $this; - } - - /** - * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, - * represented as a `google.protobuf.Struct`. - * - * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, - * represented as a `google.protobuf.Struct`. - * - * Generated from protobuf field .google.protobuf.Struct filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php deleted file mode 100644 index 2aa5781afe3c..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateCollectionRequest.php +++ /dev/null @@ -1,282 +0,0 @@ -google.cloud.vectorsearch.v1.UpdateCollectionRequest - */ -class UpdateCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Collection resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields present in the request will be - * overwritten. - * The following fields support update: `display_name`, `description`, - * `labels`, `data_schema`, `vector_schema`. - * For `data_schema` and `vector_schema`, fields can only be added, not - * deleted, but `vertex_embedding_config` in `vector_schema` can be added or - * removed. - * Partial updates for `data_schema` and `vector_schema` are also supported - * by using sub-field paths in `update_mask`, e.g. - * `data_schema.properties.foo` or `vector_schema.my_vector_field`. - * If `*` is provided in the update_mask, full replacement will be performed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VectorSearch\V1\Collection $collection Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Collection resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields present in the request will be - * overwritten. - * - * The following fields support update: `display_name`, `description`, - * `labels`, `data_schema`, `vector_schema`. - * For `data_schema` and `vector_schema`, fields can only be added, not - * deleted, but `vertex_embedding_config` in `vector_schema` can be added or - * removed. - * Partial updates for `data_schema` and `vector_schema` are also supported - * by using sub-field paths in `update_mask`, e.g. - * `data_schema.properties.foo` or `vector_schema.my_vector_field`. - * - * If `*` is provided in the update_mask, full replacement will be performed. - * - * @return \Google\Cloud\VectorSearch\V1\UpdateCollectionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VectorSearch\V1\Collection $collection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCollection($collection) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Collection resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields present in the request will be - * overwritten. - * The following fields support update: `display_name`, `description`, - * `labels`, `data_schema`, `vector_schema`. - * For `data_schema` and `vector_schema`, fields can only be added, not - * deleted, but `vertex_embedding_config` in `vector_schema` can be added or - * removed. - * Partial updates for `data_schema` and `vector_schema` are also supported - * by using sub-field paths in `update_mask`, e.g. - * `data_schema.properties.foo` or `vector_schema.my_vector_field`. - * If `*` is provided in the update_mask, full replacement will be performed. - * @type \Google\Cloud\VectorSearch\V1\Collection $collection - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Collection resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields present in the request will be - * overwritten. - * The following fields support update: `display_name`, `description`, - * `labels`, `data_schema`, `vector_schema`. - * For `data_schema` and `vector_schema`, fields can only be added, not - * deleted, but `vertex_embedding_config` in `vector_schema` can be added or - * removed. - * Partial updates for `data_schema` and `vector_schema` are also supported - * by using sub-field paths in `update_mask`, e.g. - * `data_schema.properties.foo` or `vector_schema.my_vector_field`. - * If `*` is provided in the update_mask, full replacement will be performed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Collection resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields present in the request will be - * overwritten. - * The following fields support update: `display_name`, `description`, - * `labels`, `data_schema`, `vector_schema`. - * For `data_schema` and `vector_schema`, fields can only be added, not - * deleted, but `vertex_embedding_config` in `vector_schema` can be added or - * removed. - * Partial updates for `data_schema` and `vector_schema` are also supported - * by using sub-field paths in `update_mask`, e.g. - * `data_schema.properties.foo` or `vector_schema.my_vector_field`. - * If `*` is provided in the update_mask, full replacement will be performed. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\Collection|null - */ - public function getCollection() - { - return $this->collection; - } - - public function hasCollection() - { - return isset($this->collection); - } - - public function clearCollection() - { - unset($this->collection); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\Collection $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\Collection::class); - $this->collection = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php deleted file mode 100644 index f69018d6edde..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/UpdateDataObjectRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.vectorsearch.v1.UpdateDataObjectRequest - */ -class UpdateDataObjectRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The DataObject which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_object = null; - /** - * Optional. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VectorSearch\V1\DataObject $dataObject Required. The DataObject which replaces the resource on the server. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * - * @return \Google\Cloud\VectorSearch\V1\UpdateDataObjectRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VectorSearch\V1\DataObject $dataObject, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataObject($dataObject) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DataObject $data_object - * Required. The DataObject which replaces the resource on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The DataObject which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VectorSearch\V1\DataObject|null - */ - public function getDataObject() - { - return $this->data_object; - } - - public function hasDataObject() - { - return isset($this->data_object); - } - - public function clearDataObject() - { - unset($this->data_object); - } - - /** - * Required. The DataObject which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DataObject data_object = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VectorSearch\V1\DataObject $var - * @return $this - */ - public function setDataObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DataObject::class); - $this->data_object = $var; - - return $this; - } - - /** - * Optional. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. The update mask applies to the resource. See - * [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php deleted file mode 100644 index a05fb25b7172..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/Vector.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.vectorsearch.v1.Vector - */ -class Vector extends \Google\Protobuf\Internal\Message -{ - protected $vector_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DenseVector $dense - * A dense vector. - * @type \Google\Cloud\VectorSearch\V1\SparseVector $sparse - * A sparse vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObject::initOnce(); - parent::__construct($data); - } - - /** - * A dense vector. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector dense = 2; - * @return \Google\Cloud\VectorSearch\V1\DenseVector|null - */ - public function getDense() - { - return $this->readOneof(2); - } - - public function hasDense() - { - return $this->hasOneof(2); - } - - /** - * A dense vector. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector dense = 2; - * @param \Google\Cloud\VectorSearch\V1\DenseVector $var - * @return $this - */ - public function setDense($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVector::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A sparse vector. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse = 3; - * @return \Google\Cloud\VectorSearch\V1\SparseVector|null - */ - public function getSparse() - { - return $this->readOneof(3); - } - - public function hasSparse() - { - return $this->hasOneof(3); - } - - /** - * A sparse vector. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse = 3; - * @param \Google\Cloud\VectorSearch\V1\SparseVector $var - * @return $this - */ - public function setSparse($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVector::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getVectorType() - { - return $this->whichOneof("vector_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php deleted file mode 100644 index dfcb5f2c5683..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorField.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.vectorsearch.v1.VectorField - */ -class VectorField extends \Google\Protobuf\Internal\Message -{ - protected $vector_type_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DenseVectorField $dense_vector - * Dense vector field. - * @type \Google\Cloud\VectorSearch\V1\SparseVectorField $sparse_vector - * Sparse vector field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\VectorsearchService::initOnce(); - parent::__construct($data); - } - - /** - * Dense vector field. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVectorField dense_vector = 3; - * @return \Google\Cloud\VectorSearch\V1\DenseVectorField|null - */ - public function getDenseVector() - { - return $this->readOneof(3); - } - - public function hasDenseVector() - { - return $this->hasOneof(3); - } - - /** - * Dense vector field. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVectorField dense_vector = 3; - * @param \Google\Cloud\VectorSearch\V1\DenseVectorField $var - * @return $this - */ - public function setDenseVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVectorField::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Sparse vector field. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVectorField sparse_vector = 4; - * @return \Google\Cloud\VectorSearch\V1\SparseVectorField|null - */ - public function getSparseVector() - { - return $this->readOneof(4); - } - - public function hasSparseVector() - { - return $this->hasOneof(4); - } - - /** - * Sparse vector field. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVectorField sparse_vector = 4; - * @param \Google\Cloud\VectorSearch\V1\SparseVectorField $var - * @return $this - */ - public function setSparseVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVectorField::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getVectorTypeConfig() - { - return $this->whichOneof("vector_type_config"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php deleted file mode 100644 index c068f2a4e9d3..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VectorSearch.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.vectorsearch.v1.VectorSearch - */ -class VectorSearch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_field = ''; - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Optional. The number of nearest neighbors to return. - * - * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $top_k = null; - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $output_fields = null; - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to the default KNN - * search otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $search_hint = null; - /** - * Optional. The distance metric to use for the KNN search. If not specified, - * DOT_PRODUCT will be used as the default. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_metric = 0; - protected $vector_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VectorSearch\V1\DenseVector $vector - * A dense vector for the query. - * @type \Google\Cloud\VectorSearch\V1\SparseVector $sparse_vector - * A sparse vector for the query. - * @type string $search_field - * Required. The vector field to search. - * @type \Google\Protobuf\Struct $filter - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * @type int $top_k - * Optional. The number of nearest neighbors to return. - * @type \Google\Cloud\VectorSearch\V1\OutputFields $output_fields - * Optional. Mask specifying which fields to return. - * @type \Google\Cloud\VectorSearch\V1\SearchHint $search_hint - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to the default KNN - * search otherwise. - * @type int $distance_metric - * Optional. The distance metric to use for the KNN search. If not specified, - * DOT_PRODUCT will be used as the default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\DataObjectSearchService::initOnce(); - parent::__construct($data); - } - - /** - * A dense vector for the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector vector = 1; - * @return \Google\Cloud\VectorSearch\V1\DenseVector|null - */ - public function getVector() - { - return $this->readOneof(1); - } - - public function hasVector() - { - return $this->hasOneof(1); - } - - /** - * A dense vector for the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DenseVector vector = 1; - * @param \Google\Cloud\VectorSearch\V1\DenseVector $var - * @return $this - */ - public function setVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\DenseVector::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A sparse vector for the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse_vector = 2; - * @return \Google\Cloud\VectorSearch\V1\SparseVector|null - */ - public function getSparseVector() - { - return $this->readOneof(2); - } - - public function hasSparseVector() - { - return $this->hasOneof(2); - } - - /** - * A sparse vector for the query. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SparseVector sparse_vector = 2; - * @param \Google\Cloud\VectorSearch\V1\SparseVector $var - * @return $this - */ - public function setSparseVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SparseVector::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSearchField() - { - return $this->search_field; - } - - /** - * Required. The vector field to search. - * - * Generated from protobuf field string search_field = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSearchField($var) - { - GPBUtil::checkString($var, True); - $this->search_field = $var; - - return $this; - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, - * represented as a google.protobuf.Struct. - * - * Generated from protobuf field .google.protobuf.Struct filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The number of nearest neighbors to return. - * - * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTopK() - { - return isset($this->top_k) ? $this->top_k : 0; - } - - public function hasTopK() - { - return isset($this->top_k); - } - - public function clearTopK() - { - unset($this->top_k); - } - - /** - * Optional. The number of nearest neighbors to return. - * - * Generated from protobuf field optional int32 top_k = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTopK($var) - { - GPBUtil::checkInt32($var); - $this->top_k = $var; - - return $this; - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\OutputFields|null - */ - public function getOutputFields() - { - return $this->output_fields; - } - - public function hasOutputFields() - { - return isset($this->output_fields); - } - - public function clearOutputFields() - { - unset($this->output_fields); - } - - /** - * Optional. Mask specifying which fields to return. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.OutputFields output_fields = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\OutputFields $var - * @return $this - */ - public function setOutputFields($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\OutputFields::class); - $this->output_fields = $var; - - return $this; - } - - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to the default KNN - * search otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VectorSearch\V1\SearchHint|null - */ - public function getSearchHint() - { - return $this->search_hint; - } - - public function hasSearchHint() - { - return isset($this->search_hint); - } - - public function clearSearchHint() - { - unset($this->search_hint); - } - - /** - * Optional. Sets the search hint. If no strategy is specified, the service - * will use an index if one is available, and fall back to the default KNN - * search otherwise. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.SearchHint search_hint = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VectorSearch\V1\SearchHint $var - * @return $this - */ - public function setSearchHint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VectorSearch\V1\SearchHint::class); - $this->search_hint = $var; - - return $this; - } - - /** - * Optional. The distance metric to use for the KNN search. If not specified, - * DOT_PRODUCT will be used as the default. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDistanceMetric() - { - return $this->distance_metric; - } - - /** - * Optional. The distance metric to use for the KNN search. If not specified, - * DOT_PRODUCT will be used as the default. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.DistanceMetric distance_metric = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDistanceMetric($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\DistanceMetric::class); - $this->distance_metric = $var; - - return $this; - } - - /** - * @return string - */ - public function getVectorType() - { - return $this->whichOneof("vector_type"); - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php b/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php deleted file mode 100644 index 441e52948d3e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/proto/src/Google/Cloud/VectorSearch/V1/VertexEmbeddingConfig.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.vectorsearch.v1.VertexEmbeddingConfig - */ -class VertexEmbeddingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Required: ID of the embedding model to use. See - * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models - * for the list of supported models. - * - * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $model_id = ''; - /** - * Required. Required: Text template for the input to the model. The template - * must contain one or more references to fields in the DataObject, e.g.: - * "Movie Title: {title} ---- Movie Plot: {plot}". - * - * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $text_template = ''; - /** - * Required. Required: Task type for the embeddings. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $model_id - * Required. Required: ID of the embedding model to use. See - * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models - * for the list of supported models. - * @type string $text_template - * Required. Required: Text template for the input to the model. The template - * must contain one or more references to fields in the DataObject, e.g.: - * "Movie Title: {title} ---- Movie Plot: {plot}". - * @type int $task_type - * Required. Required: Task type for the embeddings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vectorsearch\V1\EmbeddingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Required: ID of the embedding model to use. See - * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models - * for the list of supported models. - * - * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getModelId() - { - return $this->model_id; - } - - /** - * Required. Required: ID of the embedding model to use. See - * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models#embeddings-models - * for the list of supported models. - * - * Generated from protobuf field string model_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setModelId($var) - { - GPBUtil::checkString($var, True); - $this->model_id = $var; - - return $this; - } - - /** - * Required. Required: Text template for the input to the model. The template - * must contain one or more references to fields in the DataObject, e.g.: - * "Movie Title: {title} ---- Movie Plot: {plot}". - * - * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTextTemplate() - { - return $this->text_template; - } - - /** - * Required. Required: Text template for the input to the model. The template - * must contain one or more references to fields in the DataObject, e.g.: - * "Movie Title: {title} ---- Movie Plot: {plot}". - * - * Generated from protobuf field string text_template = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTextTemplate($var) - { - GPBUtil::checkString($var, True); - $this->text_template = $var; - - return $this; - } - - /** - * Required. Required: Task type for the embeddings. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTaskType() - { - return $this->task_type; - } - - /** - * Required. Required: Task type for the embeddings. - * - * Generated from protobuf field .google.cloud.vectorsearch.v1.EmbeddingTaskType task_type = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTaskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VectorSearch\V1\EmbeddingTaskType::class); - $this->task_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php deleted file mode 100644 index 901f38ec5006..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setAggregate($aggregate); - - // Call the API and handle any network failures. - try { - /** @var AggregateDataObjectsResponse $response */ - $response = $dataObjectSearchServiceClient->aggregateDataObjects($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 = DataObjectSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; - - aggregate_data_objects_sample($formattedParent, $aggregate); -} -// [END vectorsearch_v1_generated_DataObjectSearchService_AggregateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php deleted file mode 100644 index f4c1b6907b50..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent) - ->setSearches($searches); - - // Call the API and handle any network failures. - try { - /** @var BatchSearchDataObjectsResponse $response */ - $response = $dataObjectSearchServiceClient->batchSearchDataObjects($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 = DataObjectSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - batch_search_data_objects_sample($formattedParent); -} -// [END vectorsearch_v1_generated_DataObjectSearchService_BatchSearchDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php deleted file mode 100644 index 4dd8d9aff4a8..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vectorsearch_v1_generated_DataObjectSearchService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php deleted file mode 100644 index 37706aa0e667..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/list_locations.php +++ /dev/null @@ -1,78 +0,0 @@ -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 vectorsearch_v1_generated_DataObjectSearchService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php deleted file mode 100644 index 84e7266cbc2e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/query_data_objects.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataObjectSearchServiceClient->queryDataObjects($request); - - /** @var DataObject $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 = DataObjectSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - query_data_objects_sample($formattedParent); -} -// [END vectorsearch_v1_generated_DataObjectSearchService_QueryDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php deleted file mode 100644 index 1b87176767b6..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectSearchServiceClient/search_data_objects.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $dataObjectSearchServiceClient->searchDataObjects($request); - - /** @var SearchResult $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 = DataObjectSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - search_data_objects_sample($formattedParent); -} -// [END vectorsearch_v1_generated_DataObjectSearchService_SearchDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php deleted file mode 100644 index 03b5d12f1736..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_create_data_objects.php +++ /dev/null @@ -1,104 +0,0 @@ -setParent($formattedRequestsParent) - ->setDataObjectId($requestsDataObjectId) - ->setDataObject($requestsDataObject); - $requests = [$createDataObjectRequest,]; - $request = (new BatchCreateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchCreateDataObjectsResponse $response */ - $response = $dataObjectServiceClient->batchCreateDataObjects($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 = DataObjectServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $formattedRequestsParent = DataObjectServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $requestsDataObjectId = '[DATA_OBJECT_ID]'; - - batch_create_data_objects_sample($formattedParent, $formattedRequestsParent, $requestsDataObjectId); -} -// [END vectorsearch_v1_generated_DataObjectService_BatchCreateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php deleted file mode 100644 index 9bcdc587e81d..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_delete_data_objects.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedRequestsName); - $requests = [$deleteDataObjectRequest,]; - $request = (new BatchDeleteDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - $dataObjectServiceClient->batchDeleteDataObjects($request); - printf('Call completed successfully.' . PHP_EOL); - } 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 = DataObjectServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $formattedRequestsName = DataObjectServiceClient::dataObjectName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]', - '[DATAOBJECT]' - ); - - batch_delete_data_objects_sample($formattedParent, $formattedRequestsName); -} -// [END vectorsearch_v1_generated_DataObjectService_BatchDeleteDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php deleted file mode 100644 index 148400e360b5..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/batch_update_data_objects.php +++ /dev/null @@ -1,85 +0,0 @@ -setDataObject($requestsDataObject); - $requests = [$updateDataObjectRequest,]; - $request = (new BatchUpdateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchUpdateDataObjectsResponse $response */ - $response = $dataObjectServiceClient->batchUpdateDataObjects($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 = DataObjectServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - batch_update_data_objects_sample($formattedParent); -} -// [END vectorsearch_v1_generated_DataObjectService_BatchUpdateDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php deleted file mode 100644 index 0adc95b4be0a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/create_data_object.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setDataObjectId($dataObjectId) - ->setDataObject($dataObject); - - // Call the API and handle any network failures. - try { - /** @var DataObject $response */ - $response = $dataObjectServiceClient->createDataObject($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 = DataObjectServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $dataObjectId = '[DATA_OBJECT_ID]'; - - create_data_object_sample($formattedParent, $dataObjectId); -} -// [END vectorsearch_v1_generated_DataObjectService_CreateDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php deleted file mode 100644 index 1f544ed85ecc..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/delete_data_object.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $dataObjectServiceClient->deleteDataObject($request); - printf('Call completed successfully.' . PHP_EOL); - } 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 = DataObjectServiceClient::dataObjectName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]', - '[DATAOBJECT]' - ); - - delete_data_object_sample($formattedName); -} -// [END vectorsearch_v1_generated_DataObjectService_DeleteDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php deleted file mode 100644 index c9998dfb9cd8..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_data_object.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataObject $response */ - $response = $dataObjectServiceClient->getDataObject($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 = DataObjectServiceClient::dataObjectName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]', - '[DATAOBJECT]' - ); - - get_data_object_sample($formattedName); -} -// [END vectorsearch_v1_generated_DataObjectService_GetDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php deleted file mode 100644 index 9edd13df81e2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vectorsearch_v1_generated_DataObjectService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php deleted file mode 100644 index 9af82c4d0882..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/list_locations.php +++ /dev/null @@ -1,78 +0,0 @@ -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 vectorsearch_v1_generated_DataObjectService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php b/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php deleted file mode 100644 index 1fd6306c28dc..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/DataObjectServiceClient/update_data_object.php +++ /dev/null @@ -1,59 +0,0 @@ -setDataObject($dataObject); - - // Call the API and handle any network failures. - try { - /** @var DataObject $response */ - $response = $dataObjectServiceClient->updateDataObject($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vectorsearch_v1_generated_DataObjectService_UpdateDataObject_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php deleted file mode 100644 index b5dba9b52e21..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_collection.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setCollectionId($collectionId) - ->setCollection($collection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->createCollection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Collection $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 = VectorSearchServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $collectionId = '[COLLECTION_ID]'; - - create_collection_sample($formattedParent, $collectionId); -} -// [END vectorsearch_v1_generated_VectorSearchService_CreateCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php deleted file mode 100644 index 929e3279b24e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/create_index.php +++ /dev/null @@ -1,104 +0,0 @@ -setIndexField($indexIndexField); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndexId($indexId) - ->setIndex($index); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->createIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $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 = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - $indexId = '[INDEX_ID]'; - $indexIndexField = '[INDEX_FIELD]'; - - create_index_sample($formattedParent, $indexId, $indexIndexField); -} -// [END vectorsearch_v1_generated_VectorSearchService_CreateIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php deleted file mode 100644 index 7ab95231c955..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_collection.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->deleteCollection($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 = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - delete_collection_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_DeleteCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php deleted file mode 100644 index ebcaa4e77d8a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/delete_index.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->deleteIndex($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 = VectorSearchServiceClient::indexName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_DeleteIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php deleted file mode 100644 index c3081a2d0c6f..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/export_data_objects.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->exportDataObjects($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDataObjectsResponse $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 -{ - $formattedName = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - export_data_objects_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_ExportDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php deleted file mode 100644 index d02572d30bf2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_collection.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Collection $response */ - $response = $vectorSearchServiceClient->getCollection($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 = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - get_collection_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_GetCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php deleted file mode 100644 index 140b096be0dd..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_index.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Index $response */ - $response = $vectorSearchServiceClient->getIndex($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 = VectorSearchServiceClient::indexName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_GetIndex_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php deleted file mode 100644 index 2dac0088703d..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END vectorsearch_v1_generated_VectorSearchService_GetLocation_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php deleted file mode 100644 index a5c5f7f3da75..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/import_data_objects.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->importDataObjects($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDataObjectsResponse $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 -{ - $formattedName = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - import_data_objects_sample($formattedName); -} -// [END vectorsearch_v1_generated_VectorSearchService_ImportDataObjects_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php deleted file mode 100644 index 5121f672420e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_collections.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vectorSearchServiceClient->listCollections($request); - - /** @var Collection $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 = VectorSearchServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_collections_sample($formattedParent); -} -// [END vectorsearch_v1_generated_VectorSearchService_ListCollections_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php deleted file mode 100644 index 6aaa50ebb75a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_indexes.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $vectorSearchServiceClient->listIndexes($request); - - /** @var Index $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 = VectorSearchServiceClient::collectionName( - '[PROJECT]', - '[LOCATION]', - '[COLLECTION]' - ); - - list_indexes_sample($formattedParent); -} -// [END vectorsearch_v1_generated_VectorSearchService_ListIndexes_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php deleted file mode 100644 index 6a4b493270e4..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/list_locations.php +++ /dev/null @@ -1,78 +0,0 @@ -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 vectorsearch_v1_generated_VectorSearchService_ListLocations_sync] diff --git a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php b/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php deleted file mode 100644 index 928fc297b03e..000000000000 --- a/owl-bot-staging/VectorSearch/v1/samples/V1/VectorSearchServiceClient/update_collection.php +++ /dev/null @@ -1,71 +0,0 @@ -setCollection($collection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $vectorSearchServiceClient->updateCollection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Collection $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()); - } -} -// [END vectorsearch_v1_generated_VectorSearchService_UpdateCollection_sync] diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php deleted file mode 100644 index b9a1446b05b9..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectSearchServiceClient.php +++ /dev/null @@ -1,441 +0,0 @@ - aggregateDataObjectsAsync(AggregateDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchSearchDataObjectsAsync(BatchSearchDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface queryDataObjectsAsync(QueryDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchDataObjectsAsync(SearchDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DataObjectSearchServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.DataObjectSearchService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/data_object_search_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_object_search_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_object_search_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_object_search_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a collection - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * - * @return string The formatted collection resource. - */ - public static function collectionName(string $project, string $location, string $collection): string - { - return self::getPathTemplate('collection')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $project, string $location, string $collection, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - collection: projects/{project}/locations/{location}/collections/{collection} - * - index: projects/{project}/locations/{location}/collections/{collection}/indexes/{index} - * - * 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|ClientOptions $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 'vectorsearch.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VectorSearch\V1\DataObjectSearchServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new DataObjectSearchServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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); - } - - /** - * Aggregates data objects. - * - * The async variant is - * {@see DataObjectSearchServiceClient::aggregateDataObjectsAsync()} . - * - * @example samples/V1/DataObjectSearchServiceClient/aggregate_data_objects.php - * - * @param AggregateDataObjectsRequest $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 AggregateDataObjectsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function aggregateDataObjects(AggregateDataObjectsRequest $request, array $callOptions = []): AggregateDataObjectsResponse - { - return $this->startApiCall('AggregateDataObjects', $request, $callOptions)->wait(); - } - - /** - * Batch searches data objects. - * - * The async variant is - * {@see DataObjectSearchServiceClient::batchSearchDataObjectsAsync()} . - * - * @example samples/V1/DataObjectSearchServiceClient/batch_search_data_objects.php - * - * @param BatchSearchDataObjectsRequest $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 BatchSearchDataObjectsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchSearchDataObjects(BatchSearchDataObjectsRequest $request, array $callOptions = []): BatchSearchDataObjectsResponse - { - return $this->startApiCall('BatchSearchDataObjects', $request, $callOptions)->wait(); - } - - /** - * Queries data objects. - * - * The async variant is - * {@see DataObjectSearchServiceClient::queryDataObjectsAsync()} . - * - * @example samples/V1/DataObjectSearchServiceClient/query_data_objects.php - * - * @param QueryDataObjectsRequest $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 queryDataObjects(QueryDataObjectsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('QueryDataObjects', $request, $callOptions); - } - - /** - * Searches data objects. - * - * The async variant is - * {@see DataObjectSearchServiceClient::searchDataObjectsAsync()} . - * - * @example samples/V1/DataObjectSearchServiceClient/search_data_objects.php - * - * @param SearchDataObjectsRequest $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 searchDataObjects(SearchDataObjectsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchDataObjects', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataObjectSearchServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataObjectSearchServiceClient/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. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see DataObjectSearchServiceClient::listLocationsAsync()} - * . - * - * @example samples/V1/DataObjectSearchServiceClient/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); - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php deleted file mode 100644 index a63ea4145fee..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/Client/DataObjectServiceClient.php +++ /dev/null @@ -1,520 +0,0 @@ - batchCreateDataObjectsAsync(BatchCreateDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchDeleteDataObjectsAsync(BatchDeleteDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchUpdateDataObjectsAsync(BatchUpdateDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDataObjectAsync(CreateDataObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataObjectAsync(DeleteDataObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataObjectAsync(GetDataObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataObjectAsync(UpdateDataObjectRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class DataObjectServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.DataObjectService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/data_object_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/data_object_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/data_object_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/data_object_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a collection - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * - * @return string The formatted collection resource. - */ - public static function collectionName(string $project, string $location, string $collection): string - { - return self::getPathTemplate('collection')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a data_object - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $dataObject - * - * @return string The formatted data_object resource. - */ - public static function dataObjectName(string $project, string $location, string $collection, string $dataObject): string - { - return self::getPathTemplate('dataObject')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'dataObject' => $dataObject, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - collection: projects/{project}/locations/{location}/collections/{collection} - * - dataObject: projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject} - * - * 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|ClientOptions $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 'vectorsearch.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VectorSearch\V1\DataObjectServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new DataObjectServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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); - } - - /** - * Creates a batch of dataObjects. - * - * The async variant is - * {@see DataObjectServiceClient::batchCreateDataObjectsAsync()} . - * - * @example samples/V1/DataObjectServiceClient/batch_create_data_objects.php - * - * @param BatchCreateDataObjectsRequest $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 BatchCreateDataObjectsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCreateDataObjects(BatchCreateDataObjectsRequest $request, array $callOptions = []): BatchCreateDataObjectsResponse - { - return $this->startApiCall('BatchCreateDataObjects', $request, $callOptions)->wait(); - } - - /** - * Deletes dataObjects in a batch. - * - * The async variant is - * {@see DataObjectServiceClient::batchDeleteDataObjectsAsync()} . - * - * @example samples/V1/DataObjectServiceClient/batch_delete_data_objects.php - * - * @param BatchDeleteDataObjectsRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchDeleteDataObjects(BatchDeleteDataObjectsRequest $request, array $callOptions = []): void - { - $this->startApiCall('BatchDeleteDataObjects', $request, $callOptions)->wait(); - } - - /** - * Updates dataObjects in a batch. - * - * The async variant is - * {@see DataObjectServiceClient::batchUpdateDataObjectsAsync()} . - * - * @example samples/V1/DataObjectServiceClient/batch_update_data_objects.php - * - * @param BatchUpdateDataObjectsRequest $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 BatchUpdateDataObjectsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchUpdateDataObjects(BatchUpdateDataObjectsRequest $request, array $callOptions = []): BatchUpdateDataObjectsResponse - { - return $this->startApiCall('BatchUpdateDataObjects', $request, $callOptions)->wait(); - } - - /** - * Creates a dataObject. - * - * The async variant is {@see DataObjectServiceClient::createDataObjectAsync()} . - * - * @example samples/V1/DataObjectServiceClient/create_data_object.php - * - * @param CreateDataObjectRequest $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 DataObject - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataObject(CreateDataObjectRequest $request, array $callOptions = []): DataObject - { - return $this->startApiCall('CreateDataObject', $request, $callOptions)->wait(); - } - - /** - * Deletes a dataObject. - * - * The async variant is {@see DataObjectServiceClient::deleteDataObjectAsync()} . - * - * @example samples/V1/DataObjectServiceClient/delete_data_object.php - * - * @param DeleteDataObjectRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDataObject(DeleteDataObjectRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataObject', $request, $callOptions)->wait(); - } - - /** - * Gets a data object. - * - * The async variant is {@see DataObjectServiceClient::getDataObjectAsync()} . - * - * @example samples/V1/DataObjectServiceClient/get_data_object.php - * - * @param GetDataObjectRequest $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 DataObject - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataObject(GetDataObjectRequest $request, array $callOptions = []): DataObject - { - return $this->startApiCall('GetDataObject', $request, $callOptions)->wait(); - } - - /** - * Updates a dataObject. - * - * The async variant is {@see DataObjectServiceClient::updateDataObjectAsync()} . - * - * @example samples/V1/DataObjectServiceClient/update_data_object.php - * - * @param UpdateDataObjectRequest $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 DataObject - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataObject(UpdateDataObjectRequest $request, array $callOptions = []): DataObject - { - return $this->startApiCall('UpdateDataObject', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DataObjectServiceClient::getLocationAsync()} . - * - * @example samples/V1/DataObjectServiceClient/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. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see DataObjectServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DataObjectServiceClient/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); - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php b/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php deleted file mode 100644 index 208792b9cc85..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/Client/VectorSearchServiceClient.php +++ /dev/null @@ -1,762 +0,0 @@ - createCollectionAsync(CreateCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCollectionAsync(DeleteCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataObjectsAsync(ExportDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCollectionAsync(GetCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataObjectsAsync(ImportDataObjectsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCollectionsAsync(ListCollectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCollectionAsync(UpdateCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIndexAsync(UpdateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class VectorSearchServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.vectorsearch.v1.VectorSearchService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'vectorsearch.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'vectorsearch.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/vector_search_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/vector_search_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/vector_search_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/vector_search_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 = $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 collection - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * - * @return string The formatted collection resource. - */ - public static function collectionName(string $project, string $location, string $collection): string - { - return self::getPathTemplate('collection')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $location - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $project, string $location, string $collection, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project' => $project, - 'location' => $location, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - collection: projects/{project}/locations/{location}/collections/{collection} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - index: projects/{project}/locations/{location}/collections/{collection}/indexes/{index} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $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 'vectorsearch.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VectorSearch\V1\VectorSearchServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new VectorSearchServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @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. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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 new Collection in a given project and location. - * - * The async variant is {@see VectorSearchServiceClient::createCollectionAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/create_collection.php - * - * @param CreateCollectionRequest $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 createCollection(CreateCollectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCollection', $request, $callOptions)->wait(); - } - - /** - * Creates a new Index in a given project and location. - * - * The async variant is {@see VectorSearchServiceClient::createIndexAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/create_index.php - * - * @param CreateIndexRequest $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 createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Collection. - * - * The async variant is {@see VectorSearchServiceClient::deleteCollectionAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/delete_collection.php - * - * @param DeleteCollectionRequest $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 deleteCollection(DeleteCollectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCollection', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Index. - * - * The async variant is {@see VectorSearchServiceClient::deleteIndexAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/delete_index.php - * - * @param DeleteIndexRequest $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 deleteIndex(DeleteIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); - } - - /** - * Initiates a Long-Running Operation to export DataObjects from a Collection. - * - * The async variant is {@see VectorSearchServiceClient::exportDataObjectsAsync()} - * . - * - * @example samples/V1/VectorSearchServiceClient/export_data_objects.php - * - * @param ExportDataObjectsRequest $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 exportDataObjects(ExportDataObjectsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportDataObjects', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Collection. - * - * The async variant is {@see VectorSearchServiceClient::getCollectionAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/get_collection.php - * - * @param GetCollectionRequest $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 Collection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCollection(GetCollectionRequest $request, array $callOptions = []): Collection - { - return $this->startApiCall('GetCollection', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Index. - * - * The async variant is {@see VectorSearchServiceClient::getIndexAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/get_index.php - * - * @param GetIndexRequest $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 Index - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndex(GetIndexRequest $request, array $callOptions = []): Index - { - return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); - } - - /** - * Initiates a Long-Running Operation to import DataObjects into a Collection. - * - * The async variant is {@see VectorSearchServiceClient::importDataObjectsAsync()} - * . - * - * @example samples/V1/VectorSearchServiceClient/import_data_objects.php - * - * @param ImportDataObjectsRequest $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 importDataObjects(ImportDataObjectsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportDataObjects', $request, $callOptions)->wait(); - } - - /** - * Lists Collections in a given project and location. - * - * The async variant is {@see VectorSearchServiceClient::listCollectionsAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/list_collections.php - * - * @param ListCollectionsRequest $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 listCollections(ListCollectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCollections', $request, $callOptions); - } - - /** - * Lists Indexes in a given project and location. - * - * The async variant is {@see VectorSearchServiceClient::listIndexesAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/list_indexes.php - * - * @param ListIndexesRequest $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 listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexes', $request, $callOptions); - } - - /** - * Updates the parameters of a single Collection. - * - * The async variant is {@see VectorSearchServiceClient::updateCollectionAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/update_collection.php - * - * @param UpdateCollectionRequest $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 updateCollection(UpdateCollectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCollection', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Index. - * - * The async variant is {@see VectorSearchServiceClient::updateIndexAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/update_index.php - * - * @param UpdateIndexRequest $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 updateIndex(UpdateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateIndex', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see VectorSearchServiceClient::getLocationAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/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. - - This method lists locations based on the resource scope provided in - the [ListLocationsRequest.name] field: - - * **Global locations**: If `name` is empty, the method lists the - public locations available to all projects. * **Project-specific - locations**: If `name` follows the format - `projects/{project}`, the method lists locations visible to that - specific project. This includes public, private, or other - project-specific locations enabled for the project. - - For gRPC and client library implementations, the resource name is - passed as the `name` field. For direct service calls, the resource - name is - incorporated into the request path based on the specific service - implementation and version. - * - * The async variant is {@see VectorSearchServiceClient::listLocationsAsync()} . - * - * @example samples/V1/VectorSearchServiceClient/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); - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 4e80203638a5..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.vectorsearch.v1", - "libraryPackage": "Google\\Cloud\\VectorSearch\\V1", - "services": { - "DataObjectSearchService": { - "clients": { - "grpc": { - "libraryClient": "DataObjectSearchServiceGapicClient", - "rpcs": { - "AggregateDataObjects": { - "methods": [ - "aggregateDataObjects" - ] - }, - "BatchSearchDataObjects": { - "methods": [ - "batchSearchDataObjects" - ] - }, - "QueryDataObjects": { - "methods": [ - "queryDataObjects" - ] - }, - "SearchDataObjects": { - "methods": [ - "searchDataObjects" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "DataObjectService": { - "clients": { - "grpc": { - "libraryClient": "DataObjectServiceGapicClient", - "rpcs": { - "BatchCreateDataObjects": { - "methods": [ - "batchCreateDataObjects" - ] - }, - "BatchDeleteDataObjects": { - "methods": [ - "batchDeleteDataObjects" - ] - }, - "BatchUpdateDataObjects": { - "methods": [ - "batchUpdateDataObjects" - ] - }, - "CreateDataObject": { - "methods": [ - "createDataObject" - ] - }, - "DeleteDataObject": { - "methods": [ - "deleteDataObject" - ] - }, - "GetDataObject": { - "methods": [ - "getDataObject" - ] - }, - "UpdateDataObject": { - "methods": [ - "updateDataObject" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "VectorSearchService": { - "clients": { - "grpc": { - "libraryClient": "VectorSearchServiceGapicClient", - "rpcs": { - "CreateCollection": { - "methods": [ - "createCollection" - ] - }, - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "DeleteCollection": { - "methods": [ - "deleteCollection" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "ExportDataObjects": { - "methods": [ - "exportDataObjects" - ] - }, - "GetCollection": { - "methods": [ - "getCollection" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "ImportDataObjects": { - "methods": [ - "importDataObjects" - ] - }, - "ListCollections": { - "methods": [ - "listCollections" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "UpdateCollection": { - "methods": [ - "updateCollection" - ] - }, - "UpdateIndex": { - "methods": [ - "updateIndex" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json deleted file mode 100644 index 50aeb62f8c33..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.cloud.vectorsearch.v1.DataObjectSearchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "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 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "AggregateDataObjects": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "BatchSearchDataObjects": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "QueryDataObjects": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "SearchDataObjects": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_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" - } - } - } - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php deleted file mode 100644 index 8db464a2a450..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_descriptor_config.php +++ /dev/null @@ -1,130 +0,0 @@ - [ - 'google.cloud.vectorsearch.v1.DataObjectSearchService' => [ - 'AggregateDataObjects' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\AggregateDataObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchSearchDataObjects' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchSearchDataObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'QueryDataObjects' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataObjects', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\QueryDataObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchDataObjects' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\SearchDataObjectsResponse', - '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', - ], - 'templateMap' => [ - 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', - 'index' => 'projects/{project}/locations/{location}/collections/{collection}/indexes/{index}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php deleted file mode 100644 index 68333383a6e5..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_search_service_rest_client_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vectorsearch.v1.DataObjectSearchService' => [ - 'AggregateDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:aggregate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchSearchDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchSearch', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'QueryDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:query', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:search', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json deleted file mode 100644 index a78004bb0501..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_client_config.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "interfaces": { - "google.cloud.vectorsearch.v1.DataObjectService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ] - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - } - }, - "methods": { - "BatchCreateDataObjects": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "BatchDeleteDataObjects": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "BatchUpdateDataObjects": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateDataObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteDataObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetDataObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataObject": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_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" - } - } - } - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php deleted file mode 100644 index a66571732eb9..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_descriptor_config.php +++ /dev/null @@ -1,151 +0,0 @@ - [ - 'google.cloud.vectorsearch.v1.DataObjectService' => [ - 'BatchCreateDataObjects' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchCreateDataObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteDataObjects' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateDataObjects' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\BatchUpdateDataObjectsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDataObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataObject' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\DataObject', - 'headerParams' => [ - [ - 'keyName' => 'data_object.name', - 'fieldAccessors' => [ - 'getDataObject', - 'getName', - ], - ], - ], - ], - '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', - ], - 'templateMap' => [ - 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', - 'dataObject' => 'projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php deleted file mode 100644 index d92a9eabd1e4..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/data_object_service_rest_client_config.php +++ /dev/null @@ -1,186 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vectorsearch.v1.DataObjectService' => [ - 'BatchCreateDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchDelete', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects:batchUpdate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataObject' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/dataObjects', - 'body' => 'data_object', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'data_object_id', - ], - ], - 'DeleteDataObject' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataObject' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataObjects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDataObject' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_object.name=projects/*/locations/*/collections/*/dataObjects/*}', - 'body' => 'data_object', - 'placeholders' => [ - 'data_object.name' => [ - 'getters' => [ - 'getDataObject', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json deleted file mode 100644 index e055528d9e03..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_client_config.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "interfaces": { - "google.cloud.vectorsearch.v1.VectorSearchService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ] - }, - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ExportDataObjects": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportDataObjects": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListCollections": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateIndex": { - "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" - } - } - } - } -} diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php deleted file mode 100644 index 5e588fcd5a52..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_descriptor_config.php +++ /dev/null @@ -1,286 +0,0 @@ - [ - 'google.cloud.vectorsearch.v1.VectorSearchService' => [ - 'CreateCollection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Collection', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Index', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCollection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportDataObjects' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\ExportDataObjectsResponse', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\ExportDataObjectsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportDataObjects' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\ImportDataObjectsResponse', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\ImportDataObjectsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCollection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Collection', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'collection.name', - 'fieldAccessors' => [ - 'getCollection', - 'getName', - ], - ], - ], - ], - 'UpdateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VectorSearch\V1\Index', - 'metadataReturnType' => '\Google\Cloud\VectorSearch\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'index.name', - 'fieldAccessors' => [ - 'getIndex', - 'getName', - ], - ], - ], - ], - 'GetCollection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\Collection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\Index', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCollections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\ListCollectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VectorSearch\V1\ListIndexesResponse', - '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', - ], - 'templateMap' => [ - 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'index' => 'projects/{project}/locations/{location}/collections/{collection}/indexes/{index}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php b/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php deleted file mode 100644 index e6f18f8e46f2..000000000000 --- a/owl-bot-staging/VectorSearch/v1/src/V1/resources/vector_search_service_rest_client_config.php +++ /dev/null @@ -1,246 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.vectorsearch.v1.VectorSearchService' => [ - 'CreateCollection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/collections', - 'body' => 'collection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'collection_id', - ], - ], - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'index_id', - ], - ], - 'DeleteCollection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}:exportDataObjects', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCollection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDataObjects' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}:importDataObjects', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCollections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/collections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/collections/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCollection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{collection.name=projects/*/locations/*/collections/*}', - 'body' => 'collection', - 'placeholders' => [ - 'collection.name' => [ - 'getters' => [ - 'getCollection', - 'getName', - ], - ], - ], - ], - 'UpdateIndex' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{index.name=projects/*/locations/*/collections/*/indexes/*}', - 'body' => 'index', - 'placeholders' => [ - 'index.name' => [ - 'getters' => [ - 'getIndex', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php deleted file mode 100644 index 4fd194a1ff95..000000000000 --- a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectSearchServiceClientTest.php +++ /dev/null @@ -1,510 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataObjectSearchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataObjectSearchServiceClient($options); - } - - /** @test */ - public function aggregateDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AggregateDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; - $request = (new AggregateDataObjectsRequest()) - ->setParent($formattedParent) - ->setAggregate($aggregate); - $response = $gapicClient->aggregateDataObjects($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.vectorsearch.v1.DataObjectSearchService/AggregateDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAggregate(); - $this->assertProtobufEquals($aggregate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function aggregateDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; - $request = (new AggregateDataObjectsRequest()) - ->setParent($formattedParent) - ->setAggregate($aggregate); - try { - $gapicClient->aggregateDataObjects($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 batchSearchDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchSearchDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $searches = []; - $request = (new BatchSearchDataObjectsRequest()) - ->setParent($formattedParent) - ->setSearches($searches); - $response = $gapicClient->batchSearchDataObjects($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.vectorsearch.v1.DataObjectSearchService/BatchSearchDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSearches(); - $this->assertProtobufEquals($searches, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchSearchDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $searches = []; - $request = (new BatchSearchDataObjectsRequest()) - ->setParent($formattedParent) - ->setSearches($searches); - try { - $gapicClient->batchSearchDataObjects($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 queryDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataObjectsElement = new DataObject(); - $dataObjects = [ - $dataObjectsElement, - ]; - $expectedResponse = new QueryDataObjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataObjects($dataObjects); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new QueryDataObjectsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->queryDataObjects($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataObjects()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectSearchService/QueryDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new QueryDataObjectsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->queryDataObjects($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 searchDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resultsElement = new SearchResult(); - $results = [ - $resultsElement, - ]; - $expectedResponse = new SearchDataObjectsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResults($results); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new SearchDataObjectsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->searchDataObjects($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectSearchService/SearchDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new SearchDataObjectsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->searchDataObjects($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 aggregateDataObjectsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AggregateDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $aggregate = AggregationMethod::AGGREGATION_METHOD_UNSPECIFIED; - $request = (new AggregateDataObjectsRequest()) - ->setParent($formattedParent) - ->setAggregate($aggregate); - $response = $gapicClient->aggregateDataObjectsAsync($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.vectorsearch.v1.DataObjectSearchService/AggregateDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAggregate(); - $this->assertProtobufEquals($aggregate, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php deleted file mode 100644 index 4153f2fdcc4f..000000000000 --- a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/DataObjectServiceClientTest.php +++ /dev/null @@ -1,710 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DataObjectServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DataObjectServiceClient($options); - } - - /** @test */ - public function batchCreateDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchCreateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreateDataObjects($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.vectorsearch.v1.DataObjectService/BatchCreateDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchCreateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - try { - $gapicClient->batchCreateDataObjects($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 batchDeleteDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchDeleteDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $gapicClient->batchDeleteDataObjects($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectService/BatchDeleteDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchDeleteDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - try { - $gapicClient->batchDeleteDataObjects($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 batchUpdateDataObjectsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchUpdateDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchUpdateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchUpdateDataObjects($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.vectorsearch.v1.DataObjectService/BatchUpdateDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchUpdateDataObjectsExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchUpdateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - try { - $gapicClient->batchUpdateDataObjects($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 createDataObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $dataObjectId2 = 'dataObjectId21879679481'; - $etag = 'etag3123477'; - $expectedResponse = new DataObject(); - $expectedResponse->setName($name); - $expectedResponse->setDataObjectId($dataObjectId2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $dataObjectId = 'dataObjectId-806981690'; - $dataObject = new DataObject(); - $request = (new CreateDataObjectRequest()) - ->setParent($formattedParent) - ->setDataObjectId($dataObjectId) - ->setDataObject($dataObject); - $response = $gapicClient->createDataObject($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.vectorsearch.v1.DataObjectService/CreateDataObject', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataObjectId(); - $this->assertProtobufEquals($dataObjectId, $actualValue); - $actualValue = $actualRequestObject->getDataObject(); - $this->assertProtobufEquals($dataObject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataObjectExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $dataObjectId = 'dataObjectId-806981690'; - $dataObject = new DataObject(); - $request = (new CreateDataObjectRequest()) - ->setParent($formattedParent) - ->setDataObjectId($dataObjectId) - ->setDataObject($dataObject); - try { - $gapicClient->createDataObject($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 deleteDataObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); - $request = (new DeleteDataObjectRequest()) - ->setName($formattedName); - $gapicClient->deleteDataObject($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.DataObjectService/DeleteDataObject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataObjectExceptionTest() - { - $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->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); - $request = (new DeleteDataObjectRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataObject($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 getDataObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dataObjectId = 'dataObjectId-806981690'; - $etag = 'etag3123477'; - $expectedResponse = new DataObject(); - $expectedResponse->setName($name2); - $expectedResponse->setDataObjectId($dataObjectId); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); - $request = (new GetDataObjectRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataObject($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.vectorsearch.v1.DataObjectService/GetDataObject', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataObjectExceptionTest() - { - $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->dataObjectName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[DATAOBJECT]'); - $request = (new GetDataObjectRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataObject($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 updateDataObjectTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $dataObjectId = 'dataObjectId-806981690'; - $etag = 'etag3123477'; - $expectedResponse = new DataObject(); - $expectedResponse->setName($name); - $expectedResponse->setDataObjectId($dataObjectId); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $dataObject = new DataObject(); - $request = (new UpdateDataObjectRequest()) - ->setDataObject($dataObject); - $response = $gapicClient->updateDataObject($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.vectorsearch.v1.DataObjectService/UpdateDataObject', $actualFuncCall); - $actualValue = $actualRequestObject->getDataObject(); - $this->assertProtobufEquals($dataObject, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataObjectExceptionTest() - { - $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 - $dataObject = new DataObject(); - $request = (new UpdateDataObjectRequest()) - ->setDataObject($dataObject); - try { - $gapicClient->updateDataObject($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 batchCreateDataObjectsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateDataObjectsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $requests = []; - $request = (new BatchCreateDataObjectsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreateDataObjectsAsync($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.vectorsearch.v1.DataObjectService/BatchCreateDataObjects', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php b/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php deleted file mode 100644 index e78cd9f0334a..000000000000 --- a/owl-bot-staging/VectorSearch/v1/tests/Unit/V1/Client/VectorSearchServiceClientTest.php +++ /dev/null @@ -1,1599 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return VectorSearchServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new VectorSearchServiceClient($options); - } - - /** @test */ - public function createCollectionTest() - { - $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/createCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $collectionId = 'collectionId-821242276'; - $collection = new Collection(); - $request = (new CreateCollectionRequest()) - ->setParent($formattedParent) - ->setCollectionId($collectionId) - ->setCollection($collection); - $response = $gapicClient->createCollection($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.vectorsearch.v1.VectorSearchService/CreateCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualApiRequestObject->getCollection(); - $this->assertProtobufEquals($collection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCollectionTest'); - $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 createCollectionExceptionTest() - { - $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/createCollectionTest'); - $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]'); - $collectionId = 'collectionId-821242276'; - $collection = new Collection(); - $request = (new CreateCollectionRequest()) - ->setParent($formattedParent) - ->setCollectionId($collectionId) - ->setCollection($collection); - $response = $gapicClient->createCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCollectionTest'); - 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 createIndexTest() - { - $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/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $indexField = 'indexField1673840461'; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setIndexField($indexField); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $indexId = 'indexId112508840'; - $index = new Index(); - $indexIndexField = 'indexIndexField-1984372294'; - $index->setIndexField($indexIndexField); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndexId($indexId) - ->setIndex($index); - $response = $gapicClient->createIndex($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.vectorsearch.v1.VectorSearchService/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndexId(); - $this->assertProtobufEquals($indexId, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $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 createIndexExceptionTest() - { - $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/createIndexTest'); - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $indexId = 'indexId112508840'; - $index = new Index(); - $indexIndexField = 'indexIndexField-1984372294'; - $index->setIndexField($indexIndexField); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndexId($indexId) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - 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 deleteCollectionTest() - { - $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/deleteCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new DeleteCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCollection($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.vectorsearch.v1.VectorSearchService/DeleteCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); - $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 deleteCollectionExceptionTest() - { - $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/deleteCollectionTest'); - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new DeleteCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); - 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 deleteIndexTest() - { - $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/deleteIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndex($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.vectorsearch.v1.VectorSearchService/DeleteIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); - $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 deleteIndexExceptionTest() - { - $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/deleteIndexTest'); - $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->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); - 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 exportDataObjectsTest() - { - $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/exportDataObjectsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExportDataObjectsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDataObjectsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ExportDataObjectsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDataObjects($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.vectorsearch.v1.VectorSearchService/ExportDataObjects', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataObjectsTest'); - $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 exportDataObjectsExceptionTest() - { - $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/exportDataObjectsTest'); - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ExportDataObjectsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDataObjects($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataObjectsTest'); - 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 getCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new GetCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getCollection($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.vectorsearch.v1.VectorSearchService/GetCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCollectionExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new GetCollectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getCollection($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 getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $indexField = 'indexField1673840461'; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setIndexField($indexField); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndex($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.vectorsearch.v1.VectorSearchService/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $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->indexName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndex($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 importDataObjectsTest() - { - $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/importDataObjectsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDataObjectsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDataObjectsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ImportDataObjectsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDataObjects($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.vectorsearch.v1.VectorSearchService/ImportDataObjects', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataObjectsTest'); - $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 importDataObjectsExceptionTest() - { - $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/importDataObjectsTest'); - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ImportDataObjectsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDataObjects($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataObjectsTest'); - 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 listCollectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionsElement = new Collection(); - $collections = [ - $collectionsElement, - ]; - $expectedResponse = new ListCollectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollections($collections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCollectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCollections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.VectorSearchService/ListCollections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionsExceptionTest() - { - $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 ListCollectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCollections($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 listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vectorsearch.v1.VectorSearchService/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $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->collectionName('[PROJECT]', '[LOCATION]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexes($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 updateCollectionTest() - { - $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/updateCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $collection = new Collection(); - $request = (new UpdateCollectionRequest()) - ->setCollection($collection); - $response = $gapicClient->updateCollection($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.vectorsearch.v1.VectorSearchService/UpdateCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCollection(); - $this->assertProtobufEquals($collection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCollectionTest'); - $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 updateCollectionExceptionTest() - { - $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/updateCollectionTest'); - $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 - $collection = new Collection(); - $request = (new UpdateCollectionRequest()) - ->setCollection($collection); - $response = $gapicClient->updateCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateCollectionTest'); - 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 updateIndexTest() - { - $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/updateIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $indexField = 'indexField1673840461'; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setIndexField($indexField); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $index = new Index(); - $indexIndexField = 'indexIndexField-1984372294'; - $index->setIndexField($indexIndexField); - $request = (new UpdateIndexRequest()) - ->setIndex($index); - $response = $gapicClient->updateIndex($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.vectorsearch.v1.VectorSearchService/UpdateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexTest'); - $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 updateIndexExceptionTest() - { - $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/updateIndexTest'); - $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 - $index = new Index(); - $indexIndexField = 'indexIndexField-1984372294'; - $index->setIndexField($indexIndexField); - $request = (new UpdateIndexRequest()) - ->setIndex($index); - $response = $gapicClient->updateIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexTest'); - 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() - { - $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 createCollectionAsyncTest() - { - $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/createCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $collectionId = 'collectionId-821242276'; - $collection = new Collection(); - $request = (new CreateCollectionRequest()) - ->setParent($formattedParent) - ->setCollectionId($collectionId) - ->setCollection($collection); - $response = $gapicClient->createCollectionAsync($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.vectorsearch.v1.VectorSearchService/CreateCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualApiRequestObject->getCollection(); - $this->assertProtobufEquals($collection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCollectionTest'); - $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()); - } -}