From b20aa261eace803ec4577898a2160a12e7cb56a8 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Mon, 17 Nov 2025 19:03:17 +0000 Subject: [PATCH] feat(vectorsearch): add new clients PiperOrigin-RevId: 828838688 --- .librarian/state.yaml | 23 + go.work | 1 + go.work.sum | 1 + internal/generated/snippets/go.mod | 2 + .../apiv1beta/Client/CancelOperation/main.go | 51 + .../apiv1beta/Client/CreateCollection/main.go | 58 + .../apiv1beta/Client/CreateIndex/main.go | 58 + .../apiv1beta/Client/DeleteCollection/main.go | 56 + .../apiv1beta/Client/DeleteIndex/main.go | 56 + .../apiv1beta/Client/DeleteOperation/main.go | 51 + .../apiv1beta/Client/GetCollection/main.go | 53 + .../apiv1beta/Client/GetIndex/main.go | 53 + .../apiv1beta/Client/GetLocation/main.go | 53 + .../apiv1beta/Client/GetOperation/main.go | 53 + .../Client/ImportDataObjects/main.go | 58 + .../apiv1beta/Client/ListCollections/main.go | 66 + .../apiv1beta/Client/ListIndexes/main.go | 66 + .../apiv1beta/Client/ListLocations/main.go | 66 + .../apiv1beta/Client/ListOperations/main.go | 66 + .../apiv1beta/Client/UpdateCollection/main.go | 58 + .../BatchCreateDataObjects/main.go | 53 + .../BatchDeleteDataObjects/main.go | 51 + .../BatchUpdateDataObjects/main.go | 53 + .../DataObjectClient/CancelOperation/main.go | 51 + .../DataObjectClient/CreateDataObject/main.go | 53 + .../DataObjectClient/DeleteDataObject/main.go | 51 + .../DataObjectClient/DeleteOperation/main.go | 51 + .../DataObjectClient/GetDataObject/main.go | 53 + .../DataObjectClient/GetLocation/main.go | 53 + .../DataObjectClient/GetOperation/main.go | 53 + .../DataObjectClient/ListLocations/main.go | 66 + .../DataObjectClient/ListOperations/main.go | 66 + .../DataObjectClient/UpdateDataObject/main.go | 53 + .../AggregateDataObjects/main.go | 53 + .../BatchSearchDataObjects/main.go | 53 + .../CancelOperation/main.go | 51 + .../DeleteOperation/main.go | 51 + .../GetLocation/main.go | 53 + .../GetOperation/main.go | 53 + .../ListLocations/main.go | 66 + .../ListOperations/main.go | 66 + .../QueryDataObjects/main.go | 66 + .../SearchDataObjects/main.go | 66 + ...data.google.cloud.vectorsearch.v1beta.json | 1801 +++++++++++++ vectorsearch/CHANGES.md | 1 + vectorsearch/README.md | 55 + vectorsearch/apiv1beta/.repo-metadata.json | 10 + vectorsearch/apiv1beta/auxiliary.go | 673 +++++ vectorsearch/apiv1beta/auxiliary_go123.go | 64 + vectorsearch/apiv1beta/data_object_client.go | 1411 ++++++++++ .../data_object_client_example_go123_test.go | 79 + .../data_object_client_example_test.go | 402 +++ .../apiv1beta/data_object_search_client.go | 1341 ++++++++++ ...object_search_client_example_go123_test.go | 132 + .../data_object_search_client_example_test.go | 355 +++ vectorsearch/apiv1beta/doc.go | 93 + vectorsearch/apiv1beta/gapic_metadata.json | 441 ++++ vectorsearch/apiv1beta/helpers.go | 105 + .../apiv1beta/vector_search_client.go | 2108 +++++++++++++++ ...vector_search_client_example_go123_test.go | 132 + .../vector_search_client_example_test.go | 531 ++++ .../apiv1beta/vectorsearchpb/common.pb.go | 163 ++ .../vectorsearchpb/data_object.pb.go | 490 ++++ .../data_object_search_service.pb.go | 2260 ++++++++++++++++ .../data_object_search_service_grpc.pb.go | 241 ++ .../vectorsearchpb/data_object_service.pb.go | 844 ++++++ .../data_object_service_grpc.pb.go | 359 +++ .../vectorsearchpb/embedding_config.pb.go | 286 +++ .../vectorsearchpb/vectorsearch_service.pb.go | 2264 +++++++++++++++++ .../vectorsearch_service_grpc.pb.go | 476 ++++ vectorsearch/apiv1beta/version.go | 23 + vectorsearch/go.mod | 39 + vectorsearch/go.sum | 90 + vectorsearch/internal/version.go | 20 + 74 files changed, 19523 insertions(+) create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/CancelOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateCollection/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateIndex/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteCollection/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteIndex/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/GetCollection/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/GetIndex/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/GetLocation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/GetOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/ImportDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/ListCollections/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/ListIndexes/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/ListLocations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/ListOperations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/Client/UpdateCollection/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchCreateDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchDeleteDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchUpdateDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CancelOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CreateDataObject/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteDataObject/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetDataObject/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetLocation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListLocations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListOperations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/UpdateDataObject/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/AggregateDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/BatchSearchDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/CancelOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/DeleteOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetLocation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetOperation/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListLocations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListOperations/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/QueryDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/SearchDataObjects/main.go create mode 100644 internal/generated/snippets/vectorsearch/apiv1beta/snippet_metadata.google.cloud.vectorsearch.v1beta.json create mode 100644 vectorsearch/CHANGES.md create mode 100644 vectorsearch/README.md create mode 100644 vectorsearch/apiv1beta/.repo-metadata.json create mode 100644 vectorsearch/apiv1beta/auxiliary.go create mode 100644 vectorsearch/apiv1beta/auxiliary_go123.go create mode 100644 vectorsearch/apiv1beta/data_object_client.go create mode 100644 vectorsearch/apiv1beta/data_object_client_example_go123_test.go create mode 100644 vectorsearch/apiv1beta/data_object_client_example_test.go create mode 100644 vectorsearch/apiv1beta/data_object_search_client.go create mode 100644 vectorsearch/apiv1beta/data_object_search_client_example_go123_test.go create mode 100644 vectorsearch/apiv1beta/data_object_search_client_example_test.go create mode 100644 vectorsearch/apiv1beta/doc.go create mode 100644 vectorsearch/apiv1beta/gapic_metadata.json create mode 100644 vectorsearch/apiv1beta/helpers.go create mode 100644 vectorsearch/apiv1beta/vector_search_client.go create mode 100644 vectorsearch/apiv1beta/vector_search_client_example_go123_test.go create mode 100644 vectorsearch/apiv1beta/vector_search_client_example_test.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/common.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/data_object.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service_grpc.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/data_object_service.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/data_object_service_grpc.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/embedding_config.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service.pb.go create mode 100644 vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service_grpc.pb.go create mode 100644 vectorsearch/apiv1beta/version.go create mode 100644 vectorsearch/go.mod create mode 100644 vectorsearch/go.sum create mode 100644 vectorsearch/internal/version.go diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 0b19c818a279..7b5de66a3e19 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -6043,6 +6043,29 @@ libraries: release_exclude_paths: - internal/generated/snippets/translate/ tag_format: '{id}/v{version}' + - id: vectorsearch + version: 0.0.0 + last_generated_commit: 7c0dcbba70fc5dd64655a77e74dbbf8aaf04c1bf + apis: + - path: google/cloud/vectorsearch/v1beta + service_config: vectorsearch_v1beta.yaml + source_roots: + - vectorsearch + - internal/generated/snippets/vectorsearch + preserve_regex: [] + remove_regex: + - ^internal/generated/snippets/vectorsearch/ + - ^vectorsearch/apiv1beta/[^/]*_client\.go$ + - ^vectorsearch/apiv1beta/[^/]*_client_example_go123_test\.go$ + - ^vectorsearch/apiv1beta/[^/]*_client_example_test\.go$ + - ^vectorsearch/apiv1beta/auxiliary\.go$ + - ^vectorsearch/apiv1beta/auxiliary_go123\.go$ + - ^vectorsearch/apiv1beta/doc\.go$ + - ^vectorsearch/apiv1beta/gapic_metadata\.json$ + - ^vectorsearch/apiv1beta/helpers\.go$ + - ^vectorsearch/apiv1beta/\.repo-metadata\.json$ + - ^vectorsearch/apiv1beta/vectorsearchpb/.*$ + tag_format: '{id}/v{version}' - id: vertexai version: 0.15.0 last_generated_commit: e8365a7f88fabe8717cb8322b8ce784b03b6daea diff --git a/go.work b/go.work index e80697eee797..3f988ec2a56a 100644 --- a/go.work +++ b/go.work @@ -186,6 +186,7 @@ use ( ./tpu ./trace ./translate + ./vectorsearch ./vertexai ./video ./videointelligence diff --git a/go.work.sum b/go.work.sum index 5a95bb6f5815..45069cc6fa69 100644 --- a/go.work.sum +++ b/go.work.sum @@ -240,6 +240,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7/go. google.golang.org/genproto/googleapis/api v0.0.0-20250826171959-ef028d996bc1/go.mod h1:xUjFWUnWDpZ/C0Gu0qloASKFb6f8/QXiiXhSPFsD668= google.golang.org/genproto/googleapis/api v0.0.0-20250908214217-97024824d090/go.mod h1:U8EXRNSd8sUYyDfs/It7KVWodQr+Hf9xtxyxWudSwEw= google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/api v0.0.0-20251103181224-f26f9409b101/go.mod h1:E17fc4PDhkr22dE3RgnH2hEubUaky6ZwW4VhANxyspg= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240102182953-50ed04b92917/go.mod h1:O9TvT7A9NLgdqqF0JJXJ+axpaoYiEb8txGmkvy+AvLc= google.golang.org/genproto/googleapis/bytestream v0.0.0-20240513163218-0867130af1f8/go.mod h1:RCpt0+3mpEDPldc32vXBM8ADXlFL95T8Chxx0nv0/zE= diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 0f19827d3c98..7736b98b9724 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -574,3 +574,5 @@ replace cloud.google.com/go/locationfinder => ../../../locationfinder replace cloud.google.com/go/gkerecommender => ../../../gkerecommender replace cloud.google.com/go/saasplatform => ../../../saasplatform + +replace cloud.google.com/go/vectorsearch => ../../../vectorsearch diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/CancelOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CancelOperation/main.go new file mode 100644 index 000000000000..8c17f07c8b7d --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_CancelOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_CancelOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateCollection/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateCollection/main.go new file mode 100644 index 000000000000..1d2e26332c76 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateCollection/main.go @@ -0,0 +1,58 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_CreateCollection_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateCollectionRequest. + } + op, err := c.CreateCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_CreateCollection_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateIndex/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateIndex/main.go new file mode 100644 index 000000000000..33023ac1537e --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/CreateIndex/main.go @@ -0,0 +1,58 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_CreateIndex_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateIndexRequest. + } + op, err := c.CreateIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_CreateIndex_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteCollection/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteCollection/main.go new file mode 100644 index 000000000000..079d9c105b4c --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteCollection/main.go @@ -0,0 +1,56 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_DeleteCollection_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteCollectionRequest. + } + op, err := c.DeleteCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_DeleteCollection_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteIndex/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteIndex/main.go new file mode 100644 index 000000000000..edbfbbd8bbe5 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteIndex/main.go @@ -0,0 +1,56 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_DeleteIndex_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteIndexRequest. + } + op, err := c.DeleteIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_DeleteIndex_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..d974971492d8 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/DeleteOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_DeleteOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_DeleteOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetCollection/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetCollection/main.go new file mode 100644 index 000000000000..973182c0198c --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetCollection/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_GetCollection_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetCollectionRequest. + } + resp, err := c.GetCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_GetCollection_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetIndex/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetIndex/main.go new file mode 100644 index 000000000000..ce14c1fed7ab --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetIndex/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_GetIndex_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetIndexRequest. + } + resp, err := c.GetIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_GetIndex_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetLocation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetLocation/main.go new file mode 100644 index 000000000000..fc56c51d5ae6 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_GetLocation_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_GetLocation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetOperation/main.go new file mode 100644 index 000000000000..4b899c4d56c1 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_GetOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_GetOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/ImportDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ImportDataObjects/main.go new file mode 100644 index 000000000000..06950d5a0eed --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ImportDataObjects/main.go @@ -0,0 +1,58 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_ImportDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ImportDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ImportDataObjectsRequest. + } + op, err := c.ImportDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_ImportDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListCollections/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListCollections/main.go new file mode 100644 index 000000000000..00236c9e9dfb --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListCollections/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_ListCollections_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListCollectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListCollectionsRequest. + } + it := c.ListCollections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.ListCollectionsResponse) + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_ListCollections_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListIndexes/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListIndexes/main.go new file mode 100644 index 000000000000..e576a35ce5f2 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListIndexes/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_ListIndexes_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListIndexesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListIndexesRequest. + } + it := c.ListIndexes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.ListIndexesResponse) + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_ListIndexes_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListLocations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListLocations/main.go new file mode 100644 index 000000000000..acd0d5eb2ea8 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_ListLocations_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_ListLocations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListOperations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListOperations/main.go new file mode 100644 index 000000000000..6c7f1d9b6eb6 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/ListOperations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_ListOperations_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_ListOperations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/Client/UpdateCollection/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/Client/UpdateCollection/main.go new file mode 100644 index 000000000000..efe17d6f3b21 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/Client/UpdateCollection/main.go @@ -0,0 +1,58 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_VectorSearchService_UpdateCollection_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.UpdateCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#UpdateCollectionRequest. + } + op, err := c.UpdateCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_VectorSearchService_UpdateCollection_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchCreateDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchCreateDataObjects/main.go new file mode 100644 index 000000000000..475d83b64fd7 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchCreateDataObjects/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_BatchCreateDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchCreateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchCreateDataObjectsRequest. + } + resp, err := c.BatchCreateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_BatchCreateDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchDeleteDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchDeleteDataObjects/main.go new file mode 100644 index 000000000000..720a4fd565e3 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchDeleteDataObjects/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_BatchDeleteDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchDeleteDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchDeleteDataObjectsRequest. + } + err = c.BatchDeleteDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_BatchDeleteDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchUpdateDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchUpdateDataObjects/main.go new file mode 100644 index 000000000000..534f33390fd9 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/BatchUpdateDataObjects/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_BatchUpdateDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchUpdateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchUpdateDataObjectsRequest. + } + resp, err := c.BatchUpdateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_BatchUpdateDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CancelOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CancelOperation/main.go new file mode 100644 index 000000000000..a07dbb81f578 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_CancelOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_CancelOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CreateDataObject/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CreateDataObject/main.go new file mode 100644 index 000000000000..fc8b33157194 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/CreateDataObject/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_CreateDataObject_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateDataObjectRequest. + } + resp, err := c.CreateDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_CreateDataObject_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteDataObject/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteDataObject/main.go new file mode 100644 index 000000000000..c5d94db3a99e --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteDataObject/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_DeleteDataObject_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteDataObjectRequest. + } + err = c.DeleteDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_DeleteDataObject_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteOperation/main.go new file mode 100644 index 000000000000..d4d47d41afc0 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/DeleteOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_DeleteOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_DeleteOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetDataObject/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetDataObject/main.go new file mode 100644 index 000000000000..82e8c5b39481 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetDataObject/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_GetDataObject_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetDataObjectRequest. + } + resp, err := c.GetDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_GetDataObject_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetLocation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetLocation/main.go new file mode 100644 index 000000000000..e550fef044bf --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_GetLocation_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_GetLocation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetOperation/main.go new file mode 100644 index 000000000000..6f12181342d6 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_GetOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_GetOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListLocations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListLocations/main.go new file mode 100644 index 000000000000..0bed387b60cf --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_ListLocations_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_ListLocations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListOperations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListOperations/main.go new file mode 100644 index 000000000000..708b566a4c6a --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/ListOperations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_ListOperations_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectService_ListOperations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/UpdateDataObject/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/UpdateDataObject/main.go new file mode 100644 index 000000000000..38fe2fc83698 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectClient/UpdateDataObject/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectService_UpdateDataObject_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.UpdateDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#UpdateDataObjectRequest. + } + resp, err := c.UpdateDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectService_UpdateDataObject_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/AggregateDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/AggregateDataObjects/main.go new file mode 100644 index 000000000000..e6275dbdafa6 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/AggregateDataObjects/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_AggregateDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.AggregateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#AggregateDataObjectsRequest. + } + resp, err := c.AggregateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_AggregateDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/BatchSearchDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/BatchSearchDataObjects/main.go new file mode 100644 index 000000000000..531392f741fc --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/BatchSearchDataObjects/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_BatchSearchDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchSearchDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchSearchDataObjectsRequest. + } + resp, err := c.BatchSearchDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_BatchSearchDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/CancelOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/CancelOperation/main.go new file mode 100644 index 000000000000..7f8e61e70703 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_CancelOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_CancelOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/DeleteOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/DeleteOperation/main.go new file mode 100644 index 000000000000..0373fb2605ce --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/DeleteOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_DeleteOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_DeleteOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetLocation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetLocation/main.go new file mode 100644 index 000000000000..27f946910f0f --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_GetLocation_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_GetLocation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetOperation/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetOperation/main.go new file mode 100644 index 000000000000..19d71f5dd363 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_GetOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_GetOperation_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListLocations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListLocations/main.go new file mode 100644 index 000000000000..f6b8b4df24ab --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_ListLocations_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_ListLocations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListOperations/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListOperations/main.go new file mode 100644 index 000000000000..0edf29724020 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/ListOperations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_ListOperations_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_ListOperations_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/QueryDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/QueryDataObjects/main.go new file mode 100644 index 000000000000..880559478f4b --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/QueryDataObjects/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_QueryDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.QueryDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#QueryDataObjectsRequest. + } + it := c.QueryDataObjects(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.QueryDataObjectsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_QueryDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/SearchDataObjects/main.go b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/SearchDataObjects/main.go new file mode 100644 index 000000000000..0e5d10c4ce37 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/DataObjectSearchClient/SearchDataObjects/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START vectorsearch_v1beta_generated_DataObjectSearchService_SearchDataObjects_sync] + +package main + +import ( + "context" + + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.SearchDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#SearchDataObjectsRequest. + } + it := c.SearchDataObjects(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.SearchDataObjectsResponse) + } +} + +// [END vectorsearch_v1beta_generated_DataObjectSearchService_SearchDataObjects_sync] diff --git a/internal/generated/snippets/vectorsearch/apiv1beta/snippet_metadata.google.cloud.vectorsearch.v1beta.json b/internal/generated/snippets/vectorsearch/apiv1beta/snippet_metadata.google.cloud.vectorsearch.v1beta.json new file mode 100644 index 000000000000..d7181f0ab333 --- /dev/null +++ b/internal/generated/snippets/vectorsearch/apiv1beta/snippet_metadata.google.cloud.vectorsearch.v1beta.json @@ -0,0 +1,1801 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/vectorsearch/apiv1beta", + "version": "0.0.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.vectorsearch.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_AggregateDataObjects_sync", + "title": "vectorsearch AggregateDataObjects Sample", + "description": "AggregateDataObjects aggregates data objects.", + "file": "DataObjectSearchClient/AggregateDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "AggregateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.AggregateDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.AggregateDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.AggregateDataObjectsResponse", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "AggregateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects", + "service": { + "shortName": "DataObjectSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_BatchSearchDataObjects_sync", + "title": "vectorsearch BatchSearchDataObjects Sample", + "description": "BatchSearchDataObjects batch searches data objects.", + "file": "DataObjectSearchClient/BatchSearchDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "BatchSearchDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.BatchSearchDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.BatchSearchDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.BatchSearchDataObjectsResponse", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "BatchSearchDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService.BatchSearchDataObjects", + "service": { + "shortName": "DataObjectSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_CancelOperation_sync", + "title": "vectorsearch CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectSearchClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_DeleteOperation_sync", + "title": "vectorsearch DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectSearchClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.longrunning.Operations.DeleteOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_GetLocation_sync", + "title": "vectorsearch GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "DataObjectSearchClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_GetOperation_sync", + "title": "vectorsearch GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectSearchClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_ListLocations_sync", + "title": "vectorsearch ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "DataObjectSearchClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_ListOperations_sync", + "title": "vectorsearch ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "DataObjectSearchClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_QueryDataObjects_sync", + "title": "vectorsearch QueryDataObjects Sample", + "description": "QueryDataObjects queries data objects.", + "file": "DataObjectSearchClient/QueryDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "QueryDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.QueryDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.QueryDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DataObjectIterator", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "QueryDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects", + "service": { + "shortName": "DataObjectSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectSearchService_SearchDataObjects_sync", + "title": "vectorsearch SearchDataObjects Sample", + "description": "SearchDataObjects searches data objects.", + "file": "DataObjectSearchClient/SearchDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SearchDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient.SearchDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.SearchDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "SearchResultIterator", + "client": { + "shortName": "DataObjectSearchClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchClient" + }, + "method": { + "shortName": "SearchDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects", + "service": { + "shortName": "DataObjectSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_BatchCreateDataObjects_sync", + "title": "vectorsearch BatchCreateDataObjects Sample", + "description": "BatchCreateDataObjects creates a batch of dataObjects.", + "file": "DataObjectClient/BatchCreateDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "BatchCreateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.BatchCreateDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.BatchCreateDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.BatchCreateDataObjectsResponse", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "BatchCreateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_BatchDeleteDataObjects_sync", + "title": "vectorsearch BatchDeleteDataObjects Sample", + "description": "BatchDeleteDataObjects deletes dataObjects in a batch.", + "file": "DataObjectClient/BatchDeleteDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "BatchDeleteDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.BatchDeleteDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.BatchDeleteDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "BatchDeleteDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.BatchDeleteDataObjects", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_BatchUpdateDataObjects_sync", + "title": "vectorsearch BatchUpdateDataObjects Sample", + "description": "BatchUpdateDataObjects updates dataObjects in a batch.", + "file": "DataObjectClient/BatchUpdateDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "BatchUpdateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.BatchUpdateDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.BatchUpdateDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.BatchUpdateDataObjectsResponse", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "BatchUpdateDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_CancelOperation_sync", + "title": "vectorsearch CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_CreateDataObject_sync", + "title": "vectorsearch CreateDataObject Sample", + "description": "CreateDataObject creates a dataObject.", + "file": "DataObjectClient/CreateDataObject/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.CreateDataObject", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.CreateDataObjectRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.DataObject", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "CreateDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.CreateDataObject", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_DeleteDataObject_sync", + "title": "vectorsearch DeleteDataObject Sample", + "description": "DeleteDataObject deletes a dataObject.", + "file": "DataObjectClient/DeleteDataObject/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.DeleteDataObject", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.DeleteDataObjectRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "DeleteDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.DeleteDataObject", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_DeleteOperation_sync", + "title": "vectorsearch DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.longrunning.Operations.DeleteOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_GetDataObject_sync", + "title": "vectorsearch GetDataObject Sample", + "description": "GetDataObject gets a data object.", + "file": "DataObjectClient/GetDataObject/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.GetDataObject", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.GetDataObjectRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.DataObject", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "GetDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.GetDataObject", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_GetLocation_sync", + "title": "vectorsearch GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "DataObjectClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_GetOperation_sync", + "title": "vectorsearch GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "DataObjectClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_ListLocations_sync", + "title": "vectorsearch ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "DataObjectClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_ListOperations_sync", + "title": "vectorsearch ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "DataObjectClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_DataObjectService_UpdateDataObject_sync", + "title": "vectorsearch UpdateDataObject Sample", + "description": "UpdateDataObject updates a dataObject.", + "file": "DataObjectClient/UpdateDataObject/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient.UpdateDataObject", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.UpdateDataObjectRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.DataObject", + "client": { + "shortName": "DataObjectClient", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectClient" + }, + "method": { + "shortName": "UpdateDataObject", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService.UpdateDataObject", + "service": { + "shortName": "DataObjectService", + "fullName": "google.cloud.vectorsearch.v1beta.DataObjectService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_CancelOperation_sync", + "title": "vectorsearch CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.vectorsearch.v1beta.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_CreateCollection_sync", + "title": "vectorsearch CreateCollection Sample", + "description": "CreateCollection creates a new Collection in a given project and location.", + "file": "Client/CreateCollection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateCollection", + "fullName": "google.cloud.vectorsearch.v1beta.Client.CreateCollection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.CreateCollectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateCollectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "CreateCollection", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.CreateCollection", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_CreateIndex_sync", + "title": "vectorsearch CreateIndex Sample", + "description": "CreateIndex creates a new Index in a given project and location.", + "file": "Client/CreateIndex/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateIndex", + "fullName": "google.cloud.vectorsearch.v1beta.Client.CreateIndex", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.CreateIndexRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateIndexOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "CreateIndex", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.CreateIndex", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_DeleteCollection_sync", + "title": "vectorsearch DeleteCollection Sample", + "description": "DeleteCollection deletes a single Collection.", + "file": "Client/DeleteCollection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteCollection", + "fullName": "google.cloud.vectorsearch.v1beta.Client.DeleteCollection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.DeleteCollectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteCollectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "DeleteCollection", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteCollection", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 56, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_DeleteIndex_sync", + "title": "vectorsearch DeleteIndex Sample", + "description": "DeleteIndex deletes a single Index.", + "file": "Client/DeleteIndex/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteIndex", + "fullName": "google.cloud.vectorsearch.v1beta.Client.DeleteIndex", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.DeleteIndexRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteIndexOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "DeleteIndex", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteIndex", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 56, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_DeleteOperation_sync", + "title": "vectorsearch DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.vectorsearch.v1beta.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.longrunning.Operations.DeleteOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_GetCollection_sync", + "title": "vectorsearch GetCollection Sample", + "description": "GetCollection gets details of a single Collection.", + "file": "Client/GetCollection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetCollection", + "fullName": "google.cloud.vectorsearch.v1beta.Client.GetCollection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.GetCollectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.Collection", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "GetCollection", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.GetCollection", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_GetIndex_sync", + "title": "vectorsearch GetIndex Sample", + "description": "GetIndex gets details of a single Index.", + "file": "Client/GetIndex/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIndex", + "fullName": "google.cloud.vectorsearch.v1beta.Client.GetIndex", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.GetIndexRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*vectorsearchpb.Index", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "GetIndex", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.GetIndex", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_GetLocation_sync", + "title": "vectorsearch GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.vectorsearch.v1beta.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_GetOperation_sync", + "title": "vectorsearch GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.vectorsearch.v1beta.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_ImportDataObjects_sync", + "title": "vectorsearch ImportDataObjects Sample", + "description": "ImportDataObjects initiates a Long-Running Operation to import DataObjects into a Collection.", + "file": "Client/ImportDataObjects/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ImportDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.Client.ImportDataObjects", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.ImportDataObjectsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ImportDataObjectsOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "ImportDataObjects", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.ImportDataObjects", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_ListCollections_sync", + "title": "vectorsearch ListCollections Sample", + "description": "ListCollections lists Collections in a given project and location.", + "file": "Client/ListCollections/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListCollections", + "fullName": "google.cloud.vectorsearch.v1beta.Client.ListCollections", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.ListCollectionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CollectionIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "ListCollections", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.ListCollections", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_ListIndexes_sync", + "title": "vectorsearch ListIndexes Sample", + "description": "ListIndexes lists Indexes in a given project and location.", + "file": "Client/ListIndexes/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListIndexes", + "fullName": "google.cloud.vectorsearch.v1beta.Client.ListIndexes", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.ListIndexesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "IndexIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "ListIndexes", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.ListIndexes", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_ListLocations_sync", + "title": "vectorsearch ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.vectorsearch.v1beta.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_ListOperations_sync", + "title": "vectorsearch ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.vectorsearch.v1beta.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "vectorsearch_v1beta_generated_VectorSearchService_UpdateCollection_sync", + "title": "vectorsearch UpdateCollection Sample", + "description": "UpdateCollection updates the parameters of a single Collection.", + "file": "Client/UpdateCollection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateCollection", + "fullName": "google.cloud.vectorsearch.v1beta.Client.UpdateCollection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "vectorsearchpb.UpdateCollectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateCollectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.vectorsearch.v1beta.Client" + }, + "method": { + "shortName": "UpdateCollection", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService.UpdateCollection", + "service": { + "shortName": "VectorSearchService", + "fullName": "google.cloud.vectorsearch.v1beta.VectorSearchService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/vectorsearch/CHANGES.md b/vectorsearch/CHANGES.md new file mode 100644 index 000000000000..b671f0bbcdd2 --- /dev/null +++ b/vectorsearch/CHANGES.md @@ -0,0 +1 @@ +# Changes diff --git a/vectorsearch/README.md b/vectorsearch/README.md new file mode 100644 index 000000000000..50035d972640 --- /dev/null +++ b/vectorsearch/README.md @@ -0,0 +1,55 @@ +# Vector Search API + +[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/vectorsearch.svg)](https://pkg.go.dev/cloud.google.com/go/vectorsearch) + +Go Client Library for Vector Search API. + +## Install + +```bash +go get cloud.google.com/go/vectorsearch +``` + +## Stability + +The stability of this module is indicated by SemVer. + +However, a `v1+` module may have breaking changes in two scenarios: + +* Packages with `alpha` or `beta` in the import path +* The GoDoc has an explicit stability disclaimer (for example, for an experimental feature). + +### Which package to use? + +Generated client library surfaces can be found in packages who's import path +ends in `.../apivXXX`. The `XXX` could be something like `1` or `2` in the case +of a stable service backend or may be like `1beta2` or `2beta` in the case of a +more experimental service backend. Because of this fact, a given module can have +multiple clients for different service backends. In these cases it is generally +recommend to use clients with stable service backends, with import suffixes like +`apiv1`, unless you need to use features that are only present in a beta backend +or there is not yet a stable backend available. + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples?l=go). + +## Go Version Support + +See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) +section in the root directory's README. + +## Authorization + +See the [Authorization](https://github.com/googleapis/google-cloud-go#authorization) +section in the root directory's README. + +## Contributing + +Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) +document for details. + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. See +[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) +for more information. diff --git a/vectorsearch/apiv1beta/.repo-metadata.json b/vectorsearch/apiv1beta/.repo-metadata.json new file mode 100644 index 000000000000..d51ddfbe4cd1 --- /dev/null +++ b/vectorsearch/apiv1beta/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "vectorsearch", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/vectorsearch/latest/apiv1beta", + "client_library_type": "generated", + "description": "Vector Search API", + "distribution_name": "cloud.google.com/go/vectorsearch/apiv1beta", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "preview" +} diff --git a/vectorsearch/apiv1beta/auxiliary.go b/vectorsearch/apiv1beta/auxiliary.go new file mode 100644 index 000000000000..a3a9997f0e65 --- /dev/null +++ b/vectorsearch/apiv1beta/auxiliary.go @@ -0,0 +1,673 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch + +import ( + "context" + "time" + + "cloud.google.com/go/longrunning" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// CreateCollectionOperation manages a long-running operation from CreateCollection. +type CreateCollectionOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Collection + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Collection + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateCollectionOperation) Metadata() (*vectorsearchpb.OperationMetadata, error) { + var meta vectorsearchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateCollectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateCollectionOperation) Name() string { + return op.lro.Name() +} + +// CreateIndexOperation manages a long-running operation from CreateIndex. +type CreateIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Index + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Index, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Index + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateIndexOperation) Metadata() (*vectorsearchpb.OperationMetadata, error) { + var meta vectorsearchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateIndexOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateIndexOperation) Name() string { + return op.lro.Name() +} + +// DeleteCollectionOperation manages a long-running operation from DeleteCollection. +type DeleteCollectionOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteCollectionOperation) Metadata() (*vectorsearchpb.OperationMetadata, error) { + var meta vectorsearchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteCollectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteCollectionOperation) Name() string { + return op.lro.Name() +} + +// DeleteIndexOperation manages a long-running operation from DeleteIndex. +type DeleteIndexOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteIndexOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteIndexOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteIndexOperation) Metadata() (*vectorsearchpb.OperationMetadata, error) { + var meta vectorsearchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteIndexOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteIndexOperation) Name() string { + return op.lro.Name() +} + +// ImportDataObjectsOperation manages a long-running operation from ImportDataObjects. +type ImportDataObjectsOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ImportDataObjectsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.ImportDataObjectsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.ImportDataObjectsResponse + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ImportDataObjectsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.ImportDataObjectsResponse, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.ImportDataObjectsResponse + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ImportDataObjectsOperation) Metadata() (*vectorsearchpb.ImportDataObjectsMetadata, error) { + var meta vectorsearchpb.ImportDataObjectsMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ImportDataObjectsOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ImportDataObjectsOperation) Name() string { + return op.lro.Name() +} + +// UpdateCollectionOperation manages a long-running operation from UpdateCollection. +type UpdateCollectionOperation struct { + lro *longrunning.Operation + pollPath string +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateCollectionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Collection + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateCollectionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp vectorsearchpb.Collection + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateCollectionOperation) Metadata() (*vectorsearchpb.OperationMetadata, error) { + var meta vectorsearchpb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateCollectionOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateCollectionOperation) Name() string { + return op.lro.Name() +} + +// CollectionIterator manages a stream of *vectorsearchpb.Collection. +type CollectionIterator struct { + items []*vectorsearchpb.Collection + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*vectorsearchpb.Collection, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *CollectionIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *CollectionIterator) Next() (*vectorsearchpb.Collection, error) { + var item *vectorsearchpb.Collection + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *CollectionIterator) bufLen() int { + return len(it.items) +} + +func (it *CollectionIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// DataObjectIterator manages a stream of *vectorsearchpb.DataObject. +type DataObjectIterator struct { + items []*vectorsearchpb.DataObject + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*vectorsearchpb.DataObject, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *DataObjectIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *DataObjectIterator) Next() (*vectorsearchpb.DataObject, error) { + var item *vectorsearchpb.DataObject + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *DataObjectIterator) bufLen() int { + return len(it.items) +} + +func (it *DataObjectIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// IndexIterator manages a stream of *vectorsearchpb.Index. +type IndexIterator struct { + items []*vectorsearchpb.Index + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*vectorsearchpb.Index, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *IndexIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *IndexIterator) Next() (*vectorsearchpb.Index, error) { + var item *vectorsearchpb.Index + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *IndexIterator) bufLen() int { + return len(it.items) +} + +func (it *IndexIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *OperationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// SearchResultIterator manages a stream of *vectorsearchpb.SearchResult. +type SearchResultIterator struct { + items []*vectorsearchpb.SearchResult + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*vectorsearchpb.SearchResult, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *SearchResultIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *SearchResultIterator) Next() (*vectorsearchpb.SearchResult, error) { + var item *vectorsearchpb.SearchResult + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *SearchResultIterator) bufLen() int { + return len(it.items) +} + +func (it *SearchResultIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/vectorsearch/apiv1beta/auxiliary_go123.go b/vectorsearch/apiv1beta/auxiliary_go123.go new file mode 100644 index 000000000000..e6fb16630ba2 --- /dev/null +++ b/vectorsearch/apiv1beta/auxiliary_go123.go @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package vectorsearch + +import ( + "iter" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "github.com/googleapis/gax-go/v2/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *CollectionIterator) All() iter.Seq2[*vectorsearchpb.Collection, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *DataObjectIterator) All() iter.Seq2[*vectorsearchpb.DataObject, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *IndexIterator) All() iter.Seq2[*vectorsearchpb.Index, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *SearchResultIterator) All() iter.Seq2[*vectorsearchpb.SearchResult, error] { + return iterator.RangeAdapter(it.Next) +} diff --git a/vectorsearch/apiv1beta/data_object_client.go b/vectorsearch/apiv1beta/data_object_client.go new file mode 100644 index 000000000000..3e0870590ec3 --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_client.go @@ -0,0 +1,1411 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch + +import ( + "bytes" + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + "time" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newDataObjectClientHook clientHook + +// DataObjectCallOptions contains the retry settings for each method of DataObjectClient. +type DataObjectCallOptions struct { + CreateDataObject []gax.CallOption + BatchCreateDataObjects []gax.CallOption + GetDataObject []gax.CallOption + UpdateDataObject []gax.CallOption + BatchUpdateDataObjects []gax.CallOption + DeleteDataObject []gax.CallOption + BatchDeleteDataObjects []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultDataObjectGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("vectorsearch.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("vectorsearch.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("vectorsearch.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultDataObjectCallOptions() *DataObjectCallOptions { + return &DataObjectCallOptions{ + CreateDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchCreateDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + }, + GetDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchUpdateDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchDeleteDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultDataObjectRESTCallOptions() *DataObjectCallOptions { + return &DataObjectCallOptions{ + CreateDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchCreateDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + }, + GetDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpdateDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchUpdateDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteDataObject: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + BatchDeleteDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalDataObjectClient is an interface that defines the methods available from Vector Search API. +type internalDataObjectClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateDataObject(context.Context, *vectorsearchpb.CreateDataObjectRequest, ...gax.CallOption) (*vectorsearchpb.DataObject, error) + BatchCreateDataObjects(context.Context, *vectorsearchpb.BatchCreateDataObjectsRequest, ...gax.CallOption) (*vectorsearchpb.BatchCreateDataObjectsResponse, error) + GetDataObject(context.Context, *vectorsearchpb.GetDataObjectRequest, ...gax.CallOption) (*vectorsearchpb.DataObject, error) + UpdateDataObject(context.Context, *vectorsearchpb.UpdateDataObjectRequest, ...gax.CallOption) (*vectorsearchpb.DataObject, error) + BatchUpdateDataObjects(context.Context, *vectorsearchpb.BatchUpdateDataObjectsRequest, ...gax.CallOption) (*vectorsearchpb.BatchUpdateDataObjectsResponse, error) + DeleteDataObject(context.Context, *vectorsearchpb.DeleteDataObjectRequest, ...gax.CallOption) error + BatchDeleteDataObjects(context.Context, *vectorsearchpb.BatchDeleteDataObjectsRequest, ...gax.CallOption) error + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// DataObjectClient is a client for interacting with Vector Search API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for creating and managing data objects. +type DataObjectClient struct { + // The internal transport-dependent client. + internalClient internalDataObjectClient + + // The call options for this service. + CallOptions *DataObjectCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *DataObjectClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *DataObjectClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *DataObjectClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateDataObject creates a dataObject. +func (c *DataObjectClient) CreateDataObject(ctx context.Context, req *vectorsearchpb.CreateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + return c.internalClient.CreateDataObject(ctx, req, opts...) +} + +// BatchCreateDataObjects creates a batch of dataObjects. +func (c *DataObjectClient) BatchCreateDataObjects(ctx context.Context, req *vectorsearchpb.BatchCreateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchCreateDataObjectsResponse, error) { + return c.internalClient.BatchCreateDataObjects(ctx, req, opts...) +} + +// GetDataObject gets a data object. +func (c *DataObjectClient) GetDataObject(ctx context.Context, req *vectorsearchpb.GetDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + return c.internalClient.GetDataObject(ctx, req, opts...) +} + +// UpdateDataObject updates a dataObject. +func (c *DataObjectClient) UpdateDataObject(ctx context.Context, req *vectorsearchpb.UpdateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + return c.internalClient.UpdateDataObject(ctx, req, opts...) +} + +// BatchUpdateDataObjects updates dataObjects in a batch. +func (c *DataObjectClient) BatchUpdateDataObjects(ctx context.Context, req *vectorsearchpb.BatchUpdateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchUpdateDataObjectsResponse, error) { + return c.internalClient.BatchUpdateDataObjects(ctx, req, opts...) +} + +// DeleteDataObject deletes a dataObject. +func (c *DataObjectClient) DeleteDataObject(ctx context.Context, req *vectorsearchpb.DeleteDataObjectRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteDataObject(ctx, req, opts...) +} + +// BatchDeleteDataObjects deletes dataObjects in a batch. +func (c *DataObjectClient) BatchDeleteDataObjects(ctx context.Context, req *vectorsearchpb.BatchDeleteDataObjectsRequest, opts ...gax.CallOption) error { + return c.internalClient.BatchDeleteDataObjects(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *DataObjectClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DataObjectClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *DataObjectClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// dataObjectGRPCClient is a client for interacting with Vector Search API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type dataObjectGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing DataObjectClient + CallOptions **DataObjectCallOptions + + // The gRPC API client. + dataObjectClient vectorsearchpb.DataObjectServiceClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewDataObjectClient creates a new data object service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for creating and managing data objects. +func NewDataObjectClient(ctx context.Context, opts ...option.ClientOption) (*DataObjectClient, error) { + clientOpts := defaultDataObjectGRPCClientOptions() + if newDataObjectClientHook != nil { + hookOpts, err := newDataObjectClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := DataObjectClient{CallOptions: defaultDataObjectCallOptions()} + + c := &dataObjectGRPCClient{ + connPool: connPool, + dataObjectClient: vectorsearchpb.NewDataObjectServiceClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *dataObjectGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *dataObjectGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *dataObjectGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type dataObjectRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing DataObjectClient + CallOptions **DataObjectCallOptions + + logger *slog.Logger +} + +// NewDataObjectRESTClient creates a new data object service rest client. +// +// Service for creating and managing data objects. +func NewDataObjectRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataObjectClient, error) { + clientOpts := append(defaultDataObjectRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultDataObjectRESTCallOptions() + c := &dataObjectRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + return &DataObjectClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultDataObjectRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://vectorsearch.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://vectorsearch.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://vectorsearch.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *dataObjectRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *dataObjectRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *dataObjectRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *dataObjectGRPCClient) CreateDataObject(ctx context.Context, req *vectorsearchpb.CreateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateDataObject[0:len((*c.CallOptions).CreateDataObject):len((*c.CallOptions).CreateDataObject)], opts...) + var resp *vectorsearchpb.DataObject + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectClient.CreateDataObject, req, settings.GRPC, c.logger, "CreateDataObject") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) BatchCreateDataObjects(ctx context.Context, req *vectorsearchpb.BatchCreateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchCreateDataObjectsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).BatchCreateDataObjects[0:len((*c.CallOptions).BatchCreateDataObjects):len((*c.CallOptions).BatchCreateDataObjects)], opts...) + var resp *vectorsearchpb.BatchCreateDataObjectsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectClient.BatchCreateDataObjects, req, settings.GRPC, c.logger, "BatchCreateDataObjects") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) GetDataObject(ctx context.Context, req *vectorsearchpb.GetDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetDataObject[0:len((*c.CallOptions).GetDataObject):len((*c.CallOptions).GetDataObject)], opts...) + var resp *vectorsearchpb.DataObject + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectClient.GetDataObject, req, settings.GRPC, c.logger, "GetDataObject") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) UpdateDataObject(ctx context.Context, req *vectorsearchpb.UpdateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "data_object.name", url.QueryEscape(req.GetDataObject().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).UpdateDataObject[0:len((*c.CallOptions).UpdateDataObject):len((*c.CallOptions).UpdateDataObject)], opts...) + var resp *vectorsearchpb.DataObject + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectClient.UpdateDataObject, req, settings.GRPC, c.logger, "UpdateDataObject") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) BatchUpdateDataObjects(ctx context.Context, req *vectorsearchpb.BatchUpdateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchUpdateDataObjectsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).BatchUpdateDataObjects[0:len((*c.CallOptions).BatchUpdateDataObjects):len((*c.CallOptions).BatchUpdateDataObjects)], opts...) + var resp *vectorsearchpb.BatchUpdateDataObjectsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectClient.BatchUpdateDataObjects, req, settings.GRPC, c.logger, "BatchUpdateDataObjects") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) DeleteDataObject(ctx context.Context, req *vectorsearchpb.DeleteDataObjectRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteDataObject[0:len((*c.CallOptions).DeleteDataObject):len((*c.CallOptions).DeleteDataObject)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.dataObjectClient.DeleteDataObject, req, settings.GRPC, c.logger, "DeleteDataObject") + return err + }, opts...) + return err +} + +func (c *dataObjectGRPCClient) BatchDeleteDataObjects(ctx context.Context, req *vectorsearchpb.BatchDeleteDataObjectsRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).BatchDeleteDataObjects[0:len((*c.CallOptions).BatchDeleteDataObjects):len((*c.CallOptions).BatchDeleteDataObjects)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.dataObjectClient.BatchDeleteDataObjects, req, settings.GRPC, c.logger, "BatchDeleteDataObjects") + return err + }, opts...) + return err +} + +func (c *dataObjectGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *dataObjectGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") + return err + }, opts...) + return err +} + +func (c *dataObjectGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") + return err + }, opts...) + return err +} + +func (c *dataObjectGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateDataObject creates a dataObject. +func (c *dataObjectRESTClient) CreateDataObject(ctx context.Context, req *vectorsearchpb.CreateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDataObject() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + params.Add("dataObjectId", fmt.Sprintf("%v", req.GetDataObjectId())) + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).CreateDataObject[0:len((*c.CallOptions).CreateDataObject):len((*c.CallOptions).CreateDataObject)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.DataObject{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateDataObject") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchCreateDataObjects creates a batch of dataObjects. +func (c *dataObjectRESTClient) BatchCreateDataObjects(ctx context.Context, req *vectorsearchpb.BatchCreateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchCreateDataObjectsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:batchCreate", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).BatchCreateDataObjects[0:len((*c.CallOptions).BatchCreateDataObjects):len((*c.CallOptions).BatchCreateDataObjects)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.BatchCreateDataObjectsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchCreateDataObjects") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetDataObject gets a data object. +func (c *dataObjectRESTClient) GetDataObject(ctx context.Context, req *vectorsearchpb.GetDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetDataObject[0:len((*c.CallOptions).GetDataObject):len((*c.CallOptions).GetDataObject)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.DataObject{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDataObject") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// UpdateDataObject updates a dataObject. +func (c *dataObjectRESTClient) UpdateDataObject(ctx context.Context, req *vectorsearchpb.UpdateDataObjectRequest, opts ...gax.CallOption) (*vectorsearchpb.DataObject, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetDataObject() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetDataObject().GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetUpdateMask() != nil { + field, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(field[1:len(field)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "data_object.name", url.QueryEscape(req.GetDataObject().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).UpdateDataObject[0:len((*c.CallOptions).UpdateDataObject):len((*c.CallOptions).UpdateDataObject)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.DataObject{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateDataObject") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchUpdateDataObjects updates dataObjects in a batch. +func (c *dataObjectRESTClient) BatchUpdateDataObjects(ctx context.Context, req *vectorsearchpb.BatchUpdateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchUpdateDataObjectsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:batchUpdate", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).BatchUpdateDataObjects[0:len((*c.CallOptions).BatchUpdateDataObjects):len((*c.CallOptions).BatchUpdateDataObjects)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.BatchUpdateDataObjectsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchUpdateDataObjects") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// DeleteDataObject deletes a dataObject. +func (c *dataObjectRESTClient) DeleteDataObject(ctx context.Context, req *vectorsearchpb.DeleteDataObjectRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteDataObject") + return err + }, opts...) +} + +// BatchDeleteDataObjects deletes dataObjects in a batch. +func (c *dataObjectRESTClient) BatchDeleteDataObjects(ctx context.Context, req *vectorsearchpb.BatchDeleteDataObjectsRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:batchDelete", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchDeleteDataObjects") + return err + }, opts...) +} + +// GetLocation gets information about a location. +func (c *dataObjectRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *dataObjectRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *dataObjectRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReturnPartialSuccess() { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/vectorsearch/apiv1beta/data_object_client_example_go123_test.go b/vectorsearch/apiv1beta/data_object_client_example_go123_test.go new file mode 100644 index 000000000000..da5f23820d36 --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_client_example_go123_test.go @@ -0,0 +1,79 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleDataObjectClient_ListLocations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + for resp, err := range c.ListLocations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDataObjectClient_ListOperations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + for resp, err := range c.ListOperations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/vectorsearch/apiv1beta/data_object_client_example_test.go b/vectorsearch/apiv1beta/data_object_client_example_test.go new file mode 100644 index 000000000000..383716fda2c1 --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_client_example_test.go @@ -0,0 +1,402 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewDataObjectClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewDataObjectRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleDataObjectClient_BatchCreateDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchCreateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchCreateDataObjectsRequest. + } + resp, err := c.BatchCreateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_BatchDeleteDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchDeleteDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchDeleteDataObjectsRequest. + } + err = c.BatchDeleteDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectClient_BatchUpdateDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchUpdateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchUpdateDataObjectsRequest. + } + resp, err := c.BatchUpdateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_CreateDataObject() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateDataObjectRequest. + } + resp, err := c.CreateDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_DeleteDataObject() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteDataObjectRequest. + } + err = c.DeleteDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectClient_GetDataObject() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetDataObjectRequest. + } + resp, err := c.GetDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_UpdateDataObject() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.UpdateDataObjectRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#UpdateDataObjectRequest. + } + resp, err := c.UpdateDataObject(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +func ExampleDataObjectClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} diff --git a/vectorsearch/apiv1beta/data_object_search_client.go b/vectorsearch/apiv1beta/data_object_search_client.go new file mode 100644 index 000000000000..be994a72ea7b --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_search_client.go @@ -0,0 +1,1341 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch + +import ( + "bytes" + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + "time" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newDataObjectSearchClientHook clientHook + +// DataObjectSearchCallOptions contains the retry settings for each method of DataObjectSearchClient. +type DataObjectSearchCallOptions struct { + SearchDataObjects []gax.CallOption + QueryDataObjects []gax.CallOption + AggregateDataObjects []gax.CallOption + BatchSearchDataObjects []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultDataObjectSearchGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("vectorsearch.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("vectorsearch.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("vectorsearch.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultDataObjectSearchCallOptions() *DataObjectSearchCallOptions { + return &DataObjectSearchCallOptions{ + SearchDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + QueryDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + AggregateDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + BatchSearchDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultDataObjectSearchRESTCallOptions() *DataObjectSearchCallOptions { + return &DataObjectSearchCallOptions{ + SearchDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + QueryDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + AggregateDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + BatchSearchDataObjects: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalDataObjectSearchClient is an interface that defines the methods available from Vector Search API. +type internalDataObjectSearchClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + SearchDataObjects(context.Context, *vectorsearchpb.SearchDataObjectsRequest, ...gax.CallOption) *SearchResultIterator + QueryDataObjects(context.Context, *vectorsearchpb.QueryDataObjectsRequest, ...gax.CallOption) *DataObjectIterator + AggregateDataObjects(context.Context, *vectorsearchpb.AggregateDataObjectsRequest, ...gax.CallOption) (*vectorsearchpb.AggregateDataObjectsResponse, error) + BatchSearchDataObjects(context.Context, *vectorsearchpb.BatchSearchDataObjectsRequest, ...gax.CallOption) (*vectorsearchpb.BatchSearchDataObjectsResponse, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// DataObjectSearchClient is a client for interacting with Vector Search API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Service for searching data objects. +type DataObjectSearchClient struct { + // The internal transport-dependent client. + internalClient internalDataObjectSearchClient + + // The call options for this service. + CallOptions *DataObjectSearchCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *DataObjectSearchClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *DataObjectSearchClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *DataObjectSearchClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// SearchDataObjects searches data objects. +func (c *DataObjectSearchClient) SearchDataObjects(ctx context.Context, req *vectorsearchpb.SearchDataObjectsRequest, opts ...gax.CallOption) *SearchResultIterator { + return c.internalClient.SearchDataObjects(ctx, req, opts...) +} + +// QueryDataObjects queries data objects. +func (c *DataObjectSearchClient) QueryDataObjects(ctx context.Context, req *vectorsearchpb.QueryDataObjectsRequest, opts ...gax.CallOption) *DataObjectIterator { + return c.internalClient.QueryDataObjects(ctx, req, opts...) +} + +// AggregateDataObjects aggregates data objects. +func (c *DataObjectSearchClient) AggregateDataObjects(ctx context.Context, req *vectorsearchpb.AggregateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.AggregateDataObjectsResponse, error) { + return c.internalClient.AggregateDataObjects(ctx, req, opts...) +} + +// BatchSearchDataObjects batch searches data objects. +func (c *DataObjectSearchClient) BatchSearchDataObjects(ctx context.Context, req *vectorsearchpb.BatchSearchDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchSearchDataObjectsResponse, error) { + return c.internalClient.BatchSearchDataObjects(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *DataObjectSearchClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *DataObjectSearchClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectSearchClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectSearchClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *DataObjectSearchClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *DataObjectSearchClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// dataObjectSearchGRPCClient is a client for interacting with Vector Search API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type dataObjectSearchGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing DataObjectSearchClient + CallOptions **DataObjectSearchCallOptions + + // The gRPC API client. + dataObjectSearchClient vectorsearchpb.DataObjectSearchServiceClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewDataObjectSearchClient creates a new data object search service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Service for searching data objects. +func NewDataObjectSearchClient(ctx context.Context, opts ...option.ClientOption) (*DataObjectSearchClient, error) { + clientOpts := defaultDataObjectSearchGRPCClientOptions() + if newDataObjectSearchClientHook != nil { + hookOpts, err := newDataObjectSearchClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := DataObjectSearchClient{CallOptions: defaultDataObjectSearchCallOptions()} + + c := &dataObjectSearchGRPCClient{ + connPool: connPool, + dataObjectSearchClient: vectorsearchpb.NewDataObjectSearchServiceClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *dataObjectSearchGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *dataObjectSearchGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *dataObjectSearchGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type dataObjectSearchRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing DataObjectSearchClient + CallOptions **DataObjectSearchCallOptions + + logger *slog.Logger +} + +// NewDataObjectSearchRESTClient creates a new data object search service rest client. +// +// Service for searching data objects. +func NewDataObjectSearchRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataObjectSearchClient, error) { + clientOpts := append(defaultDataObjectSearchRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultDataObjectSearchRESTCallOptions() + c := &dataObjectSearchRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + return &DataObjectSearchClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultDataObjectSearchRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://vectorsearch.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://vectorsearch.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://vectorsearch.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *dataObjectSearchRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *dataObjectSearchRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *dataObjectSearchRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *dataObjectSearchGRPCClient) SearchDataObjects(ctx context.Context, req *vectorsearchpb.SearchDataObjectsRequest, opts ...gax.CallOption) *SearchResultIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SearchDataObjects[0:len((*c.CallOptions).SearchDataObjects):len((*c.CallOptions).SearchDataObjects)], opts...) + it := &SearchResultIterator{} + req = proto.Clone(req).(*vectorsearchpb.SearchDataObjectsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.SearchResult, string, error) { + resp := &vectorsearchpb.SearchDataObjectsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectSearchClient.SearchDataObjects, req, settings.GRPC, c.logger, "SearchDataObjects") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetResults(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *dataObjectSearchGRPCClient) QueryDataObjects(ctx context.Context, req *vectorsearchpb.QueryDataObjectsRequest, opts ...gax.CallOption) *DataObjectIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).QueryDataObjects[0:len((*c.CallOptions).QueryDataObjects):len((*c.CallOptions).QueryDataObjects)], opts...) + it := &DataObjectIterator{} + req = proto.Clone(req).(*vectorsearchpb.QueryDataObjectsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.DataObject, string, error) { + resp := &vectorsearchpb.QueryDataObjectsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectSearchClient.QueryDataObjects, req, settings.GRPC, c.logger, "QueryDataObjects") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetDataObjects(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *dataObjectSearchGRPCClient) AggregateDataObjects(ctx context.Context, req *vectorsearchpb.AggregateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.AggregateDataObjectsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).AggregateDataObjects[0:len((*c.CallOptions).AggregateDataObjects):len((*c.CallOptions).AggregateDataObjects)], opts...) + var resp *vectorsearchpb.AggregateDataObjectsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectSearchClient.AggregateDataObjects, req, settings.GRPC, c.logger, "AggregateDataObjects") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectSearchGRPCClient) BatchSearchDataObjects(ctx context.Context, req *vectorsearchpb.BatchSearchDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchSearchDataObjectsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).BatchSearchDataObjects[0:len((*c.CallOptions).BatchSearchDataObjects):len((*c.CallOptions).BatchSearchDataObjects)], opts...) + var resp *vectorsearchpb.BatchSearchDataObjectsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.dataObjectSearchClient.BatchSearchDataObjects, req, settings.GRPC, c.logger, "BatchSearchDataObjects") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectSearchGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectSearchGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *dataObjectSearchGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") + return err + }, opts...) + return err +} + +func (c *dataObjectSearchGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") + return err + }, opts...) + return err +} + +func (c *dataObjectSearchGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *dataObjectSearchGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SearchDataObjects searches data objects. +func (c *dataObjectSearchRESTClient) SearchDataObjects(ctx context.Context, req *vectorsearchpb.SearchDataObjectsRequest, opts ...gax.CallOption) *SearchResultIterator { + it := &SearchResultIterator{} + req = proto.Clone(req).(*vectorsearchpb.SearchDataObjectsRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.SearchResult, string, error) { + resp := &vectorsearchpb.SearchDataObjectsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:search", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "SearchDataObjects") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetResults(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// QueryDataObjects queries data objects. +func (c *dataObjectSearchRESTClient) QueryDataObjects(ctx context.Context, req *vectorsearchpb.QueryDataObjectsRequest, opts ...gax.CallOption) *DataObjectIterator { + it := &DataObjectIterator{} + req = proto.Clone(req).(*vectorsearchpb.QueryDataObjectsRequest) + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.DataObject, string, error) { + resp := &vectorsearchpb.QueryDataObjectsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, "", err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:query", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "QueryDataObjects") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetDataObjects(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// AggregateDataObjects aggregates data objects. +func (c *dataObjectSearchRESTClient) AggregateDataObjects(ctx context.Context, req *vectorsearchpb.AggregateDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.AggregateDataObjectsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:aggregate", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).AggregateDataObjects[0:len((*c.CallOptions).AggregateDataObjects):len((*c.CallOptions).AggregateDataObjects)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.AggregateDataObjectsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "AggregateDataObjects") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// BatchSearchDataObjects batch searches data objects. +func (c *dataObjectSearchRESTClient) BatchSearchDataObjects(ctx context.Context, req *vectorsearchpb.BatchSearchDataObjectsRequest, opts ...gax.CallOption) (*vectorsearchpb.BatchSearchDataObjectsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/dataObjects:batchSearch", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).BatchSearchDataObjects[0:len((*c.CallOptions).BatchSearchDataObjects):len((*c.CallOptions).BatchSearchDataObjects)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.BatchSearchDataObjectsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "BatchSearchDataObjects") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *dataObjectSearchRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *dataObjectSearchRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectSearchRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectSearchRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *dataObjectSearchRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *dataObjectSearchRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReturnPartialSuccess() { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/vectorsearch/apiv1beta/data_object_search_client_example_go123_test.go b/vectorsearch/apiv1beta/data_object_search_client_example_go123_test.go new file mode 100644 index 000000000000..4520b39783b1 --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_search_client_example_go123_test.go @@ -0,0 +1,132 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleDataObjectSearchClient_QueryDataObjects_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.QueryDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#QueryDataObjectsRequest. + } + for resp, err := range c.QueryDataObjects(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDataObjectSearchClient_SearchDataObjects_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.SearchDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#SearchDataObjectsRequest. + } + for resp, err := range c.SearchDataObjects(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDataObjectSearchClient_ListLocations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + for resp, err := range c.ListLocations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleDataObjectSearchClient_ListOperations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + for resp, err := range c.ListOperations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/vectorsearch/apiv1beta/data_object_search_client_example_test.go b/vectorsearch/apiv1beta/data_object_search_client_example_test.go new file mode 100644 index 000000000000..76e1319fbe13 --- /dev/null +++ b/vectorsearch/apiv1beta/data_object_search_client_example_test.go @@ -0,0 +1,355 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewDataObjectSearchClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewDataObjectSearchRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleDataObjectSearchClient_AggregateDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.AggregateDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#AggregateDataObjectsRequest. + } + resp, err := c.AggregateDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectSearchClient_BatchSearchDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.BatchSearchDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#BatchSearchDataObjectsRequest. + } + resp, err := c.BatchSearchDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectSearchClient_QueryDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.QueryDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#QueryDataObjectsRequest. + } + it := c.QueryDataObjects(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.QueryDataObjectsResponse) + } +} + +func ExampleDataObjectSearchClient_SearchDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.SearchDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#SearchDataObjectsRequest. + } + it := c.SearchDataObjects(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.SearchDataObjectsResponse) + } +} + +func ExampleDataObjectSearchClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectSearchClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +func ExampleDataObjectSearchClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectSearchClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleDataObjectSearchClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleDataObjectSearchClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewDataObjectSearchClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} diff --git a/vectorsearch/apiv1beta/doc.go b/vectorsearch/apiv1beta/doc.go new file mode 100644 index 000000000000..5dcd991c711f --- /dev/null +++ b/vectorsearch/apiv1beta/doc.go @@ -0,0 +1,93 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package vectorsearch is an auto-generated package for the +// Vector Search API. +// +// The Vector Search API provides a fully-managed, highly performant, and +// scalable vector database designed to power next-generation search, +// recommendation, and generative AI applications. It allows you to store, +// index, and query your data and its corresponding vector embeddings through +// a simple, intuitive interface. With Vector Search, you can define custom +// schemas for your data, insert objects with associated metadata, +// automatically generate embeddings from your data, and perform fast +// approximate nearest neighbor (ANN) searches to find semantically similar +// items at scale. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # General documentation +// +// For information that is relevant for all client libraries please reference +// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this +// page includes: +// +// - [Authentication and Authorization] +// - [Timeouts and Cancellation] +// - [Testing against Client Libraries] +// - [Debugging Client Libraries] +// - [Inspecting errors] +// +// # Example usage +// +// To get started with this package, create a client. +// +// // go get cloud.google.com/go/vectorsearch/apiv1beta@latest +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := vectorsearch.NewDataObjectSearchClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client, mentioned above. +// +// req := &vectorsearchpb.AggregateDataObjectsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#AggregateDataObjectsRequest. +// } +// resp, err := c.AggregateDataObjects(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewDataObjectSearchClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization +// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation +// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing +// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging +// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors +package vectorsearch // import "cloud.google.com/go/vectorsearch/apiv1beta" diff --git a/vectorsearch/apiv1beta/gapic_metadata.json b/vectorsearch/apiv1beta/gapic_metadata.json new file mode 100644 index 000000000000..f5618dcd7591 --- /dev/null +++ b/vectorsearch/apiv1beta/gapic_metadata.json @@ -0,0 +1,441 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.vectorsearch.v1beta", + "libraryPackage": "cloud.google.com/go/vectorsearch/apiv1beta", + "services": { + "DataObjectSearchService": { + "clients": { + "grpc": { + "libraryClient": "DataObjectSearchClient", + "rpcs": { + "AggregateDataObjects": { + "methods": [ + "AggregateDataObjects" + ] + }, + "BatchSearchDataObjects": { + "methods": [ + "BatchSearchDataObjects" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "QueryDataObjects": { + "methods": [ + "QueryDataObjects" + ] + }, + "SearchDataObjects": { + "methods": [ + "SearchDataObjects" + ] + } + } + }, + "rest": { + "libraryClient": "DataObjectSearchClient", + "rpcs": { + "AggregateDataObjects": { + "methods": [ + "AggregateDataObjects" + ] + }, + "BatchSearchDataObjects": { + "methods": [ + "BatchSearchDataObjects" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "QueryDataObjects": { + "methods": [ + "QueryDataObjects" + ] + }, + "SearchDataObjects": { + "methods": [ + "SearchDataObjects" + ] + } + } + } + } + }, + "DataObjectService": { + "clients": { + "grpc": { + "libraryClient": "DataObjectClient", + "rpcs": { + "BatchCreateDataObjects": { + "methods": [ + "BatchCreateDataObjects" + ] + }, + "BatchDeleteDataObjects": { + "methods": [ + "BatchDeleteDataObjects" + ] + }, + "BatchUpdateDataObjects": { + "methods": [ + "BatchUpdateDataObjects" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateDataObject": { + "methods": [ + "CreateDataObject" + ] + }, + "DeleteDataObject": { + "methods": [ + "DeleteDataObject" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetDataObject": { + "methods": [ + "GetDataObject" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateDataObject": { + "methods": [ + "UpdateDataObject" + ] + } + } + }, + "rest": { + "libraryClient": "DataObjectClient", + "rpcs": { + "BatchCreateDataObjects": { + "methods": [ + "BatchCreateDataObjects" + ] + }, + "BatchDeleteDataObjects": { + "methods": [ + "BatchDeleteDataObjects" + ] + }, + "BatchUpdateDataObjects": { + "methods": [ + "BatchUpdateDataObjects" + ] + }, + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateDataObject": { + "methods": [ + "CreateDataObject" + ] + }, + "DeleteDataObject": { + "methods": [ + "DeleteDataObject" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetDataObject": { + "methods": [ + "GetDataObject" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateDataObject": { + "methods": [ + "UpdateDataObject" + ] + } + } + } + } + }, + "VectorSearchService": { + "clients": { + "grpc": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateCollection": { + "methods": [ + "CreateCollection" + ] + }, + "CreateIndex": { + "methods": [ + "CreateIndex" + ] + }, + "DeleteCollection": { + "methods": [ + "DeleteCollection" + ] + }, + "DeleteIndex": { + "methods": [ + "DeleteIndex" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetCollection": { + "methods": [ + "GetCollection" + ] + }, + "GetIndex": { + "methods": [ + "GetIndex" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportDataObjects": { + "methods": [ + "ImportDataObjects" + ] + }, + "ListCollections": { + "methods": [ + "ListCollections" + ] + }, + "ListIndexes": { + "methods": [ + "ListIndexes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateCollection": { + "methods": [ + "UpdateCollection" + ] + } + } + }, + "rest": { + "libraryClient": "Client", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CreateCollection": { + "methods": [ + "CreateCollection" + ] + }, + "CreateIndex": { + "methods": [ + "CreateIndex" + ] + }, + "DeleteCollection": { + "methods": [ + "DeleteCollection" + ] + }, + "DeleteIndex": { + "methods": [ + "DeleteIndex" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "GetCollection": { + "methods": [ + "GetCollection" + ] + }, + "GetIndex": { + "methods": [ + "GetIndex" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ImportDataObjects": { + "methods": [ + "ImportDataObjects" + ] + }, + "ListCollections": { + "methods": [ + "ListCollections" + ] + }, + "ListIndexes": { + "methods": [ + "ListIndexes" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "UpdateCollection": { + "methods": [ + "UpdateCollection" + ] + } + } + } + } + } + } +} diff --git a/vectorsearch/apiv1beta/helpers.go b/vectorsearch/apiv1beta/helpers.go new file mode 100644 index 000000000000..2c9d80e9f76a --- /dev/null +++ b/vectorsearch/apiv1beta/helpers.go @@ -0,0 +1,105 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch + +import ( + "context" + "fmt" + "io" + "log/slog" + "net/http" + + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" + "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" +) + +const serviceName = "vectorsearch.googleapis.com" + +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) + if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vectorsearch/apiv1beta/vector_search_client.go b/vectorsearch/apiv1beta/vector_search_client.go new file mode 100644 index 000000000000..bdabf7741d38 --- /dev/null +++ b/vectorsearch/apiv1beta/vector_search_client.go @@ -0,0 +1,2108 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch + +import ( + "bytes" + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newClientHook clientHook + +// CallOptions contains the retry settings for each method of Client. +type CallOptions struct { + ListCollections []gax.CallOption + GetCollection []gax.CallOption + CreateCollection []gax.CallOption + UpdateCollection []gax.CallOption + DeleteCollection []gax.CallOption + ListIndexes []gax.CallOption + GetIndex []gax.CallOption + CreateIndex []gax.CallOption + DeleteIndex []gax.CallOption + ImportDataObjects []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("vectorsearch.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("vectorsearch.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("vectorsearch.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultCallOptions() *CallOptions { + return &CallOptions{ + ListCollections: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + UpdateCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ListIndexes: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ImportDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +func defaultRESTCallOptions() *CallOptions { + return &CallOptions{ + ListCollections: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + UpdateCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteCollection: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ListIndexes: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 10000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + CreateIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DeleteIndex: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ImportDataObjects: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{}, + } +} + +// internalClient is an interface that defines the methods available from Vector Search API. +type internalClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListCollections(context.Context, *vectorsearchpb.ListCollectionsRequest, ...gax.CallOption) *CollectionIterator + GetCollection(context.Context, *vectorsearchpb.GetCollectionRequest, ...gax.CallOption) (*vectorsearchpb.Collection, error) + CreateCollection(context.Context, *vectorsearchpb.CreateCollectionRequest, ...gax.CallOption) (*CreateCollectionOperation, error) + CreateCollectionOperation(name string) *CreateCollectionOperation + UpdateCollection(context.Context, *vectorsearchpb.UpdateCollectionRequest, ...gax.CallOption) (*UpdateCollectionOperation, error) + UpdateCollectionOperation(name string) *UpdateCollectionOperation + DeleteCollection(context.Context, *vectorsearchpb.DeleteCollectionRequest, ...gax.CallOption) (*DeleteCollectionOperation, error) + DeleteCollectionOperation(name string) *DeleteCollectionOperation + ListIndexes(context.Context, *vectorsearchpb.ListIndexesRequest, ...gax.CallOption) *IndexIterator + GetIndex(context.Context, *vectorsearchpb.GetIndexRequest, ...gax.CallOption) (*vectorsearchpb.Index, error) + CreateIndex(context.Context, *vectorsearchpb.CreateIndexRequest, ...gax.CallOption) (*CreateIndexOperation, error) + CreateIndexOperation(name string) *CreateIndexOperation + DeleteIndex(context.Context, *vectorsearchpb.DeleteIndexRequest, ...gax.CallOption) (*DeleteIndexOperation, error) + DeleteIndexOperation(name string) *DeleteIndexOperation + ImportDataObjects(context.Context, *vectorsearchpb.ImportDataObjectsRequest, ...gax.CallOption) (*ImportDataObjectsOperation, error) + ImportDataObjectsOperation(name string) *ImportDataObjectsOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// Client is a client for interacting with Vector Search API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// VectorSearchService provides methods for managing Collection resources, and +// Collection Index resources. The primary resources offered by this service are +// Collections which are a container for a set of related JSON data objects, and +// Collection Indexes which enable efficient ANN search across data objects +// within a Collection. +type Client struct { + // The internal transport-dependent client. + internalClient internalClient + + // The call options for this service. + CallOptions *CallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *Client) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *Client) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *Client) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListCollections lists Collections in a given project and location. +func (c *Client) ListCollections(ctx context.Context, req *vectorsearchpb.ListCollectionsRequest, opts ...gax.CallOption) *CollectionIterator { + return c.internalClient.ListCollections(ctx, req, opts...) +} + +// GetCollection gets details of a single Collection. +func (c *Client) GetCollection(ctx context.Context, req *vectorsearchpb.GetCollectionRequest, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + return c.internalClient.GetCollection(ctx, req, opts...) +} + +// CreateCollection creates a new Collection in a given project and location. +func (c *Client) CreateCollection(ctx context.Context, req *vectorsearchpb.CreateCollectionRequest, opts ...gax.CallOption) (*CreateCollectionOperation, error) { + return c.internalClient.CreateCollection(ctx, req, opts...) +} + +// CreateCollectionOperation returns a new CreateCollectionOperation from a given name. +// The name must be that of a previously created CreateCollectionOperation, possibly from a different process. +func (c *Client) CreateCollectionOperation(name string) *CreateCollectionOperation { + return c.internalClient.CreateCollectionOperation(name) +} + +// UpdateCollection updates the parameters of a single Collection. +func (c *Client) UpdateCollection(ctx context.Context, req *vectorsearchpb.UpdateCollectionRequest, opts ...gax.CallOption) (*UpdateCollectionOperation, error) { + return c.internalClient.UpdateCollection(ctx, req, opts...) +} + +// UpdateCollectionOperation returns a new UpdateCollectionOperation from a given name. +// The name must be that of a previously created UpdateCollectionOperation, possibly from a different process. +func (c *Client) UpdateCollectionOperation(name string) *UpdateCollectionOperation { + return c.internalClient.UpdateCollectionOperation(name) +} + +// DeleteCollection deletes a single Collection. +func (c *Client) DeleteCollection(ctx context.Context, req *vectorsearchpb.DeleteCollectionRequest, opts ...gax.CallOption) (*DeleteCollectionOperation, error) { + return c.internalClient.DeleteCollection(ctx, req, opts...) +} + +// DeleteCollectionOperation returns a new DeleteCollectionOperation from a given name. +// The name must be that of a previously created DeleteCollectionOperation, possibly from a different process. +func (c *Client) DeleteCollectionOperation(name string) *DeleteCollectionOperation { + return c.internalClient.DeleteCollectionOperation(name) +} + +// ListIndexes lists Indexes in a given project and location. +func (c *Client) ListIndexes(ctx context.Context, req *vectorsearchpb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator { + return c.internalClient.ListIndexes(ctx, req, opts...) +} + +// GetIndex gets details of a single Index. +func (c *Client) GetIndex(ctx context.Context, req *vectorsearchpb.GetIndexRequest, opts ...gax.CallOption) (*vectorsearchpb.Index, error) { + return c.internalClient.GetIndex(ctx, req, opts...) +} + +// CreateIndex creates a new Index in a given project and location. +func (c *Client) CreateIndex(ctx context.Context, req *vectorsearchpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error) { + return c.internalClient.CreateIndex(ctx, req, opts...) +} + +// CreateIndexOperation returns a new CreateIndexOperation from a given name. +// The name must be that of a previously created CreateIndexOperation, possibly from a different process. +func (c *Client) CreateIndexOperation(name string) *CreateIndexOperation { + return c.internalClient.CreateIndexOperation(name) +} + +// DeleteIndex deletes a single Index. +func (c *Client) DeleteIndex(ctx context.Context, req *vectorsearchpb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error) { + return c.internalClient.DeleteIndex(ctx, req, opts...) +} + +// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. +// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. +func (c *Client) DeleteIndexOperation(name string) *DeleteIndexOperation { + return c.internalClient.DeleteIndexOperation(name) +} + +// ImportDataObjects initiates a Long-Running Operation to import DataObjects into a Collection. +func (c *Client) ImportDataObjects(ctx context.Context, req *vectorsearchpb.ImportDataObjectsRequest, opts ...gax.CallOption) (*ImportDataObjectsOperation, error) { + return c.internalClient.ImportDataObjects(ctx, req, opts...) +} + +// ImportDataObjectsOperation returns a new ImportDataObjectsOperation from a given name. +// The name must be that of a previously created ImportDataObjectsOperation, possibly from a different process. +func (c *Client) ImportDataObjectsOperation(name string) *ImportDataObjectsOperation { + return c.internalClient.ImportDataObjectsOperation(name) +} + +// GetLocation gets information about a location. +func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// gRPCClient is a client for interacting with Vector Search API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type gRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + // The gRPC API client. + client vectorsearchpb.VectorSearchServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewClient creates a new vector search service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// VectorSearchService provides methods for managing Collection resources, and +// Collection Index resources. The primary resources offered by this service are +// Collections which are a container for a set of related JSON data objects, and +// Collection Indexes which enable efficient ANN search across data objects +// within a Collection. +func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := defaultGRPCClientOptions() + if newClientHook != nil { + hookOpts, err := newClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := Client{CallOptions: defaultCallOptions()} + + c := &gRPCClient{ + connPool: connPool, + client: vectorsearchpb.NewVectorSearchServiceClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + operationsClient: longrunningpb.NewOperationsClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *gRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *gRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *gRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type restClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing Client + CallOptions **CallOptions + + logger *slog.Logger +} + +// NewRESTClient creates a new vector search service rest client. +// +// VectorSearchService provides methods for managing Collection resources, and +// Collection Index resources. The primary resources offered by this service are +// Collections which are a container for a set of related JSON data objects, and +// Collection Indexes which enable efficient ANN search across data objects +// within a Collection. +func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { + clientOpts := append(defaultRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRESTCallOptions() + c := &restClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &Client{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://vectorsearch.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://vectorsearch.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://vectorsearch.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://vectorsearch.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *restClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *restClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *restClient) Connection() *grpc.ClientConn { + return nil +} +func (c *gRPCClient) ListCollections(ctx context.Context, req *vectorsearchpb.ListCollectionsRequest, opts ...gax.CallOption) *CollectionIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListCollections[0:len((*c.CallOptions).ListCollections):len((*c.CallOptions).ListCollections)], opts...) + it := &CollectionIterator{} + req = proto.Clone(req).(*vectorsearchpb.ListCollectionsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.Collection, string, error) { + resp := &vectorsearchpb.ListCollectionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.ListCollections, req, settings.GRPC, c.logger, "ListCollections") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetCollections(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetCollection(ctx context.Context, req *vectorsearchpb.GetCollectionRequest, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetCollection[0:len((*c.CallOptions).GetCollection):len((*c.CallOptions).GetCollection)], opts...) + var resp *vectorsearchpb.Collection + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.GetCollection, req, settings.GRPC, c.logger, "GetCollection") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateCollection(ctx context.Context, req *vectorsearchpb.CreateCollectionRequest, opts ...gax.CallOption) (*CreateCollectionOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateCollection[0:len((*c.CallOptions).CreateCollection):len((*c.CallOptions).CreateCollection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.CreateCollection, req, settings.GRPC, c.logger, "CreateCollection") + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) UpdateCollection(ctx context.Context, req *vectorsearchpb.UpdateCollectionRequest, opts ...gax.CallOption) (*UpdateCollectionOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "collection.name", url.QueryEscape(req.GetCollection().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).UpdateCollection[0:len((*c.CallOptions).UpdateCollection):len((*c.CallOptions).UpdateCollection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.UpdateCollection, req, settings.GRPC, c.logger, "UpdateCollection") + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteCollection(ctx context.Context, req *vectorsearchpb.DeleteCollectionRequest, opts ...gax.CallOption) (*DeleteCollectionOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteCollection[0:len((*c.CallOptions).DeleteCollection):len((*c.CallOptions).DeleteCollection)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.DeleteCollection, req, settings.GRPC, c.logger, "DeleteCollection") + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ListIndexes(ctx context.Context, req *vectorsearchpb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListIndexes[0:len((*c.CallOptions).ListIndexes):len((*c.CallOptions).ListIndexes)], opts...) + it := &IndexIterator{} + req = proto.Clone(req).(*vectorsearchpb.ListIndexesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.Index, string, error) { + resp := &vectorsearchpb.ListIndexesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.ListIndexes, req, settings.GRPC, c.logger, "ListIndexes") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetIndexes(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) GetIndex(ctx context.Context, req *vectorsearchpb.GetIndexRequest, opts ...gax.CallOption) (*vectorsearchpb.Index, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetIndex[0:len((*c.CallOptions).GetIndex):len((*c.CallOptions).GetIndex)], opts...) + var resp *vectorsearchpb.Index + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.GetIndex, req, settings.GRPC, c.logger, "GetIndex") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) CreateIndex(ctx context.Context, req *vectorsearchpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CreateIndex[0:len((*c.CallOptions).CreateIndex):len((*c.CallOptions).CreateIndex)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.CreateIndex, req, settings.GRPC, c.logger, "CreateIndex") + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) DeleteIndex(ctx context.Context, req *vectorsearchpb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteIndex[0:len((*c.CallOptions).DeleteIndex):len((*c.CallOptions).DeleteIndex)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.DeleteIndex, req, settings.GRPC, c.logger, "DeleteIndex") + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ImportDataObjects(ctx context.Context, req *vectorsearchpb.ImportDataObjectsRequest, opts ...gax.CallOption) (*ImportDataObjectsOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ImportDataObjects[0:len((*c.CallOptions).ImportDataObjects):len((*c.CallOptions).ImportDataObjects)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.client.ImportDataObjects, req, settings.GRPC, c.logger, "ImportDataObjects") + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportDataObjectsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *gRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") + return err + }, opts...) + return err +} + +func (c *gRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") + return err + }, opts...) + return err +} + +func (c *gRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListCollections lists Collections in a given project and location. +func (c *restClient) ListCollections(ctx context.Context, req *vectorsearchpb.ListCollectionsRequest, opts ...gax.CallOption) *CollectionIterator { + it := &CollectionIterator{} + req = proto.Clone(req).(*vectorsearchpb.ListCollectionsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.Collection, string, error) { + resp := &vectorsearchpb.ListCollectionsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/collections", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListCollections") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetCollections(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetCollection gets details of a single Collection. +func (c *restClient) GetCollection(ctx context.Context, req *vectorsearchpb.GetCollectionRequest, opts ...gax.CallOption) (*vectorsearchpb.Collection, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetCollection[0:len((*c.CallOptions).GetCollection):len((*c.CallOptions).GetCollection)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.Collection{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetCollection") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateCollection creates a new Collection in a given project and location. +func (c *restClient) CreateCollection(ctx context.Context, req *vectorsearchpb.CreateCollectionRequest, opts ...gax.CallOption) (*CreateCollectionOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCollection() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/collections", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + params.Add("collectionId", fmt.Sprintf("%v", req.GetCollectionId())) + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateCollection") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &CreateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpdateCollection updates the parameters of a single Collection. +func (c *restClient) UpdateCollection(ctx context.Context, req *vectorsearchpb.UpdateCollectionRequest, opts ...gax.CallOption) (*UpdateCollectionOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetCollection() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetCollection().GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + if req.GetUpdateMask() != nil { + field, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(field[1:len(field)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "collection.name", url.QueryEscape(req.GetCollection().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UpdateCollection") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &UpdateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteCollection deletes a single Collection. +func (c *restClient) DeleteCollection(ctx context.Context, req *vectorsearchpb.DeleteCollectionRequest, opts ...gax.CallOption) (*DeleteCollectionOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteCollection") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &DeleteCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ListIndexes lists Indexes in a given project and location. +func (c *restClient) ListIndexes(ctx context.Context, req *vectorsearchpb.ListIndexesRequest, opts ...gax.CallOption) *IndexIterator { + it := &IndexIterator{} + req = proto.Clone(req).(*vectorsearchpb.ListIndexesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*vectorsearchpb.Index, string, error) { + resp := &vectorsearchpb.ListIndexesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/indexes", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListIndexes") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetIndexes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetIndex gets details of a single Index. +func (c *restClient) GetIndex(ctx context.Context, req *vectorsearchpb.GetIndexRequest, opts ...gax.CallOption) (*vectorsearchpb.Index, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIndex[0:len((*c.CallOptions).GetIndex):len((*c.CallOptions).GetIndex)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &vectorsearchpb.Index{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetIndex") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// CreateIndex creates a new Index in a given project and location. +func (c *restClient) CreateIndex(ctx context.Context, req *vectorsearchpb.CreateIndexRequest, opts ...gax.CallOption) (*CreateIndexOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetIndex() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/indexes", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + params.Add("indexId", fmt.Sprintf("%v", req.GetIndexId())) + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CreateIndex") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteIndex deletes a single Index. +func (c *restClient) DeleteIndex(ctx context.Context, req *vectorsearchpb.DeleteIndexRequest, opts ...gax.CallOption) (*DeleteIndexOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteIndex") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ImportDataObjects initiates a Long-Running Operation to import DataObjects into a Collection. +func (c *restClient) ImportDataObjects(ctx context.Context, req *vectorsearchpb.ImportDataObjectsRequest, opts ...gax.CallOption) (*ImportDataObjectsOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v:importDataObjects", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "ImportDataObjects") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v1beta/%s", resp.GetName()) + return &ImportDataObjectsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *restClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *restClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *restClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v:cancel", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *restClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *restClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *restClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1beta/%v/operations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + if req.GetReturnPartialSuccess() { + params.Add("returnPartialSuccess", fmt.Sprintf("%v", req.GetReturnPartialSuccess())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetOperations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// CreateCollectionOperation returns a new CreateCollectionOperation from a given name. +// The name must be that of a previously created CreateCollectionOperation, possibly from a different process. +func (c *gRPCClient) CreateCollectionOperation(name string) *CreateCollectionOperation { + return &CreateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateCollectionOperation returns a new CreateCollectionOperation from a given name. +// The name must be that of a previously created CreateCollectionOperation, possibly from a different process. +func (c *restClient) CreateCollectionOperation(name string) *CreateCollectionOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &CreateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// CreateIndexOperation returns a new CreateIndexOperation from a given name. +// The name must be that of a previously created CreateIndexOperation, possibly from a different process. +func (c *gRPCClient) CreateIndexOperation(name string) *CreateIndexOperation { + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateIndexOperation returns a new CreateIndexOperation from a given name. +// The name must be that of a previously created CreateIndexOperation, possibly from a different process. +func (c *restClient) CreateIndexOperation(name string) *CreateIndexOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &CreateIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// DeleteCollectionOperation returns a new DeleteCollectionOperation from a given name. +// The name must be that of a previously created DeleteCollectionOperation, possibly from a different process. +func (c *gRPCClient) DeleteCollectionOperation(name string) *DeleteCollectionOperation { + return &DeleteCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteCollectionOperation returns a new DeleteCollectionOperation from a given name. +// The name must be that of a previously created DeleteCollectionOperation, possibly from a different process. +func (c *restClient) DeleteCollectionOperation(name string) *DeleteCollectionOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &DeleteCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. +// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. +func (c *gRPCClient) DeleteIndexOperation(name string) *DeleteIndexOperation { + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteIndexOperation returns a new DeleteIndexOperation from a given name. +// The name must be that of a previously created DeleteIndexOperation, possibly from a different process. +func (c *restClient) DeleteIndexOperation(name string) *DeleteIndexOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &DeleteIndexOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// ImportDataObjectsOperation returns a new ImportDataObjectsOperation from a given name. +// The name must be that of a previously created ImportDataObjectsOperation, possibly from a different process. +func (c *gRPCClient) ImportDataObjectsOperation(name string) *ImportDataObjectsOperation { + return &ImportDataObjectsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ImportDataObjectsOperation returns a new ImportDataObjectsOperation from a given name. +// The name must be that of a previously created ImportDataObjectsOperation, possibly from a different process. +func (c *restClient) ImportDataObjectsOperation(name string) *ImportDataObjectsOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &ImportDataObjectsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// UpdateCollectionOperation returns a new UpdateCollectionOperation from a given name. +// The name must be that of a previously created UpdateCollectionOperation, possibly from a different process. +func (c *gRPCClient) UpdateCollectionOperation(name string) *UpdateCollectionOperation { + return &UpdateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// UpdateCollectionOperation returns a new UpdateCollectionOperation from a given name. +// The name must be that of a previously created UpdateCollectionOperation, possibly from a different process. +func (c *restClient) UpdateCollectionOperation(name string) *UpdateCollectionOperation { + override := fmt.Sprintf("/v1beta/%s", name) + return &UpdateCollectionOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} diff --git a/vectorsearch/apiv1beta/vector_search_client_example_go123_test.go b/vectorsearch/apiv1beta/vector_search_client_example_go123_test.go new file mode 100644 index 000000000000..c8f56296ddea --- /dev/null +++ b/vectorsearch/apiv1beta/vector_search_client_example_go123_test.go @@ -0,0 +1,132 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleClient_ListCollections_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListCollectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListCollectionsRequest. + } + for resp, err := range c.ListCollections(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_ListIndexes_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListIndexesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListIndexesRequest. + } + for resp, err := range c.ListIndexes(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_ListLocations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + for resp, err := range c.ListLocations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleClient_ListOperations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + for resp, err := range c.ListOperations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/vectorsearch/apiv1beta/vector_search_client_example_test.go b/vectorsearch/apiv1beta/vector_search_client_example_test.go new file mode 100644 index 000000000000..a9175f8ea8e5 --- /dev/null +++ b/vectorsearch/apiv1beta/vector_search_client_example_test.go @@ -0,0 +1,531 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package vectorsearch_test + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + vectorsearch "cloud.google.com/go/vectorsearch/apiv1beta" + vectorsearchpb "cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleClient_CreateCollection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateCollectionRequest. + } + op, err := c.CreateCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_CreateIndex() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.CreateIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#CreateIndexRequest. + } + op, err := c.CreateIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_DeleteCollection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteCollectionRequest. + } + op, err := c.DeleteCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteIndex() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.DeleteIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#DeleteIndexRequest. + } + op, err := c.DeleteIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetCollection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetCollectionRequest. + } + resp, err := c.GetCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetIndex() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.GetIndexRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#GetIndexRequest. + } + resp, err := c.GetIndex(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ImportDataObjects() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ImportDataObjectsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ImportDataObjectsRequest. + } + op, err := c.ImportDataObjects(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListCollections() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListCollectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListCollectionsRequest. + } + it := c.ListCollections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.ListCollectionsResponse) + } +} + +func ExampleClient_ListIndexes() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.ListIndexesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#ListIndexesRequest. + } + it := c.ListIndexes(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*vectorsearchpb.ListIndexesResponse) + } +} + +func ExampleClient_UpdateCollection() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &vectorsearchpb.UpdateCollectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/vectorsearch/apiv1beta/vectorsearchpb#UpdateCollectionRequest. + } + op, err := c.UpdateCollection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +func ExampleClient_CancelOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_DeleteOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleClient_GetOperation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ListOperations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := vectorsearch.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*longrunningpb.ListOperationsResponse) + } +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/common.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/common.pb.go new file mode 100644 index 000000000000..b119638dd751 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/common.pb.go @@ -0,0 +1,163 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/common.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Distance metric for vector search. +type DistanceMetric int32 + +const ( + // Default value, distance metric is not specified. + DistanceMetric_DISTANCE_METRIC_UNSPECIFIED DistanceMetric = 0 + // Dot product distance metric. + DistanceMetric_DOT_PRODUCT DistanceMetric = 1 + // Cosine distance metric. + DistanceMetric_COSINE_DISTANCE DistanceMetric = 2 +) + +// Enum value maps for DistanceMetric. +var ( + DistanceMetric_name = map[int32]string{ + 0: "DISTANCE_METRIC_UNSPECIFIED", + 1: "DOT_PRODUCT", + 2: "COSINE_DISTANCE", + } + DistanceMetric_value = map[string]int32{ + "DISTANCE_METRIC_UNSPECIFIED": 0, + "DOT_PRODUCT": 1, + "COSINE_DISTANCE": 2, + } +) + +func (x DistanceMetric) Enum() *DistanceMetric { + p := new(DistanceMetric) + *p = x + return p +} + +func (x DistanceMetric) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DistanceMetric) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_vectorsearch_v1beta_common_proto_enumTypes[0].Descriptor() +} + +func (DistanceMetric) Type() protoreflect.EnumType { + return &file_google_cloud_vectorsearch_v1beta_common_proto_enumTypes[0] +} + +func (x DistanceMetric) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DistanceMetric.Descriptor instead. +func (DistanceMetric) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_common_proto_rawDescGZIP(), []int{0} +} + +var File_google_cloud_vectorsearch_v1beta_common_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_common_proto_rawDesc = []byte{ + 0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2a, 0x57, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x5f, + 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x4f, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x44, + 0x55, 0x43, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x53, 0x49, 0x4e, 0x45, 0x5f, + 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x02, 0x42, 0x7f, 0x0a, 0x24, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x3b, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_common_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_common_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_common_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_common_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_common_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_common_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_common_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_vectorsearch_v1beta_common_proto_goTypes = []any{ + (DistanceMetric)(0), // 0: google.cloud.vectorsearch.v1beta.DistanceMetric +} +var file_google_cloud_vectorsearch_v1beta_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_common_proto_init() } +func file_google_cloud_vectorsearch_v1beta_common_proto_init() { + if File_google_cloud_vectorsearch_v1beta_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_common_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_common_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_common_proto_depIdxs, + EnumInfos: file_google_cloud_vectorsearch_v1beta_common_proto_enumTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_common_proto = out.File + file_google_cloud_vectorsearch_v1beta_common_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_common_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_common_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/data_object.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/data_object.pb.go new file mode 100644 index 000000000000..4e2760c83834 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/data_object.pb.go @@ -0,0 +1,490 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/data_object.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A dataObject resource in Vector Search. +type DataObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Immutable. 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. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The id of the dataObject. + // + // Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/data_object.proto. + DataObjectId string `protobuf:"bytes,2,opt,name=data_object_id,json=dataObjectId,proto3" json:"data_object_id,omitempty"` + // Output only. Timestamp the dataObject was created at. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Timestamp the dataObject was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Optional. The data of the dataObject. + Data *structpb.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` + // Optional. The vectors of the dataObject. + Vectors map[string]*Vector `protobuf:"bytes,7,rep,name=vectors,proto3" json:"vectors,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *DataObject) Reset() { + *x = DataObject{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataObject) ProtoMessage() {} + +func (x *DataObject) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataObject.ProtoReflect.Descriptor instead. +func (*DataObject) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescGZIP(), []int{0} +} + +func (x *DataObject) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/data_object.proto. +func (x *DataObject) GetDataObjectId() string { + if x != nil { + return x.DataObjectId + } + return "" +} + +func (x *DataObject) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *DataObject) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *DataObject) GetData() *structpb.Struct { + if x != nil { + return x.Data + } + return nil +} + +func (x *DataObject) GetVectors() map[string]*Vector { + if x != nil { + return x.Vectors + } + return nil +} + +// A vector which can be either dense or sparse. +type Vector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of the vector. + // + // Types that are assignable to VectorType: + // + // *Vector_Dense + // *Vector_Sparse + VectorType isVector_VectorType `protobuf_oneof:"vector_type"` + // The values of the vector. + // + // Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/data_object.proto. + Values []float32 `protobuf:"fixed32,1,rep,packed,name=values,proto3" json:"values,omitempty"` +} + +func (x *Vector) Reset() { + *x = Vector{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Vector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Vector) ProtoMessage() {} + +func (x *Vector) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Vector.ProtoReflect.Descriptor instead. +func (*Vector) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescGZIP(), []int{1} +} + +func (m *Vector) GetVectorType() isVector_VectorType { + if m != nil { + return m.VectorType + } + return nil +} + +func (x *Vector) GetDense() *DenseVector { + if x, ok := x.GetVectorType().(*Vector_Dense); ok { + return x.Dense + } + return nil +} + +func (x *Vector) GetSparse() *SparseVector { + if x, ok := x.GetVectorType().(*Vector_Sparse); ok { + return x.Sparse + } + return nil +} + +// Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/data_object.proto. +func (x *Vector) GetValues() []float32 { + if x != nil { + return x.Values + } + return nil +} + +type isVector_VectorType interface { + isVector_VectorType() +} + +type Vector_Dense struct { + // A dense vector. + Dense *DenseVector `protobuf:"bytes,2,opt,name=dense,proto3,oneof"` +} + +type Vector_Sparse struct { + // A sparse vector. + Sparse *SparseVector `protobuf:"bytes,3,opt,name=sparse,proto3,oneof"` +} + +func (*Vector_Dense) isVector_VectorType() {} + +func (*Vector_Sparse) isVector_VectorType() {} + +// A dense vector. +type DenseVector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The values of the vector. + Values []float32 `protobuf:"fixed32,1,rep,packed,name=values,proto3" json:"values,omitempty"` +} + +func (x *DenseVector) Reset() { + *x = DenseVector{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DenseVector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DenseVector) ProtoMessage() {} + +func (x *DenseVector) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DenseVector.ProtoReflect.Descriptor instead. +func (*DenseVector) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescGZIP(), []int{2} +} + +func (x *DenseVector) GetValues() []float32 { + if x != nil { + return x.Values + } + return nil +} + +// A sparse vector. +type SparseVector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The values of the vector. + Values []float32 `protobuf:"fixed32,1,rep,packed,name=values,proto3" json:"values,omitempty"` + // Required. The corresponding indices for the values. + Indices []int32 `protobuf:"varint,2,rep,packed,name=indices,proto3" json:"indices,omitempty"` +} + +func (x *SparseVector) Reset() { + *x = SparseVector{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SparseVector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SparseVector) ProtoMessage() {} + +func (x *SparseVector) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SparseVector.ProtoReflect.Descriptor instead. +func (*SparseVector) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescGZIP(), []int{3} +} + +func (x *SparseVector) GetValues() []float32 { + if x != nil { + return x.Values + } + return nil +} + +func (x *SparseVector) GetIndices() []int32 { + if x != nil { + return x.Indices + } + return nil +} + +var File_google_cloud_vectorsearch_v1beta_data_object_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDesc = []byte{ + 0x0a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xd2, 0x04, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0e, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x05, 0xe0, 0x41, 0x03, 0x18, 0x01, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x58, 0x0a, 0x07, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x64, 0x0a, 0x0c, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x87, 0x01, 0xea, + 0x41, 0x83, 0x01, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x59, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x22, 0xc4, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x12, 0x45, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, + 0x00, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x70, 0x61, 0x72, + 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x70, 0x61, 0x72, + 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x06, 0x73, 0x70, 0x61, 0x72, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x02, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x0d, + 0x0a, 0x0b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x2a, 0x0a, + 0x0b, 0x44, 0x65, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x0c, 0x53, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x02, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x69, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x42, 0x83, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x0f, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x3b, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_google_cloud_vectorsearch_v1beta_data_object_proto_goTypes = []any{ + (*DataObject)(nil), // 0: google.cloud.vectorsearch.v1beta.DataObject + (*Vector)(nil), // 1: google.cloud.vectorsearch.v1beta.Vector + (*DenseVector)(nil), // 2: google.cloud.vectorsearch.v1beta.DenseVector + (*SparseVector)(nil), // 3: google.cloud.vectorsearch.v1beta.SparseVector + nil, // 4: google.cloud.vectorsearch.v1beta.DataObject.VectorsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 6: google.protobuf.Struct +} +var file_google_cloud_vectorsearch_v1beta_data_object_proto_depIdxs = []int32{ + 5, // 0: google.cloud.vectorsearch.v1beta.DataObject.create_time:type_name -> google.protobuf.Timestamp + 5, // 1: google.cloud.vectorsearch.v1beta.DataObject.update_time:type_name -> google.protobuf.Timestamp + 6, // 2: google.cloud.vectorsearch.v1beta.DataObject.data:type_name -> google.protobuf.Struct + 4, // 3: google.cloud.vectorsearch.v1beta.DataObject.vectors:type_name -> google.cloud.vectorsearch.v1beta.DataObject.VectorsEntry + 2, // 4: google.cloud.vectorsearch.v1beta.Vector.dense:type_name -> google.cloud.vectorsearch.v1beta.DenseVector + 3, // 5: google.cloud.vectorsearch.v1beta.Vector.sparse:type_name -> google.cloud.vectorsearch.v1beta.SparseVector + 1, // 6: google.cloud.vectorsearch.v1beta.DataObject.VectorsEntry.value:type_name -> google.cloud.vectorsearch.v1beta.Vector + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_data_object_proto_init() } +func file_google_cloud_vectorsearch_v1beta_data_object_proto_init() { + if File_google_cloud_vectorsearch_v1beta_data_object_proto != nil { + return + } + file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes[1].OneofWrappers = []any{ + (*Vector_Dense)(nil), + (*Vector_Sparse)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_data_object_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_data_object_proto_depIdxs, + MessageInfos: file_google_cloud_vectorsearch_v1beta_data_object_proto_msgTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_data_object_proto = out.File + file_google_cloud_vectorsearch_v1beta_data_object_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_data_object_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_data_object_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service.pb.go new file mode 100644 index 000000000000..5cb65cae4d70 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service.pb.go @@ -0,0 +1,2260 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/data_object_search_service.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Aggregation methods. +type AggregationMethod int32 + +const ( + // Should not be used. + AggregationMethod_AGGREGATION_METHOD_UNSPECIFIED AggregationMethod = 0 + // Count the number of data objects that match the filter. + AggregationMethod_COUNT AggregationMethod = 1 +) + +// Enum value maps for AggregationMethod. +var ( + AggregationMethod_name = map[int32]string{ + 0: "AGGREGATION_METHOD_UNSPECIFIED", + 1: "COUNT", + } + AggregationMethod_value = map[string]int32{ + "AGGREGATION_METHOD_UNSPECIFIED": 0, + "COUNT": 1, + } +) + +func (x AggregationMethod) Enum() *AggregationMethod { + p := new(AggregationMethod) + *p = x + return p +} + +func (x AggregationMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AggregationMethod) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_enumTypes[0].Descriptor() +} + +func (AggregationMethod) Type() protoreflect.EnumType { + return &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_enumTypes[0] +} + +func (x AggregationMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AggregationMethod.Descriptor instead. +func (AggregationMethod) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{0} +} + +// Defines a output fields struct for data in DataObject. +type OutputFields struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The fields from the data fields to include in the output. + DataFields []string `protobuf:"bytes,1,rep,name=data_fields,json=dataFields,proto3" json:"data_fields,omitempty"` + // Optional. The fields from the vector fields to include in the output. + VectorFields []string `protobuf:"bytes,2,rep,name=vector_fields,json=vectorFields,proto3" json:"vector_fields,omitempty"` + // Optional. The fields from the DataObject metadata to include in the output. + MetadataFields []string `protobuf:"bytes,3,rep,name=metadata_fields,json=metadataFields,proto3" json:"metadata_fields,omitempty"` +} + +func (x *OutputFields) Reset() { + *x = OutputFields{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OutputFields) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutputFields) ProtoMessage() {} + +func (x *OutputFields) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutputFields.ProtoReflect.Descriptor instead. +func (*OutputFields) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{0} +} + +func (x *OutputFields) GetDataFields() []string { + if x != nil { + return x.DataFields + } + return nil +} + +func (x *OutputFields) GetVectorFields() []string { + if x != nil { + return x.VectorFields + } + return nil +} + +func (x *OutputFields) GetMetadataFields() []string { + if x != nil { + return x.MetadataFields + } + return nil +} + +// Represents a hint to the search index engine. +type SearchHint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of index to use. + // + // Types that are assignable to IndexType: + // + // *SearchHint_UseIndex + // *SearchHint_UseKnn + IndexType isSearchHint_IndexType `protobuf_oneof:"index_type"` +} + +func (x *SearchHint) Reset() { + *x = SearchHint{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchHint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchHint) ProtoMessage() {} + +func (x *SearchHint) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchHint.ProtoReflect.Descriptor instead. +func (*SearchHint) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{1} +} + +func (m *SearchHint) GetIndexType() isSearchHint_IndexType { + if m != nil { + return m.IndexType + } + return nil +} + +func (x *SearchHint) GetUseIndex() *SearchHint_IndexHint { + if x, ok := x.GetIndexType().(*SearchHint_UseIndex); ok { + return x.UseIndex + } + return nil +} + +func (x *SearchHint) GetUseKnn() bool { + if x, ok := x.GetIndexType().(*SearchHint_UseKnn); ok { + return x.UseKnn + } + return false +} + +type isSearchHint_IndexType interface { + isSearchHint_IndexType() +} + +type SearchHint_UseIndex struct { + // Specifies that the search should use a particular index. + UseIndex *SearchHint_IndexHint `protobuf:"bytes,1,opt,name=use_index,json=useIndex,proto3,oneof"` +} + +type SearchHint_UseKnn struct { + // If set to true, the search will use the system's default + // K-Nearest Neighbor (KNN) index engine. + UseKnn bool `protobuf:"varint,2,opt,name=use_knn,json=useKnn,proto3,oneof"` +} + +func (*SearchHint_UseIndex) isSearchHint_IndexType() {} + +func (*SearchHint_UseKnn) isSearchHint_IndexType() {} + +// A single search request within a batch operation. +type Search struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of search to perform. + // + // Types that are assignable to SearchType: + // + // *Search_VectorSearch + // *Search_SemanticSearch + SearchType isSearch_SearchType `protobuf_oneof:"search_type"` +} + +func (x *Search) Reset() { + *x = Search{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Search) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Search) ProtoMessage() {} + +func (x *Search) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Search.ProtoReflect.Descriptor instead. +func (*Search) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{2} +} + +func (m *Search) GetSearchType() isSearch_SearchType { + if m != nil { + return m.SearchType + } + return nil +} + +func (x *Search) GetVectorSearch() *VectorSearch { + if x, ok := x.GetSearchType().(*Search_VectorSearch); ok { + return x.VectorSearch + } + return nil +} + +func (x *Search) GetSemanticSearch() *SemanticSearch { + if x, ok := x.GetSearchType().(*Search_SemanticSearch); ok { + return x.SemanticSearch + } + return nil +} + +type isSearch_SearchType interface { + isSearch_SearchType() +} + +type Search_VectorSearch struct { + // A vector-based search. + VectorSearch *VectorSearch `protobuf:"bytes,1,opt,name=vector_search,json=vectorSearch,proto3,oneof"` +} + +type Search_SemanticSearch struct { + // A semantic search. + SemanticSearch *SemanticSearch `protobuf:"bytes,2,opt,name=semantic_search,json=semanticSearch,proto3,oneof"` +} + +func (*Search_VectorSearch) isSearch_SearchType() {} + +func (*Search_SemanticSearch) isSearch_SearchType() {} + +// Defines a search operation using a query vector. +type VectorSearch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to VectorType: + // + // *VectorSearch_Vector + // *VectorSearch_SparseVector + VectorType isVectorSearch_VectorType `protobuf_oneof:"vector_type"` + // Required. The vector field to search. + SearchField string `protobuf:"bytes,8,opt,name=search_field,json=searchField,proto3" json:"search_field,omitempty"` + // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + // represented as a google.protobuf.Struct. + Filter *structpb.Struct `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. The number of nearest neighbors to return. + TopK *int32 `protobuf:"varint,5,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"` + // Optional. Mask specifying which fields to return. + OutputFields *OutputFields `protobuf:"bytes,7,opt,name=output_fields,json=outputFields,proto3" json:"output_fields,omitempty"` + // 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. + SearchHint *SearchHint `protobuf:"bytes,9,opt,name=search_hint,json=searchHint,proto3" json:"search_hint,omitempty"` + // Optional. The distance metric to use for the KNN search. If not specified, + // DOT_PRODUCT will be used as the default. + DistanceMetric DistanceMetric `protobuf:"varint,11,opt,name=distance_metric,json=distanceMetric,proto3,enum=google.cloud.vectorsearch.v1beta.DistanceMetric" json:"distance_metric,omitempty"` +} + +func (x *VectorSearch) Reset() { + *x = VectorSearch{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VectorSearch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VectorSearch) ProtoMessage() {} + +func (x *VectorSearch) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VectorSearch.ProtoReflect.Descriptor instead. +func (*VectorSearch) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{3} +} + +func (m *VectorSearch) GetVectorType() isVectorSearch_VectorType { + if m != nil { + return m.VectorType + } + return nil +} + +func (x *VectorSearch) GetVector() *DenseVector { + if x, ok := x.GetVectorType().(*VectorSearch_Vector); ok { + return x.Vector + } + return nil +} + +func (x *VectorSearch) GetSparseVector() *SparseVector { + if x, ok := x.GetVectorType().(*VectorSearch_SparseVector); ok { + return x.SparseVector + } + return nil +} + +func (x *VectorSearch) GetSearchField() string { + if x != nil { + return x.SearchField + } + return "" +} + +func (x *VectorSearch) GetFilter() *structpb.Struct { + if x != nil { + return x.Filter + } + return nil +} + +func (x *VectorSearch) GetTopK() int32 { + if x != nil && x.TopK != nil { + return *x.TopK + } + return 0 +} + +func (x *VectorSearch) GetOutputFields() *OutputFields { + if x != nil { + return x.OutputFields + } + return nil +} + +func (x *VectorSearch) GetSearchHint() *SearchHint { + if x != nil { + return x.SearchHint + } + return nil +} + +func (x *VectorSearch) GetDistanceMetric() DistanceMetric { + if x != nil { + return x.DistanceMetric + } + return DistanceMetric_DISTANCE_METRIC_UNSPECIFIED +} + +type isVectorSearch_VectorType interface { + isVectorSearch_VectorType() +} + +type VectorSearch_Vector struct { + // A dense vector for the query. + Vector *DenseVector `protobuf:"bytes,1,opt,name=vector,proto3,oneof"` +} + +type VectorSearch_SparseVector struct { + // A sparse vector for the query. + SparseVector *SparseVector `protobuf:"bytes,2,opt,name=sparse_vector,json=sparseVector,proto3,oneof"` +} + +func (*VectorSearch_Vector) isVectorSearch_VectorType() {} + +func (*VectorSearch_SparseVector) isVectorSearch_VectorType() {} + +// Defines a semantic search operation. +type SemanticSearch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The query text, which is used to generate an embedding according + // to the embedding model specified in the collection config. + SearchText string `protobuf:"bytes,1,opt,name=search_text,json=searchText,proto3" json:"search_text,omitempty"` + // Required. The vector field to search. + SearchField string `protobuf:"bytes,2,opt,name=search_field,json=searchField,proto3" json:"search_field,omitempty"` + // Optional. The task type of the query embedding. + TaskType EmbeddingTaskType `protobuf:"varint,5,opt,name=task_type,json=taskType,proto3,enum=google.cloud.vectorsearch.v1beta.EmbeddingTaskType" json:"task_type,omitempty"` + // Optional. The fields to return in the search results. + OutputFields *OutputFields `protobuf:"bytes,3,opt,name=output_fields,json=outputFields,proto3" json:"output_fields,omitempty"` + // Optional. The number of data objects to return. + TopK *int32 `protobuf:"varint,4,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"` +} + +func (x *SemanticSearch) Reset() { + *x = SemanticSearch{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SemanticSearch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SemanticSearch) ProtoMessage() {} + +func (x *SemanticSearch) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SemanticSearch.ProtoReflect.Descriptor instead. +func (*SemanticSearch) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{4} +} + +func (x *SemanticSearch) GetSearchText() string { + if x != nil { + return x.SearchText + } + return "" +} + +func (x *SemanticSearch) GetSearchField() string { + if x != nil { + return x.SearchField + } + return "" +} + +func (x *SemanticSearch) GetTaskType() EmbeddingTaskType { + if x != nil { + return x.TaskType + } + return EmbeddingTaskType_EMBEDDING_TASK_TYPE_UNSPECIFIED +} + +func (x *SemanticSearch) GetOutputFields() *OutputFields { + if x != nil { + return x.OutputFields + } + return nil +} + +func (x *SemanticSearch) GetTopK() int32 { + if x != nil && x.TopK != nil { + return *x.TopK + } + return 0 +} + +// Defines a text search operation. +type TextSearch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The query text. + SearchText string `protobuf:"bytes,1,opt,name=search_text,json=searchText,proto3" json:"search_text,omitempty"` + // Required. The data field names to search. + DataFieldNames []string `protobuf:"bytes,2,rep,name=data_field_names,json=dataFieldNames,proto3" json:"data_field_names,omitempty"` + // Optional. The fields to return in the search results. + OutputFields *OutputFields `protobuf:"bytes,3,opt,name=output_fields,json=outputFields,proto3" json:"output_fields,omitempty"` + // Optional. The number of results to return. + TopK *int32 `protobuf:"varint,4,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"` +} + +func (x *TextSearch) Reset() { + *x = TextSearch{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TextSearch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextSearch) ProtoMessage() {} + +func (x *TextSearch) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TextSearch.ProtoReflect.Descriptor instead. +func (*TextSearch) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{5} +} + +func (x *TextSearch) GetSearchText() string { + if x != nil { + return x.SearchText + } + return "" +} + +func (x *TextSearch) GetDataFieldNames() []string { + if x != nil { + return x.DataFieldNames + } + return nil +} + +func (x *TextSearch) GetOutputFields() *OutputFields { + if x != nil { + return x.OutputFields + } + return nil +} + +func (x *TextSearch) GetTopK() int32 { + if x != nil && x.TopK != nil { + return *x.TopK + } + return 0 +} + +// Request for performing a single search. +type SearchDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The query to search for. + // + // Types that are assignable to SearchType: + // + // *SearchDataObjectsRequest_VectorSearch + // *SearchDataObjectsRequest_SemanticSearch + // *SearchDataObjectsRequest_TextSearch + SearchType isSearchDataObjectsRequest_SearchType `protobuf_oneof:"search_type"` + // Required. The resource name of the Collection for which to search. + // Format: `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. The standard list page size. + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. The standard list page token. + // Typically obtained via + // [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse.next_page_token] + // of the previous + // [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects] + // call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *SearchDataObjectsRequest) Reset() { + *x = SearchDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchDataObjectsRequest) ProtoMessage() {} + +func (x *SearchDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*SearchDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{6} +} + +func (m *SearchDataObjectsRequest) GetSearchType() isSearchDataObjectsRequest_SearchType { + if m != nil { + return m.SearchType + } + return nil +} + +func (x *SearchDataObjectsRequest) GetVectorSearch() *VectorSearch { + if x, ok := x.GetSearchType().(*SearchDataObjectsRequest_VectorSearch); ok { + return x.VectorSearch + } + return nil +} + +func (x *SearchDataObjectsRequest) GetSemanticSearch() *SemanticSearch { + if x, ok := x.GetSearchType().(*SearchDataObjectsRequest_SemanticSearch); ok { + return x.SemanticSearch + } + return nil +} + +func (x *SearchDataObjectsRequest) GetTextSearch() *TextSearch { + if x, ok := x.GetSearchType().(*SearchDataObjectsRequest_TextSearch); ok { + return x.TextSearch + } + return nil +} + +func (x *SearchDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *SearchDataObjectsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchDataObjectsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type isSearchDataObjectsRequest_SearchType interface { + isSearchDataObjectsRequest_SearchType() +} + +type SearchDataObjectsRequest_VectorSearch struct { + // A vector search operation. + VectorSearch *VectorSearch `protobuf:"bytes,2,opt,name=vector_search,json=vectorSearch,proto3,oneof"` +} + +type SearchDataObjectsRequest_SemanticSearch struct { + // A semantic search operation. + SemanticSearch *SemanticSearch `protobuf:"bytes,4,opt,name=semantic_search,json=semanticSearch,proto3,oneof"` +} + +type SearchDataObjectsRequest_TextSearch struct { + // Optional. A text search operation. + TextSearch *TextSearch `protobuf:"bytes,7,opt,name=text_search,json=textSearch,proto3,oneof"` +} + +func (*SearchDataObjectsRequest_VectorSearch) isSearchDataObjectsRequest_SearchType() {} + +func (*SearchDataObjectsRequest_SemanticSearch) isSearchDataObjectsRequest_SearchType() {} + +func (*SearchDataObjectsRequest_TextSearch) isSearchDataObjectsRequest_SearchType() {} + +// A single search result. +type SearchResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The matching data object. + DataObject *DataObject `protobuf:"bytes,1,opt,name=data_object,json=dataObject,proto3" json:"data_object,omitempty"` + // Output only. The similarity distance. + Distance *float64 `protobuf:"fixed64,2,opt,name=distance,proto3,oneof" json:"distance,omitempty"` +} + +func (x *SearchResult) Reset() { + *x = SearchResult{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchResult) ProtoMessage() {} + +func (x *SearchResult) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchResult.ProtoReflect.Descriptor instead. +func (*SearchResult) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{7} +} + +func (x *SearchResult) GetDataObject() *DataObject { + if x != nil { + return x.DataObject + } + return nil +} + +func (x *SearchResult) GetDistance() float64 { + if x != nil && x.Distance != nil { + return *x.Distance + } + return 0 +} + +// Metadata about the search execution. +type SearchResponseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of index used. + // + // Types that are assignable to IndexType: + // + // *SearchResponseMetadata_UsedIndex + // *SearchResponseMetadata_UsedKnn + IndexType isSearchResponseMetadata_IndexType `protobuf_oneof:"index_type"` +} + +func (x *SearchResponseMetadata) Reset() { + *x = SearchResponseMetadata{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchResponseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchResponseMetadata) ProtoMessage() {} + +func (x *SearchResponseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchResponseMetadata.ProtoReflect.Descriptor instead. +func (*SearchResponseMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{8} +} + +func (m *SearchResponseMetadata) GetIndexType() isSearchResponseMetadata_IndexType { + if m != nil { + return m.IndexType + } + return nil +} + +func (x *SearchResponseMetadata) GetUsedIndex() *SearchResponseMetadata_IndexInfo { + if x, ok := x.GetIndexType().(*SearchResponseMetadata_UsedIndex); ok { + return x.UsedIndex + } + return nil +} + +func (x *SearchResponseMetadata) GetUsedKnn() bool { + if x, ok := x.GetIndexType().(*SearchResponseMetadata_UsedKnn); ok { + return x.UsedKnn + } + return false +} + +type isSearchResponseMetadata_IndexType interface { + isSearchResponseMetadata_IndexType() +} + +type SearchResponseMetadata_UsedIndex struct { + // Indicates that the search used a particular index. + UsedIndex *SearchResponseMetadata_IndexInfo `protobuf:"bytes,1,opt,name=used_index,json=usedIndex,proto3,oneof"` +} + +type SearchResponseMetadata_UsedKnn struct { + // Output only. If true, the search used the system's default + // K-Nearest Neighbor (KNN) index engine. + UsedKnn bool `protobuf:"varint,2,opt,name=used_knn,json=usedKnn,proto3,oneof"` +} + +func (*SearchResponseMetadata_UsedIndex) isSearchResponseMetadata_IndexType() {} + +func (*SearchResponseMetadata_UsedKnn) isSearchResponseMetadata_IndexType() {} + +// Response for a search request. +type SearchDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The list of dataObjects that match the search criteria. + Results []*SearchResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + // Output only. A token to retrieve next page of results. + // Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to + // obtain that page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Output only. Metadata about the search execution. + SearchResponseMetadata *SearchResponseMetadata `protobuf:"bytes,3,opt,name=search_response_metadata,json=searchResponseMetadata,proto3" json:"search_response_metadata,omitempty"` +} + +func (x *SearchDataObjectsResponse) Reset() { + *x = SearchDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchDataObjectsResponse) ProtoMessage() {} + +func (x *SearchDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*SearchDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{9} +} + +func (x *SearchDataObjectsResponse) GetResults() []*SearchResult { + if x != nil { + return x.Results + } + return nil +} + +func (x *SearchDataObjectsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SearchDataObjectsResponse) GetSearchResponseMetadata() *SearchResponseMetadata { + if x != nil { + return x.SearchResponseMetadata + } + return nil +} + +// Request message for +// [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects]. +type AggregateDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection for which to query. + // Format: `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + // represented as a google.protobuf.Struct. + Filter *structpb.Struct `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Required. The aggregation method to apply to the query. + Aggregate AggregationMethod `protobuf:"varint,3,opt,name=aggregate,proto3,enum=google.cloud.vectorsearch.v1beta.AggregationMethod" json:"aggregate,omitempty"` +} + +func (x *AggregateDataObjectsRequest) Reset() { + *x = AggregateDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AggregateDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregateDataObjectsRequest) ProtoMessage() {} + +func (x *AggregateDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AggregateDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*AggregateDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{10} +} + +func (x *AggregateDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *AggregateDataObjectsRequest) GetFilter() *structpb.Struct { + if x != nil { + return x.Filter + } + return nil +} + +func (x *AggregateDataObjectsRequest) GetAggregate() AggregationMethod { + if x != nil { + return x.Aggregate + } + return AggregationMethod_AGGREGATION_METHOD_UNSPECIFIED +} + +// Response message for +// [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects]. +type AggregateDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The aggregated results of the query. + AggregateResults []*structpb.Struct `protobuf:"bytes,1,rep,name=aggregate_results,json=aggregateResults,proto3" json:"aggregate_results,omitempty"` +} + +func (x *AggregateDataObjectsResponse) Reset() { + *x = AggregateDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AggregateDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AggregateDataObjectsResponse) ProtoMessage() {} + +func (x *AggregateDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AggregateDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*AggregateDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{11} +} + +func (x *AggregateDataObjectsResponse) GetAggregateResults() []*structpb.Struct { + if x != nil { + return x.AggregateResults + } + return nil +} + +// Request message for +// [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects]. +type QueryDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection for which to query. + // Format: `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, + // represented as a google.protobuf.Struct. + Filter *structpb.Struct `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Mask specifying which fields to return. + OutputFields *OutputFields `protobuf:"bytes,7,opt,name=output_fields,json=outputFields,proto3" json:"output_fields,omitempty"` + // Optional. The standard list page size. + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. The standard list page token. + // Typically obtained via + // [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse.next_page_token] + // of the previous + // [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects] + // call. + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *QueryDataObjectsRequest) Reset() { + *x = QueryDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDataObjectsRequest) ProtoMessage() {} + +func (x *QueryDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*QueryDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *QueryDataObjectsRequest) GetFilter() *structpb.Struct { + if x != nil { + return x.Filter + } + return nil +} + +func (x *QueryDataObjectsRequest) GetOutputFields() *OutputFields { + if x != nil { + return x.OutputFields + } + return nil +} + +func (x *QueryDataObjectsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *QueryDataObjectsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// Response message for +// [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects]. +type QueryDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of dataObjects that match the query. + DataObjects []*DataObject `protobuf:"bytes,4,rep,name=data_objects,json=dataObjects,proto3" json:"data_objects,omitempty"` + // A token to retrieve next page of results. + // Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to + // obtain that page. + NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *QueryDataObjectsResponse) Reset() { + *x = QueryDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueryDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryDataObjectsResponse) ProtoMessage() {} + +func (x *QueryDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use QueryDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*QueryDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryDataObjectsResponse) GetDataObjects() []*DataObject { + if x != nil { + return x.DataObjects + } + return nil +} + +func (x *QueryDataObjectsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// A request to perform a batch of search operations. +type BatchSearchDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection for which to search. + // Format: `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. A list of search requests to execute in parallel. + Searches []*Search `protobuf:"bytes,2,rep,name=searches,proto3" json:"searches,omitempty"` + // Optional. Options for combining the results of the batch search operations. + Combine *BatchSearchDataObjectsRequest_CombineResultsOptions `protobuf:"bytes,3,opt,name=combine,proto3" json:"combine,omitempty"` +} + +func (x *BatchSearchDataObjectsRequest) Reset() { + *x = BatchSearchDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchSearchDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSearchDataObjectsRequest) ProtoMessage() {} + +func (x *BatchSearchDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchSearchDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*BatchSearchDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{14} +} + +func (x *BatchSearchDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchSearchDataObjectsRequest) GetSearches() []*Search { + if x != nil { + return x.Searches + } + return nil +} + +func (x *BatchSearchDataObjectsRequest) GetCombine() *BatchSearchDataObjectsRequest_CombineResultsOptions { + if x != nil { + return x.Combine + } + return nil +} + +// Defines a ranker to combine results from multiple searches. +type Ranker struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ranking method to use. + // + // Types that are assignable to Ranker: + // + // *Ranker_Rrf + // *Ranker_Vertex + Ranker isRanker_Ranker `protobuf_oneof:"ranker"` +} + +func (x *Ranker) Reset() { + *x = Ranker{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Ranker) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Ranker) ProtoMessage() {} + +func (x *Ranker) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Ranker.ProtoReflect.Descriptor instead. +func (*Ranker) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{15} +} + +func (m *Ranker) GetRanker() isRanker_Ranker { + if m != nil { + return m.Ranker + } + return nil +} + +func (x *Ranker) GetRrf() *ReciprocalRankFusion { + if x, ok := x.GetRanker().(*Ranker_Rrf); ok { + return x.Rrf + } + return nil +} + +func (x *Ranker) GetVertex() *VertexRanker { + if x, ok := x.GetRanker().(*Ranker_Vertex); ok { + return x.Vertex + } + return nil +} + +type isRanker_Ranker interface { + isRanker_Ranker() +} + +type Ranker_Rrf struct { + // Reciprocal Rank Fusion ranking. + Rrf *ReciprocalRankFusion `protobuf:"bytes,1,opt,name=rrf,proto3,oneof"` +} + +type Ranker_Vertex struct { + // Vertex AI ranking. + Vertex *VertexRanker `protobuf:"bytes,2,opt,name=vertex,proto3,oneof"` +} + +func (*Ranker_Rrf) isRanker_Ranker() {} + +func (*Ranker_Vertex) isRanker_Ranker() {} + +// Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking. +type ReciprocalRankFusion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The weights to apply to each search result set during fusion. + Weights []float64 `protobuf:"fixed64,1,rep,packed,name=weights,proto3" json:"weights,omitempty"` +} + +func (x *ReciprocalRankFusion) Reset() { + *x = ReciprocalRankFusion{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReciprocalRankFusion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReciprocalRankFusion) ProtoMessage() {} + +func (x *ReciprocalRankFusion) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReciprocalRankFusion.ProtoReflect.Descriptor instead. +func (*ReciprocalRankFusion) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{16} +} + +func (x *ReciprocalRankFusion) GetWeights() []float64 { + if x != nil { + return x.Weights + } + return nil +} + +// Defines a ranker using the Vertex AI ranking service. +// See https://cloud.google.com/generative-ai-app-builder/docs/ranking for +// details. +type VertexRanker struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The query against which the records are ranked and scored. + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + // Optional. The template used to generate the record's title. + TitleTemplate string `protobuf:"bytes,2,opt,name=title_template,json=titleTemplate,proto3" json:"title_template,omitempty"` + // Optional. The template used to generate the record's content. + ContentTemplate string `protobuf:"bytes,3,opt,name=content_template,json=contentTemplate,proto3" json:"content_template,omitempty"` + // Required. The model used for ranking documents. If no model is specified, + // then semantic-ranker-default@latest is used. + Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *VertexRanker) Reset() { + *x = VertexRanker{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VertexRanker) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VertexRanker) ProtoMessage() {} + +func (x *VertexRanker) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VertexRanker.ProtoReflect.Descriptor instead. +func (*VertexRanker) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{17} +} + +func (x *VertexRanker) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *VertexRanker) GetTitleTemplate() string { + if x != nil { + return x.TitleTemplate + } + return "" +} + +func (x *VertexRanker) GetContentTemplate() string { + if x != nil { + return x.ContentTemplate + } + return "" +} + +func (x *VertexRanker) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +// A response from a batch search operation. +type BatchSearchDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + Results []*SearchDataObjectsResponse `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (x *BatchSearchDataObjectsResponse) Reset() { + *x = BatchSearchDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchSearchDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSearchDataObjectsResponse) ProtoMessage() {} + +func (x *BatchSearchDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchSearchDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*BatchSearchDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{18} +} + +func (x *BatchSearchDataObjectsResponse) GetResults() []*SearchDataObjectsResponse { + if x != nil { + return x.Results + } + return nil +} + +// Message to specify the index to use for the search. +type SearchHint_IndexHint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *SearchHint_IndexHint) Reset() { + *x = SearchHint_IndexHint{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchHint_IndexHint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchHint_IndexHint) ProtoMessage() {} + +func (x *SearchHint_IndexHint) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchHint_IndexHint.ProtoReflect.Descriptor instead. +func (*SearchHint_IndexHint) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *SearchHint_IndexHint) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Message that indicates the index used for the search. +type SearchResponseMetadata_IndexInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The resource name of the index used for the search. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *SearchResponseMetadata_IndexInfo) Reset() { + *x = SearchResponseMetadata_IndexInfo{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchResponseMetadata_IndexInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchResponseMetadata_IndexInfo) ProtoMessage() {} + +func (x *SearchResponseMetadata_IndexInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchResponseMetadata_IndexInfo.ProtoReflect.Descriptor instead. +func (*SearchResponseMetadata_IndexInfo) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *SearchResponseMetadata_IndexInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Options for combining the results of the batch search operations. +type BatchSearchDataObjectsRequest_CombineResultsOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ranker to use for combining the results. + Ranker *Ranker `protobuf:"bytes,1,opt,name=ranker,proto3" json:"ranker,omitempty"` + // Optional. Mask specifying which fields to return. + OutputFields *OutputFields `protobuf:"bytes,2,opt,name=output_fields,json=outputFields,proto3" json:"output_fields,omitempty"` + // Optional. The number of results to return. If not set, a default value + // will be used. + TopK int32 `protobuf:"varint,3,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"` +} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) Reset() { + *x = BatchSearchDataObjectsRequest_CombineResultsOptions{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSearchDataObjectsRequest_CombineResultsOptions) ProtoMessage() {} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchSearchDataObjectsRequest_CombineResultsOptions.ProtoReflect.Descriptor instead. +func (*BatchSearchDataObjectsRequest_CombineResultsOptions) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP(), []int{14, 0} +} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) GetRanker() *Ranker { + if x != nil { + return x.Ranker + } + return nil +} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) GetOutputFields() *OutputFields { + if x != nil { + return x.OutputFields + } + return nil +} + +func (x *BatchSearchDataObjectsRequest_CombineResultsOptions) GetTopK() int32 { + if x != nil { + return x.TopK + } + return 0 +} + +var File_google_cloud_vectorsearch_v1beta_data_object_search_service_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x65, 0x6d, + 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x64, + 0x61, 0x74, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x22, 0xb2, 0x01, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x6e, 0x74, + 0x12, 0x55, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x6e, + 0x74, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x6b, + 0x6e, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x73, 0x65, 0x4b, + 0x6e, 0x6e, 0x1a, 0x24, 0x0a, 0x09, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x69, 0x6e, 0x74, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x12, 0x55, 0x0a, 0x0d, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x00, 0x52, 0x0c, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x5b, 0x0a, 0x0f, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x22, 0xd2, 0x04, 0x0a, 0x0c, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6e, 0x73, 0x65, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x06, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x55, + 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x34, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x01, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x88, + 0x01, 0x01, 0x12, 0x58, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x52, 0x0a, 0x0b, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x6e, 0x74, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x6e, 0x74, + 0x12, 0x5e, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x69, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x0e, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x42, 0x0d, 0x0a, 0x0b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, + 0x08, 0x0a, 0x06, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x22, 0xb8, 0x02, 0x0a, 0x0e, 0x53, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x24, 0x0a, 0x0b, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x65, + 0x78, 0x74, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x55, 0x0a, 0x09, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x58, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x74, + 0x6f, 0x70, 0x5f, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, + 0x00, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x74, + 0x6f, 0x70, 0x5f, 0x6b, 0x22, 0xe4, 0x01, 0x0a, 0x0a, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x12, 0x24, 0x0a, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x65, 0x78, 0x74, 0x12, 0x2d, 0x0a, 0x10, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x88, 0x01, + 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x22, 0xc1, 0x03, 0x0a, 0x18, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0d, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, + 0x00, 0x52, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, + 0x5b, 0x0a, 0x0f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x54, 0x0a, 0x0b, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x42, 0x0d, 0x0a, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x95, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x52, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x08, 0x64, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, + 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x63, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x48, 0x00, 0x52, 0x09, 0x75, 0x73, + 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x64, 0x5f, + 0x6b, 0x6e, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, + 0x52, 0x07, 0x75, 0x73, 0x65, 0x64, 0x4b, 0x6e, 0x6e, 0x1a, 0x24, 0x0a, 0x09, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, + 0x0c, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x90, 0x02, + 0x0a, 0x19, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x07, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x77, 0x0a, 0x18, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0xf3, 0x01, 0x0a, 0x1b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x56, + 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x22, 0x64, 0x0a, 0x1c, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x10, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xb7, 0x02, 0x0a, + 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, + 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x34, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x93, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, + 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xfd, 0x03, 0x0a, + 0x1d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x12, 0x74, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, + 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x1a, 0xd2, 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x62, + 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x45, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x18, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4b, 0x22, 0xa8, 0x01, 0x0a, + 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x03, 0x72, 0x72, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x69, 0x70, 0x72, 0x6f, 0x63, + 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x03, + 0x72, 0x72, 0x66, 0x12, 0x48, 0x0a, 0x06, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x61, 0x6e, + 0x6b, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x42, 0x08, 0x0a, + 0x06, 0x72, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x14, 0x52, 0x65, 0x63, 0x69, 0x70, + 0x72, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1d, 0x0a, 0x07, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x22, 0xa0, + 0x01, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x52, 0x61, 0x6e, 0x6b, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x0e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x22, 0x7c, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2a, + 0x42, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x47, 0x47, 0x52, 0x45, 0x47, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4f, 0x55, 0x4e, + 0x54, 0x10, 0x01, 0x32, 0x96, 0x08, 0x0a, 0x17, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xe1, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x3a, 0x01, 0x2a, 0x22, 0x48, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x12, 0xdd, 0x01, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x3a, 0x01, 0x2a, 0x22, 0x47, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x12, 0xed, 0x01, 0x0a, 0x14, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x50, 0x3a, 0x01, 0x2a, 0x22, 0x4b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, + 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x12, 0xf5, 0x01, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x01, 0x2a, 0x22, 0x4d, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x1a, 0x4f, 0xca, 0x41, 0x1b, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x90, 0x01, 0x0a, + 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x1c, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, + 0x3b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_goTypes = []any{ + (AggregationMethod)(0), // 0: google.cloud.vectorsearch.v1beta.AggregationMethod + (*OutputFields)(nil), // 1: google.cloud.vectorsearch.v1beta.OutputFields + (*SearchHint)(nil), // 2: google.cloud.vectorsearch.v1beta.SearchHint + (*Search)(nil), // 3: google.cloud.vectorsearch.v1beta.Search + (*VectorSearch)(nil), // 4: google.cloud.vectorsearch.v1beta.VectorSearch + (*SemanticSearch)(nil), // 5: google.cloud.vectorsearch.v1beta.SemanticSearch + (*TextSearch)(nil), // 6: google.cloud.vectorsearch.v1beta.TextSearch + (*SearchDataObjectsRequest)(nil), // 7: google.cloud.vectorsearch.v1beta.SearchDataObjectsRequest + (*SearchResult)(nil), // 8: google.cloud.vectorsearch.v1beta.SearchResult + (*SearchResponseMetadata)(nil), // 9: google.cloud.vectorsearch.v1beta.SearchResponseMetadata + (*SearchDataObjectsResponse)(nil), // 10: google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse + (*AggregateDataObjectsRequest)(nil), // 11: google.cloud.vectorsearch.v1beta.AggregateDataObjectsRequest + (*AggregateDataObjectsResponse)(nil), // 12: google.cloud.vectorsearch.v1beta.AggregateDataObjectsResponse + (*QueryDataObjectsRequest)(nil), // 13: google.cloud.vectorsearch.v1beta.QueryDataObjectsRequest + (*QueryDataObjectsResponse)(nil), // 14: google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse + (*BatchSearchDataObjectsRequest)(nil), // 15: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest + (*Ranker)(nil), // 16: google.cloud.vectorsearch.v1beta.Ranker + (*ReciprocalRankFusion)(nil), // 17: google.cloud.vectorsearch.v1beta.ReciprocalRankFusion + (*VertexRanker)(nil), // 18: google.cloud.vectorsearch.v1beta.VertexRanker + (*BatchSearchDataObjectsResponse)(nil), // 19: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsResponse + (*SearchHint_IndexHint)(nil), // 20: google.cloud.vectorsearch.v1beta.SearchHint.IndexHint + (*SearchResponseMetadata_IndexInfo)(nil), // 21: google.cloud.vectorsearch.v1beta.SearchResponseMetadata.IndexInfo + (*BatchSearchDataObjectsRequest_CombineResultsOptions)(nil), // 22: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.CombineResultsOptions + (*DenseVector)(nil), // 23: google.cloud.vectorsearch.v1beta.DenseVector + (*SparseVector)(nil), // 24: google.cloud.vectorsearch.v1beta.SparseVector + (*structpb.Struct)(nil), // 25: google.protobuf.Struct + (DistanceMetric)(0), // 26: google.cloud.vectorsearch.v1beta.DistanceMetric + (EmbeddingTaskType)(0), // 27: google.cloud.vectorsearch.v1beta.EmbeddingTaskType + (*DataObject)(nil), // 28: google.cloud.vectorsearch.v1beta.DataObject +} +var file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_depIdxs = []int32{ + 20, // 0: google.cloud.vectorsearch.v1beta.SearchHint.use_index:type_name -> google.cloud.vectorsearch.v1beta.SearchHint.IndexHint + 4, // 1: google.cloud.vectorsearch.v1beta.Search.vector_search:type_name -> google.cloud.vectorsearch.v1beta.VectorSearch + 5, // 2: google.cloud.vectorsearch.v1beta.Search.semantic_search:type_name -> google.cloud.vectorsearch.v1beta.SemanticSearch + 23, // 3: google.cloud.vectorsearch.v1beta.VectorSearch.vector:type_name -> google.cloud.vectorsearch.v1beta.DenseVector + 24, // 4: google.cloud.vectorsearch.v1beta.VectorSearch.sparse_vector:type_name -> google.cloud.vectorsearch.v1beta.SparseVector + 25, // 5: google.cloud.vectorsearch.v1beta.VectorSearch.filter:type_name -> google.protobuf.Struct + 1, // 6: google.cloud.vectorsearch.v1beta.VectorSearch.output_fields:type_name -> google.cloud.vectorsearch.v1beta.OutputFields + 2, // 7: google.cloud.vectorsearch.v1beta.VectorSearch.search_hint:type_name -> google.cloud.vectorsearch.v1beta.SearchHint + 26, // 8: google.cloud.vectorsearch.v1beta.VectorSearch.distance_metric:type_name -> google.cloud.vectorsearch.v1beta.DistanceMetric + 27, // 9: google.cloud.vectorsearch.v1beta.SemanticSearch.task_type:type_name -> google.cloud.vectorsearch.v1beta.EmbeddingTaskType + 1, // 10: google.cloud.vectorsearch.v1beta.SemanticSearch.output_fields:type_name -> google.cloud.vectorsearch.v1beta.OutputFields + 1, // 11: google.cloud.vectorsearch.v1beta.TextSearch.output_fields:type_name -> google.cloud.vectorsearch.v1beta.OutputFields + 4, // 12: google.cloud.vectorsearch.v1beta.SearchDataObjectsRequest.vector_search:type_name -> google.cloud.vectorsearch.v1beta.VectorSearch + 5, // 13: google.cloud.vectorsearch.v1beta.SearchDataObjectsRequest.semantic_search:type_name -> google.cloud.vectorsearch.v1beta.SemanticSearch + 6, // 14: google.cloud.vectorsearch.v1beta.SearchDataObjectsRequest.text_search:type_name -> google.cloud.vectorsearch.v1beta.TextSearch + 28, // 15: google.cloud.vectorsearch.v1beta.SearchResult.data_object:type_name -> google.cloud.vectorsearch.v1beta.DataObject + 21, // 16: google.cloud.vectorsearch.v1beta.SearchResponseMetadata.used_index:type_name -> google.cloud.vectorsearch.v1beta.SearchResponseMetadata.IndexInfo + 8, // 17: google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse.results:type_name -> google.cloud.vectorsearch.v1beta.SearchResult + 9, // 18: google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse.search_response_metadata:type_name -> google.cloud.vectorsearch.v1beta.SearchResponseMetadata + 25, // 19: google.cloud.vectorsearch.v1beta.AggregateDataObjectsRequest.filter:type_name -> google.protobuf.Struct + 0, // 20: google.cloud.vectorsearch.v1beta.AggregateDataObjectsRequest.aggregate:type_name -> google.cloud.vectorsearch.v1beta.AggregationMethod + 25, // 21: google.cloud.vectorsearch.v1beta.AggregateDataObjectsResponse.aggregate_results:type_name -> google.protobuf.Struct + 25, // 22: google.cloud.vectorsearch.v1beta.QueryDataObjectsRequest.filter:type_name -> google.protobuf.Struct + 1, // 23: google.cloud.vectorsearch.v1beta.QueryDataObjectsRequest.output_fields:type_name -> google.cloud.vectorsearch.v1beta.OutputFields + 28, // 24: google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse.data_objects:type_name -> google.cloud.vectorsearch.v1beta.DataObject + 3, // 25: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.searches:type_name -> google.cloud.vectorsearch.v1beta.Search + 22, // 26: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.combine:type_name -> google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.CombineResultsOptions + 17, // 27: google.cloud.vectorsearch.v1beta.Ranker.rrf:type_name -> google.cloud.vectorsearch.v1beta.ReciprocalRankFusion + 18, // 28: google.cloud.vectorsearch.v1beta.Ranker.vertex:type_name -> google.cloud.vectorsearch.v1beta.VertexRanker + 10, // 29: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsResponse.results:type_name -> google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse + 16, // 30: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.CombineResultsOptions.ranker:type_name -> google.cloud.vectorsearch.v1beta.Ranker + 1, // 31: google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.CombineResultsOptions.output_fields:type_name -> google.cloud.vectorsearch.v1beta.OutputFields + 7, // 32: google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects:input_type -> google.cloud.vectorsearch.v1beta.SearchDataObjectsRequest + 13, // 33: google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects:input_type -> google.cloud.vectorsearch.v1beta.QueryDataObjectsRequest + 11, // 34: google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects:input_type -> google.cloud.vectorsearch.v1beta.AggregateDataObjectsRequest + 15, // 35: google.cloud.vectorsearch.v1beta.DataObjectSearchService.BatchSearchDataObjects:input_type -> google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest + 10, // 36: google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects:output_type -> google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse + 14, // 37: google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects:output_type -> google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse + 12, // 38: google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects:output_type -> google.cloud.vectorsearch.v1beta.AggregateDataObjectsResponse + 19, // 39: google.cloud.vectorsearch.v1beta.DataObjectSearchService.BatchSearchDataObjects:output_type -> google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsResponse + 36, // [36:40] is the sub-list for method output_type + 32, // [32:36] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_init() } +func file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_init() { + if File_google_cloud_vectorsearch_v1beta_data_object_search_service_proto != nil { + return + } + file_google_cloud_vectorsearch_v1beta_common_proto_init() + file_google_cloud_vectorsearch_v1beta_data_object_proto_init() + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_init() + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[1].OneofWrappers = []any{ + (*SearchHint_UseIndex)(nil), + (*SearchHint_UseKnn)(nil), + } + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[2].OneofWrappers = []any{ + (*Search_VectorSearch)(nil), + (*Search_SemanticSearch)(nil), + } + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[3].OneofWrappers = []any{ + (*VectorSearch_Vector)(nil), + (*VectorSearch_SparseVector)(nil), + } + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[4].OneofWrappers = []any{} + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[5].OneofWrappers = []any{} + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[6].OneofWrappers = []any{ + (*SearchDataObjectsRequest_VectorSearch)(nil), + (*SearchDataObjectsRequest_SemanticSearch)(nil), + (*SearchDataObjectsRequest_TextSearch)(nil), + } + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[7].OneofWrappers = []any{} + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[8].OneofWrappers = []any{ + (*SearchResponseMetadata_UsedIndex)(nil), + (*SearchResponseMetadata_UsedKnn)(nil), + } + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes[15].OneofWrappers = []any{ + (*Ranker_Rrf)(nil), + (*Ranker_Vertex)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 22, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_depIdxs, + EnumInfos: file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_enumTypes, + MessageInfos: file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_msgTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_data_object_search_service_proto = out.File + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_data_object_search_service_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service_grpc.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service_grpc.pb.go new file mode 100644 index 000000000000..7748c462a04d --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/data_object_search_service_grpc.pb.go @@ -0,0 +1,241 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/data_object_search_service.proto + +package vectorsearchpb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + DataObjectSearchService_SearchDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectSearchService/SearchDataObjects" + DataObjectSearchService_QueryDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectSearchService/QueryDataObjects" + DataObjectSearchService_AggregateDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectSearchService/AggregateDataObjects" + DataObjectSearchService_BatchSearchDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectSearchService/BatchSearchDataObjects" +) + +// DataObjectSearchServiceClient is the client API for DataObjectSearchService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DataObjectSearchServiceClient interface { + // Searches data objects. + SearchDataObjects(ctx context.Context, in *SearchDataObjectsRequest, opts ...grpc.CallOption) (*SearchDataObjectsResponse, error) + // Queries data objects. + QueryDataObjects(ctx context.Context, in *QueryDataObjectsRequest, opts ...grpc.CallOption) (*QueryDataObjectsResponse, error) + // Aggregates data objects. + AggregateDataObjects(ctx context.Context, in *AggregateDataObjectsRequest, opts ...grpc.CallOption) (*AggregateDataObjectsResponse, error) + // Batch searches data objects. + BatchSearchDataObjects(ctx context.Context, in *BatchSearchDataObjectsRequest, opts ...grpc.CallOption) (*BatchSearchDataObjectsResponse, error) +} + +type dataObjectSearchServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDataObjectSearchServiceClient(cc grpc.ClientConnInterface) DataObjectSearchServiceClient { + return &dataObjectSearchServiceClient{cc} +} + +func (c *dataObjectSearchServiceClient) SearchDataObjects(ctx context.Context, in *SearchDataObjectsRequest, opts ...grpc.CallOption) (*SearchDataObjectsResponse, error) { + out := new(SearchDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectSearchService_SearchDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectSearchServiceClient) QueryDataObjects(ctx context.Context, in *QueryDataObjectsRequest, opts ...grpc.CallOption) (*QueryDataObjectsResponse, error) { + out := new(QueryDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectSearchService_QueryDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectSearchServiceClient) AggregateDataObjects(ctx context.Context, in *AggregateDataObjectsRequest, opts ...grpc.CallOption) (*AggregateDataObjectsResponse, error) { + out := new(AggregateDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectSearchService_AggregateDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectSearchServiceClient) BatchSearchDataObjects(ctx context.Context, in *BatchSearchDataObjectsRequest, opts ...grpc.CallOption) (*BatchSearchDataObjectsResponse, error) { + out := new(BatchSearchDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectSearchService_BatchSearchDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataObjectSearchServiceServer is the server API for DataObjectSearchService service. +// All implementations should embed UnimplementedDataObjectSearchServiceServer +// for forward compatibility +type DataObjectSearchServiceServer interface { + // Searches data objects. + SearchDataObjects(context.Context, *SearchDataObjectsRequest) (*SearchDataObjectsResponse, error) + // Queries data objects. + QueryDataObjects(context.Context, *QueryDataObjectsRequest) (*QueryDataObjectsResponse, error) + // Aggregates data objects. + AggregateDataObjects(context.Context, *AggregateDataObjectsRequest) (*AggregateDataObjectsResponse, error) + // Batch searches data objects. + BatchSearchDataObjects(context.Context, *BatchSearchDataObjectsRequest) (*BatchSearchDataObjectsResponse, error) +} + +// UnimplementedDataObjectSearchServiceServer should be embedded to have forward compatible implementations. +type UnimplementedDataObjectSearchServiceServer struct { +} + +func (UnimplementedDataObjectSearchServiceServer) SearchDataObjects(context.Context, *SearchDataObjectsRequest) (*SearchDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchDataObjects not implemented") +} +func (UnimplementedDataObjectSearchServiceServer) QueryDataObjects(context.Context, *QueryDataObjectsRequest) (*QueryDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryDataObjects not implemented") +} +func (UnimplementedDataObjectSearchServiceServer) AggregateDataObjects(context.Context, *AggregateDataObjectsRequest) (*AggregateDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AggregateDataObjects not implemented") +} +func (UnimplementedDataObjectSearchServiceServer) BatchSearchDataObjects(context.Context, *BatchSearchDataObjectsRequest) (*BatchSearchDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchSearchDataObjects not implemented") +} + +// UnsafeDataObjectSearchServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DataObjectSearchServiceServer will +// result in compilation errors. +type UnsafeDataObjectSearchServiceServer interface { + mustEmbedUnimplementedDataObjectSearchServiceServer() +} + +func RegisterDataObjectSearchServiceServer(s grpc.ServiceRegistrar, srv DataObjectSearchServiceServer) { + s.RegisterService(&DataObjectSearchService_ServiceDesc, srv) +} + +func _DataObjectSearchService_SearchDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectSearchServiceServer).SearchDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectSearchService_SearchDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectSearchServiceServer).SearchDataObjects(ctx, req.(*SearchDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectSearchService_QueryDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectSearchServiceServer).QueryDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectSearchService_QueryDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectSearchServiceServer).QueryDataObjects(ctx, req.(*QueryDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectSearchService_AggregateDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AggregateDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectSearchServiceServer).AggregateDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectSearchService_AggregateDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectSearchServiceServer).AggregateDataObjects(ctx, req.(*AggregateDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectSearchService_BatchSearchDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchSearchDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectSearchServiceServer).BatchSearchDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectSearchService_BatchSearchDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectSearchServiceServer).BatchSearchDataObjects(ctx, req.(*BatchSearchDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DataObjectSearchService_ServiceDesc is the grpc.ServiceDesc for DataObjectSearchService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DataObjectSearchService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.vectorsearch.v1beta.DataObjectSearchService", + HandlerType: (*DataObjectSearchServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SearchDataObjects", + Handler: _DataObjectSearchService_SearchDataObjects_Handler, + }, + { + MethodName: "QueryDataObjects", + Handler: _DataObjectSearchService_QueryDataObjects_Handler, + }, + { + MethodName: "AggregateDataObjects", + Handler: _DataObjectSearchService_AggregateDataObjects_Handler, + }, + { + MethodName: "BatchSearchDataObjects", + Handler: _DataObjectSearchService_BatchSearchDataObjects_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/vectorsearch/v1beta/data_object_search_service.proto", +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/data_object_service.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/data_object_service.pb.go new file mode 100644 index 000000000000..ee03697c2b16 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/data_object_service.pb.go @@ -0,0 +1,844 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/data_object_service.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for +// [DataObjectService.CreateDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.CreateDataObject]. +type CreateDataObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection to create the DataObject in. + // Format: `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The id of the dataObject to create. + // The id must be 1-63 characters long, and comply with + // RFC1035. + // Specifically, it must be 1-63 characters long and match the regular + // expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?`. + DataObjectId string `protobuf:"bytes,2,opt,name=data_object_id,json=dataObjectId,proto3" json:"data_object_id,omitempty"` + // Required. The DataObject to create. + DataObject *DataObject `protobuf:"bytes,3,opt,name=data_object,json=dataObject,proto3" json:"data_object,omitempty"` +} + +func (x *CreateDataObjectRequest) Reset() { + *x = CreateDataObjectRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateDataObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDataObjectRequest) ProtoMessage() {} + +func (x *CreateDataObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDataObjectRequest.ProtoReflect.Descriptor instead. +func (*CreateDataObjectRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDataObjectRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDataObjectRequest) GetDataObjectId() string { + if x != nil { + return x.DataObjectId + } + return "" +} + +func (x *CreateDataObjectRequest) GetDataObject() *DataObject { + if x != nil { + return x.DataObject + } + return nil +} + +// Request message for +// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects]. +type BatchCreateDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The request message specifying the resources to create. + // A maximum of 1000 DataObjects can be created in a batch. + Requests []*CreateDataObjectRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchCreateDataObjectsRequest) Reset() { + *x = BatchCreateDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchCreateDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateDataObjectsRequest) ProtoMessage() {} + +func (x *BatchCreateDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*BatchCreateDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{1} +} + +func (x *BatchCreateDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchCreateDataObjectsRequest) GetRequests() []*CreateDataObjectRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for +// [DataObjectService.BatchCreateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects]. +type BatchCreateDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // DataObjects created. + DataObjects []*DataObject `protobuf:"bytes,1,rep,name=data_objects,json=dataObjects,proto3" json:"data_objects,omitempty"` +} + +func (x *BatchCreateDataObjectsResponse) Reset() { + *x = BatchCreateDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchCreateDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchCreateDataObjectsResponse) ProtoMessage() {} + +func (x *BatchCreateDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchCreateDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*BatchCreateDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{2} +} + +func (x *BatchCreateDataObjectsResponse) GetDataObjects() []*DataObject { + if x != nil { + return x.DataObjects + } + return nil +} + +// Request message for +// [DataObjectService.GetDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.GetDataObject]. +type GetDataObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DataObject resource. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDataObjectRequest) Reset() { + *x = GetDataObjectRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetDataObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDataObjectRequest) ProtoMessage() {} + +func (x *GetDataObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDataObjectRequest.ProtoReflect.Descriptor instead. +func (*GetDataObjectRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetDataObjectRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [DataObjectService.UpdateDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.UpdateDataObject]. +type UpdateDataObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The DataObject which replaces the resource on the server. + DataObject *DataObject `protobuf:"bytes,1,opt,name=data_object,json=dataObject,proto3" json:"data_object,omitempty"` + // Optional. The update mask applies to the resource. See + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDataObjectRequest) Reset() { + *x = UpdateDataObjectRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateDataObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDataObjectRequest) ProtoMessage() {} + +func (x *UpdateDataObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDataObjectRequest.ProtoReflect.Descriptor instead. +func (*UpdateDataObjectRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateDataObjectRequest) GetDataObject() *DataObject { + if x != nil { + return x.DataObject + } + return nil +} + +func (x *UpdateDataObjectRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Request message for +// [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects]. +type BatchUpdateDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The request message specifying the resources to update. + // A maximum of 1000 DataObjects can be updated in a batch. + Requests []*UpdateDataObjectRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchUpdateDataObjectsRequest) Reset() { + *x = BatchUpdateDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchUpdateDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateDataObjectsRequest) ProtoMessage() {} + +func (x *BatchUpdateDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*BatchUpdateDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{5} +} + +func (x *BatchUpdateDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchUpdateDataObjectsRequest) GetRequests() []*UpdateDataObjectRequest { + if x != nil { + return x.Requests + } + return nil +} + +// Response message for +// [DataObjectService.BatchUpdateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects]. +type BatchUpdateDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BatchUpdateDataObjectsResponse) Reset() { + *x = BatchUpdateDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchUpdateDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchUpdateDataObjectsResponse) ProtoMessage() {} + +func (x *BatchUpdateDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchUpdateDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*BatchUpdateDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{6} +} + +// Request message for +// [DataObjectService.DeleteDataObject][google.cloud.vectorsearch.v1beta.DataObjectService.DeleteDataObject]. +type DeleteDataObjectRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the DataObject resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataObjects/{dataObject}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteDataObjectRequest) Reset() { + *x = DeleteDataObjectRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteDataObjectRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDataObjectRequest) ProtoMessage() {} + +func (x *DeleteDataObjectRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDataObjectRequest.ProtoReflect.Descriptor instead. +func (*DeleteDataObjectRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteDataObjectRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request message for +// [DataObjectService.BatchDeleteDataObjects][google.cloud.vectorsearch.v1beta.DataObjectService.BatchDeleteDataObjects]. +type BatchDeleteDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection to delete the DataObjects in. + // Format: `projects/{project}/locations/{location}/collections/{collection}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The request message specifying the resources to delete. + // A maximum of 1000 DataObjects can be deleted in a batch. + Requests []*DeleteDataObjectRequest `protobuf:"bytes,3,rep,name=requests,proto3" json:"requests,omitempty"` +} + +func (x *BatchDeleteDataObjectsRequest) Reset() { + *x = BatchDeleteDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatchDeleteDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchDeleteDataObjectsRequest) ProtoMessage() {} + +func (x *BatchDeleteDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchDeleteDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*BatchDeleteDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP(), []int{8} +} + +func (x *BatchDeleteDataObjectsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *BatchDeleteDataObjectsRequest) GetRequests() []*DeleteDataObjectRequest { + if x != nil { + return x.Requests + } + return nil +} + +var File_google_cloud_vectorsearch_v1beta_data_object_service_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x49, 0x64, 0x12, 0x52, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x64, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x5a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x71, 0x0a, + 0x1e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4f, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x22, 0x5a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaf, 0x01, 0x0a, + 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x40, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xc3, + 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x5a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xc3, 0x01, 0x0a, 0x1d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, + 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x5a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x32, 0xc0, 0x0d, 0x0a, 0x11, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0xf7, 0x01, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, + 0x7a, 0xda, 0x41, 0x21, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x50, 0x3a, 0x0b, 0x64, 0x61, 0x74, + 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x41, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0xf5, 0x01, 0x0a, 0x16, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x52, 0x3a, 0x01, 0x2a, 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0xc7, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x50, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xf9, 0x01, + 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7c, 0xda, 0x41, 0x17, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5c, 0x3a, 0x0b, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x4d, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x87, 0x02, 0x0a, 0x16, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x52, 0x3a, 0x01, 0x2a, 0x22, 0x4d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0xb7, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x50, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x2a, 0x41, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xdd, 0x01, + 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x6a, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x52, 0x3a, 0x01, 0x2a, 0x22, 0x4d, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x3a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x1a, 0x4f, 0xca, + 0x41, 0x1b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x8a, + 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x16, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x3b, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_google_cloud_vectorsearch_v1beta_data_object_service_proto_goTypes = []any{ + (*CreateDataObjectRequest)(nil), // 0: google.cloud.vectorsearch.v1beta.CreateDataObjectRequest + (*BatchCreateDataObjectsRequest)(nil), // 1: google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsRequest + (*BatchCreateDataObjectsResponse)(nil), // 2: google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsResponse + (*GetDataObjectRequest)(nil), // 3: google.cloud.vectorsearch.v1beta.GetDataObjectRequest + (*UpdateDataObjectRequest)(nil), // 4: google.cloud.vectorsearch.v1beta.UpdateDataObjectRequest + (*BatchUpdateDataObjectsRequest)(nil), // 5: google.cloud.vectorsearch.v1beta.BatchUpdateDataObjectsRequest + (*BatchUpdateDataObjectsResponse)(nil), // 6: google.cloud.vectorsearch.v1beta.BatchUpdateDataObjectsResponse + (*DeleteDataObjectRequest)(nil), // 7: google.cloud.vectorsearch.v1beta.DeleteDataObjectRequest + (*BatchDeleteDataObjectsRequest)(nil), // 8: google.cloud.vectorsearch.v1beta.BatchDeleteDataObjectsRequest + (*DataObject)(nil), // 9: google.cloud.vectorsearch.v1beta.DataObject + (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty +} +var file_google_cloud_vectorsearch_v1beta_data_object_service_proto_depIdxs = []int32{ + 9, // 0: google.cloud.vectorsearch.v1beta.CreateDataObjectRequest.data_object:type_name -> google.cloud.vectorsearch.v1beta.DataObject + 0, // 1: google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsRequest.requests:type_name -> google.cloud.vectorsearch.v1beta.CreateDataObjectRequest + 9, // 2: google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsResponse.data_objects:type_name -> google.cloud.vectorsearch.v1beta.DataObject + 9, // 3: google.cloud.vectorsearch.v1beta.UpdateDataObjectRequest.data_object:type_name -> google.cloud.vectorsearch.v1beta.DataObject + 10, // 4: google.cloud.vectorsearch.v1beta.UpdateDataObjectRequest.update_mask:type_name -> google.protobuf.FieldMask + 4, // 5: google.cloud.vectorsearch.v1beta.BatchUpdateDataObjectsRequest.requests:type_name -> google.cloud.vectorsearch.v1beta.UpdateDataObjectRequest + 7, // 6: google.cloud.vectorsearch.v1beta.BatchDeleteDataObjectsRequest.requests:type_name -> google.cloud.vectorsearch.v1beta.DeleteDataObjectRequest + 0, // 7: google.cloud.vectorsearch.v1beta.DataObjectService.CreateDataObject:input_type -> google.cloud.vectorsearch.v1beta.CreateDataObjectRequest + 1, // 8: google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects:input_type -> google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsRequest + 3, // 9: google.cloud.vectorsearch.v1beta.DataObjectService.GetDataObject:input_type -> google.cloud.vectorsearch.v1beta.GetDataObjectRequest + 4, // 10: google.cloud.vectorsearch.v1beta.DataObjectService.UpdateDataObject:input_type -> google.cloud.vectorsearch.v1beta.UpdateDataObjectRequest + 5, // 11: google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects:input_type -> google.cloud.vectorsearch.v1beta.BatchUpdateDataObjectsRequest + 7, // 12: google.cloud.vectorsearch.v1beta.DataObjectService.DeleteDataObject:input_type -> google.cloud.vectorsearch.v1beta.DeleteDataObjectRequest + 8, // 13: google.cloud.vectorsearch.v1beta.DataObjectService.BatchDeleteDataObjects:input_type -> google.cloud.vectorsearch.v1beta.BatchDeleteDataObjectsRequest + 9, // 14: google.cloud.vectorsearch.v1beta.DataObjectService.CreateDataObject:output_type -> google.cloud.vectorsearch.v1beta.DataObject + 2, // 15: google.cloud.vectorsearch.v1beta.DataObjectService.BatchCreateDataObjects:output_type -> google.cloud.vectorsearch.v1beta.BatchCreateDataObjectsResponse + 9, // 16: google.cloud.vectorsearch.v1beta.DataObjectService.GetDataObject:output_type -> google.cloud.vectorsearch.v1beta.DataObject + 9, // 17: google.cloud.vectorsearch.v1beta.DataObjectService.UpdateDataObject:output_type -> google.cloud.vectorsearch.v1beta.DataObject + 6, // 18: google.cloud.vectorsearch.v1beta.DataObjectService.BatchUpdateDataObjects:output_type -> google.cloud.vectorsearch.v1beta.BatchUpdateDataObjectsResponse + 11, // 19: google.cloud.vectorsearch.v1beta.DataObjectService.DeleteDataObject:output_type -> google.protobuf.Empty + 11, // 20: google.cloud.vectorsearch.v1beta.DataObjectService.BatchDeleteDataObjects:output_type -> google.protobuf.Empty + 14, // [14:21] is the sub-list for method output_type + 7, // [7:14] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_data_object_service_proto_init() } +func file_google_cloud_vectorsearch_v1beta_data_object_service_proto_init() { + if File_google_cloud_vectorsearch_v1beta_data_object_service_proto != nil { + return + } + file_google_cloud_vectorsearch_v1beta_data_object_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_data_object_service_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_data_object_service_proto_depIdxs, + MessageInfos: file_google_cloud_vectorsearch_v1beta_data_object_service_proto_msgTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_data_object_service_proto = out.File + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_data_object_service_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/data_object_service_grpc.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/data_object_service_grpc.pb.go new file mode 100644 index 000000000000..c3845bc55e2a --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/data_object_service_grpc.pb.go @@ -0,0 +1,359 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/data_object_service.proto + +package vectorsearchpb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + DataObjectService_CreateDataObject_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/CreateDataObject" + DataObjectService_BatchCreateDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/BatchCreateDataObjects" + DataObjectService_GetDataObject_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/GetDataObject" + DataObjectService_UpdateDataObject_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/UpdateDataObject" + DataObjectService_BatchUpdateDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/BatchUpdateDataObjects" + DataObjectService_DeleteDataObject_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/DeleteDataObject" + DataObjectService_BatchDeleteDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.DataObjectService/BatchDeleteDataObjects" +) + +// DataObjectServiceClient is the client API for DataObjectService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DataObjectServiceClient interface { + // Creates a dataObject. + CreateDataObject(ctx context.Context, in *CreateDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) + // Creates a batch of dataObjects. + BatchCreateDataObjects(ctx context.Context, in *BatchCreateDataObjectsRequest, opts ...grpc.CallOption) (*BatchCreateDataObjectsResponse, error) + // Gets a data object. + GetDataObject(ctx context.Context, in *GetDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) + // Updates a dataObject. + UpdateDataObject(ctx context.Context, in *UpdateDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) + // Updates dataObjects in a batch. + BatchUpdateDataObjects(ctx context.Context, in *BatchUpdateDataObjectsRequest, opts ...grpc.CallOption) (*BatchUpdateDataObjectsResponse, error) + // Deletes a dataObject. + DeleteDataObject(ctx context.Context, in *DeleteDataObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Deletes dataObjects in a batch. + BatchDeleteDataObjects(ctx context.Context, in *BatchDeleteDataObjectsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type dataObjectServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDataObjectServiceClient(cc grpc.ClientConnInterface) DataObjectServiceClient { + return &dataObjectServiceClient{cc} +} + +func (c *dataObjectServiceClient) CreateDataObject(ctx context.Context, in *CreateDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) { + out := new(DataObject) + err := c.cc.Invoke(ctx, DataObjectService_CreateDataObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) BatchCreateDataObjects(ctx context.Context, in *BatchCreateDataObjectsRequest, opts ...grpc.CallOption) (*BatchCreateDataObjectsResponse, error) { + out := new(BatchCreateDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectService_BatchCreateDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) GetDataObject(ctx context.Context, in *GetDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) { + out := new(DataObject) + err := c.cc.Invoke(ctx, DataObjectService_GetDataObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) UpdateDataObject(ctx context.Context, in *UpdateDataObjectRequest, opts ...grpc.CallOption) (*DataObject, error) { + out := new(DataObject) + err := c.cc.Invoke(ctx, DataObjectService_UpdateDataObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) BatchUpdateDataObjects(ctx context.Context, in *BatchUpdateDataObjectsRequest, opts ...grpc.CallOption) (*BatchUpdateDataObjectsResponse, error) { + out := new(BatchUpdateDataObjectsResponse) + err := c.cc.Invoke(ctx, DataObjectService_BatchUpdateDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) DeleteDataObject(ctx context.Context, in *DeleteDataObjectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, DataObjectService_DeleteDataObject_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataObjectServiceClient) BatchDeleteDataObjects(ctx context.Context, in *BatchDeleteDataObjectsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, DataObjectService_BatchDeleteDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataObjectServiceServer is the server API for DataObjectService service. +// All implementations should embed UnimplementedDataObjectServiceServer +// for forward compatibility +type DataObjectServiceServer interface { + // Creates a dataObject. + CreateDataObject(context.Context, *CreateDataObjectRequest) (*DataObject, error) + // Creates a batch of dataObjects. + BatchCreateDataObjects(context.Context, *BatchCreateDataObjectsRequest) (*BatchCreateDataObjectsResponse, error) + // Gets a data object. + GetDataObject(context.Context, *GetDataObjectRequest) (*DataObject, error) + // Updates a dataObject. + UpdateDataObject(context.Context, *UpdateDataObjectRequest) (*DataObject, error) + // Updates dataObjects in a batch. + BatchUpdateDataObjects(context.Context, *BatchUpdateDataObjectsRequest) (*BatchUpdateDataObjectsResponse, error) + // Deletes a dataObject. + DeleteDataObject(context.Context, *DeleteDataObjectRequest) (*emptypb.Empty, error) + // Deletes dataObjects in a batch. + BatchDeleteDataObjects(context.Context, *BatchDeleteDataObjectsRequest) (*emptypb.Empty, error) +} + +// UnimplementedDataObjectServiceServer should be embedded to have forward compatible implementations. +type UnimplementedDataObjectServiceServer struct { +} + +func (UnimplementedDataObjectServiceServer) CreateDataObject(context.Context, *CreateDataObjectRequest) (*DataObject, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDataObject not implemented") +} +func (UnimplementedDataObjectServiceServer) BatchCreateDataObjects(context.Context, *BatchCreateDataObjectsRequest) (*BatchCreateDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchCreateDataObjects not implemented") +} +func (UnimplementedDataObjectServiceServer) GetDataObject(context.Context, *GetDataObjectRequest) (*DataObject, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDataObject not implemented") +} +func (UnimplementedDataObjectServiceServer) UpdateDataObject(context.Context, *UpdateDataObjectRequest) (*DataObject, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDataObject not implemented") +} +func (UnimplementedDataObjectServiceServer) BatchUpdateDataObjects(context.Context, *BatchUpdateDataObjectsRequest) (*BatchUpdateDataObjectsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateDataObjects not implemented") +} +func (UnimplementedDataObjectServiceServer) DeleteDataObject(context.Context, *DeleteDataObjectRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDataObject not implemented") +} +func (UnimplementedDataObjectServiceServer) BatchDeleteDataObjects(context.Context, *BatchDeleteDataObjectsRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method BatchDeleteDataObjects not implemented") +} + +// UnsafeDataObjectServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DataObjectServiceServer will +// result in compilation errors. +type UnsafeDataObjectServiceServer interface { + mustEmbedUnimplementedDataObjectServiceServer() +} + +func RegisterDataObjectServiceServer(s grpc.ServiceRegistrar, srv DataObjectServiceServer) { + s.RegisterService(&DataObjectService_ServiceDesc, srv) +} + +func _DataObjectService_CreateDataObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDataObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).CreateDataObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_CreateDataObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).CreateDataObject(ctx, req.(*CreateDataObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_BatchCreateDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchCreateDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).BatchCreateDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_BatchCreateDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).BatchCreateDataObjects(ctx, req.(*BatchCreateDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_GetDataObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDataObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).GetDataObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_GetDataObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).GetDataObject(ctx, req.(*GetDataObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_UpdateDataObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDataObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).UpdateDataObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_UpdateDataObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).UpdateDataObject(ctx, req.(*UpdateDataObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_BatchUpdateDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchUpdateDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).BatchUpdateDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_BatchUpdateDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).BatchUpdateDataObjects(ctx, req.(*BatchUpdateDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_DeleteDataObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDataObjectRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).DeleteDataObject(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_DeleteDataObject_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).DeleteDataObject(ctx, req.(*DeleteDataObjectRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataObjectService_BatchDeleteDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BatchDeleteDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataObjectServiceServer).BatchDeleteDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataObjectService_BatchDeleteDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataObjectServiceServer).BatchDeleteDataObjects(ctx, req.(*BatchDeleteDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DataObjectService_ServiceDesc is the grpc.ServiceDesc for DataObjectService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DataObjectService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.vectorsearch.v1beta.DataObjectService", + HandlerType: (*DataObjectServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDataObject", + Handler: _DataObjectService_CreateDataObject_Handler, + }, + { + MethodName: "BatchCreateDataObjects", + Handler: _DataObjectService_BatchCreateDataObjects_Handler, + }, + { + MethodName: "GetDataObject", + Handler: _DataObjectService_GetDataObject_Handler, + }, + { + MethodName: "UpdateDataObject", + Handler: _DataObjectService_UpdateDataObject_Handler, + }, + { + MethodName: "BatchUpdateDataObjects", + Handler: _DataObjectService_BatchUpdateDataObjects_Handler, + }, + { + MethodName: "DeleteDataObject", + Handler: _DataObjectService_DeleteDataObject_Handler, + }, + { + MethodName: "BatchDeleteDataObjects", + Handler: _DataObjectService_BatchDeleteDataObjects_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/vectorsearch/v1beta/data_object_service.proto", +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/embedding_config.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/embedding_config.pb.go new file mode 100644 index 000000000000..ca38155e58c8 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/embedding_config.pb.go @@ -0,0 +1,286 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/embedding_config.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents the task the embeddings will be used for. +type EmbeddingTaskType int32 + +const ( + // Unspecified task type. + EmbeddingTaskType_EMBEDDING_TASK_TYPE_UNSPECIFIED EmbeddingTaskType = 0 + // Specifies the given text is a query in a search/retrieval setting. + EmbeddingTaskType_RETRIEVAL_QUERY EmbeddingTaskType = 1 + // Specifies the given text is a document from the corpus being searched. + EmbeddingTaskType_RETRIEVAL_DOCUMENT EmbeddingTaskType = 2 + // Specifies the given text will be used for STS. + EmbeddingTaskType_SEMANTIC_SIMILARITY EmbeddingTaskType = 3 + // Specifies that the given text will be classified. + EmbeddingTaskType_CLASSIFICATION EmbeddingTaskType = 4 + // Specifies that the embeddings will be used for clustering. + EmbeddingTaskType_CLUSTERING EmbeddingTaskType = 5 + // Specifies that the embeddings will be used for question answering. + EmbeddingTaskType_QUESTION_ANSWERING EmbeddingTaskType = 6 + // Specifies that the embeddings will be used for fact verification. + EmbeddingTaskType_FACT_VERIFICATION EmbeddingTaskType = 7 + // Specifies that the embeddings will be used for code retrieval. + EmbeddingTaskType_CODE_RETRIEVAL_QUERY EmbeddingTaskType = 8 +) + +// Enum value maps for EmbeddingTaskType. +var ( + EmbeddingTaskType_name = map[int32]string{ + 0: "EMBEDDING_TASK_TYPE_UNSPECIFIED", + 1: "RETRIEVAL_QUERY", + 2: "RETRIEVAL_DOCUMENT", + 3: "SEMANTIC_SIMILARITY", + 4: "CLASSIFICATION", + 5: "CLUSTERING", + 6: "QUESTION_ANSWERING", + 7: "FACT_VERIFICATION", + 8: "CODE_RETRIEVAL_QUERY", + } + EmbeddingTaskType_value = map[string]int32{ + "EMBEDDING_TASK_TYPE_UNSPECIFIED": 0, + "RETRIEVAL_QUERY": 1, + "RETRIEVAL_DOCUMENT": 2, + "SEMANTIC_SIMILARITY": 3, + "CLASSIFICATION": 4, + "CLUSTERING": 5, + "QUESTION_ANSWERING": 6, + "FACT_VERIFICATION": 7, + "CODE_RETRIEVAL_QUERY": 8, + } +) + +func (x EmbeddingTaskType) Enum() *EmbeddingTaskType { + p := new(EmbeddingTaskType) + *p = x + return p +} + +func (x EmbeddingTaskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EmbeddingTaskType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_vectorsearch_v1beta_embedding_config_proto_enumTypes[0].Descriptor() +} + +func (EmbeddingTaskType) Type() protoreflect.EnumType { + return &file_google_cloud_vectorsearch_v1beta_embedding_config_proto_enumTypes[0] +} + +func (x EmbeddingTaskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EmbeddingTaskType.Descriptor instead. +func (EmbeddingTaskType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescGZIP(), []int{0} +} + +// Message describing the configuration for generating embeddings for a vector +// field using Vertex AI embeddings API. +type VertexEmbeddingConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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. + ModelId string `protobuf:"bytes,1,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` + // 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}"". + TextTemplate string `protobuf:"bytes,2,opt,name=text_template,json=textTemplate,proto3" json:"text_template,omitempty"` + // Required. Required: Task type for the embeddings. + TaskType EmbeddingTaskType `protobuf:"varint,3,opt,name=task_type,json=taskType,proto3,enum=google.cloud.vectorsearch.v1beta.EmbeddingTaskType" json:"task_type,omitempty"` +} + +func (x *VertexEmbeddingConfig) Reset() { + *x = VertexEmbeddingConfig{} + mi := &file_google_cloud_vectorsearch_v1beta_embedding_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VertexEmbeddingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VertexEmbeddingConfig) ProtoMessage() {} + +func (x *VertexEmbeddingConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_embedding_config_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VertexEmbeddingConfig.ProtoReflect.Descriptor instead. +func (*VertexEmbeddingConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescGZIP(), []int{0} +} + +func (x *VertexEmbeddingConfig) GetModelId() string { + if x != nil { + return x.ModelId + } + return "" +} + +func (x *VertexEmbeddingConfig) GetTextTemplate() string { + if x != nil { + return x.TextTemplate + } + return "" +} + +func (x *VertexEmbeddingConfig) GetTaskType() EmbeddingTaskType { + if x != nil { + return x.TaskType + } + return EmbeddingTaskType_EMBEDDING_TASK_TYPE_UNSPECIFIED +} + +var File_google_cloud_vectorsearch_v1beta_embedding_config_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, + 0x15, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x12, 0x55, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, + 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x74, + 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x2a, 0xeb, 0x01, 0x0a, 0x11, 0x45, 0x6d, 0x62, 0x65, + 0x64, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, + 0x1f, 0x45, 0x4d, 0x42, 0x45, 0x44, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, 0x41, 0x4c, 0x5f, + 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x54, 0x52, 0x49, + 0x45, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x4f, 0x43, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, + 0x17, 0x0a, 0x13, 0x53, 0x45, 0x4d, 0x41, 0x4e, 0x54, 0x49, 0x43, 0x5f, 0x53, 0x49, 0x4d, 0x49, + 0x4c, 0x41, 0x52, 0x49, 0x54, 0x59, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x41, 0x53, + 0x53, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, + 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, + 0x51, 0x55, 0x45, 0x53, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, 0x53, 0x57, 0x45, 0x52, 0x49, + 0x4e, 0x47, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, + 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x43, + 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x56, 0x41, 0x4c, 0x5f, 0x51, 0x55, + 0x45, 0x52, 0x59, 0x10, 0x08, 0x42, 0x88, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x14, + 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, + 0x62, 0x3b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_embedding_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_vectorsearch_v1beta_embedding_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_vectorsearch_v1beta_embedding_config_proto_goTypes = []any{ + (EmbeddingTaskType)(0), // 0: google.cloud.vectorsearch.v1beta.EmbeddingTaskType + (*VertexEmbeddingConfig)(nil), // 1: google.cloud.vectorsearch.v1beta.VertexEmbeddingConfig +} +var file_google_cloud_vectorsearch_v1beta_embedding_config_proto_depIdxs = []int32{ + 0, // 0: google.cloud.vectorsearch.v1beta.VertexEmbeddingConfig.task_type:type_name -> google.cloud.vectorsearch.v1beta.EmbeddingTaskType + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_embedding_config_proto_init() } +func file_google_cloud_vectorsearch_v1beta_embedding_config_proto_init() { + if File_google_cloud_vectorsearch_v1beta_embedding_config_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_embedding_config_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_embedding_config_proto_depIdxs, + EnumInfos: file_google_cloud_vectorsearch_v1beta_embedding_config_proto_enumTypes, + MessageInfos: file_google_cloud_vectorsearch_v1beta_embedding_config_proto_msgTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_embedding_config_proto = out.File + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service.pb.go new file mode 100644 index 000000000000..0e704a851d62 --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service.pb.go @@ -0,0 +1,2264 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/vectorsearch_service.proto + +package vectorsearchpb + +import ( + reflect "reflect" + sync "sync" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + _ "google.golang.org/genproto/googleapis/api/annotations" + status "google.golang.org/genproto/googleapis/rpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Message describing Collection object +type Collection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. name of resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. User-specified display name of the collection + DisplayName string `protobuf:"bytes,8,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-specified description of the collection + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` + // Output only. [Output only] Create time stamp + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. [Output only] Update time stamp + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Optional. Labels as key value pairs. + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Deprecated: JSON Schema for data. Please use data_schema instead. + // + // Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/vectorsearch_service.proto. + Schema *structpb.Struct `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty"` + // Optional. Schema for vector fields. Only vector fields in this schema will + // be searchable. + VectorSchema map[string]*VectorField `protobuf:"bytes,7,rep,name=vector_schema,json=vectorSchema,proto3" json:"vector_schema,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. JSON Schema for data. + DataSchema *structpb.Struct `protobuf:"bytes,10,opt,name=data_schema,json=dataSchema,proto3" json:"data_schema,omitempty"` +} + +func (x *Collection) Reset() { + *x = Collection{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Collection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Collection) ProtoMessage() {} + +func (x *Collection) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Collection.ProtoReflect.Descriptor instead. +func (*Collection) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{0} +} + +func (x *Collection) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Collection) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Collection) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Collection) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Collection) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Collection) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +// Deprecated: Marked as deprecated in google/cloud/vectorsearch/v1beta/vectorsearch_service.proto. +func (x *Collection) GetSchema() *structpb.Struct { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Collection) GetVectorSchema() map[string]*VectorField { + if x != nil { + return x.VectorSchema + } + return nil +} + +func (x *Collection) GetDataSchema() *structpb.Struct { + if x != nil { + return x.DataSchema + } + return nil +} + +// Message describing a vector field. +type VectorField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Vector type configuration. + // + // Types that are assignable to VectorTypeConfig: + // + // *VectorField_DenseVector + // *VectorField_SparseVector + VectorTypeConfig isVectorField_VectorTypeConfig `protobuf_oneof:"vector_type_config"` +} + +func (x *VectorField) Reset() { + *x = VectorField{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VectorField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VectorField) ProtoMessage() {} + +func (x *VectorField) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VectorField.ProtoReflect.Descriptor instead. +func (*VectorField) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{1} +} + +func (m *VectorField) GetVectorTypeConfig() isVectorField_VectorTypeConfig { + if m != nil { + return m.VectorTypeConfig + } + return nil +} + +func (x *VectorField) GetDenseVector() *DenseVectorField { + if x, ok := x.GetVectorTypeConfig().(*VectorField_DenseVector); ok { + return x.DenseVector + } + return nil +} + +func (x *VectorField) GetSparseVector() *SparseVectorField { + if x, ok := x.GetVectorTypeConfig().(*VectorField_SparseVector); ok { + return x.SparseVector + } + return nil +} + +type isVectorField_VectorTypeConfig interface { + isVectorField_VectorTypeConfig() +} + +type VectorField_DenseVector struct { + // Dense vector field. + DenseVector *DenseVectorField `protobuf:"bytes,3,opt,name=dense_vector,json=denseVector,proto3,oneof"` +} + +type VectorField_SparseVector struct { + // Sparse vector field. + SparseVector *SparseVectorField `protobuf:"bytes,4,opt,name=sparse_vector,json=sparseVector,proto3,oneof"` +} + +func (*VectorField_DenseVector) isVectorField_VectorTypeConfig() {} + +func (*VectorField_SparseVector) isVectorField_VectorTypeConfig() {} + +// Message describing a dense vector field. +type DenseVectorField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Dimensionality of the vector field. + Dimensions int32 `protobuf:"varint,1,opt,name=dimensions,proto3" json:"dimensions,omitempty"` + // Optional. Configuration for generating embeddings for the vector field. If + // not specified, the embedding field must be populated in the DataObject. + VertexEmbeddingConfig *VertexEmbeddingConfig `protobuf:"bytes,3,opt,name=vertex_embedding_config,json=vertexEmbeddingConfig,proto3" json:"vertex_embedding_config,omitempty"` +} + +func (x *DenseVectorField) Reset() { + *x = DenseVectorField{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DenseVectorField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DenseVectorField) ProtoMessage() {} + +func (x *DenseVectorField) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DenseVectorField.ProtoReflect.Descriptor instead. +func (*DenseVectorField) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{2} +} + +func (x *DenseVectorField) GetDimensions() int32 { + if x != nil { + return x.Dimensions + } + return 0 +} + +func (x *DenseVectorField) GetVertexEmbeddingConfig() *VertexEmbeddingConfig { + if x != nil { + return x.VertexEmbeddingConfig + } + return nil +} + +// Message describing a sparse vector field. +type SparseVectorField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SparseVectorField) Reset() { + *x = SparseVectorField{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SparseVectorField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SparseVectorField) ProtoMessage() {} + +func (x *SparseVectorField) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SparseVectorField.ProtoReflect.Descriptor instead. +func (*SparseVectorField) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{3} +} + +// Message for requesting list of Collections +type ListCollectionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent value for ListCollectionsRequest + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results the server should return. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Filtering results + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Hint for how to order the results + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListCollectionsRequest) Reset() { + *x = ListCollectionsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCollectionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCollectionsRequest) ProtoMessage() {} + +func (x *ListCollectionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCollectionsRequest.ProtoReflect.Descriptor instead. +func (*ListCollectionsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{4} +} + +func (x *ListCollectionsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListCollectionsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListCollectionsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListCollectionsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListCollectionsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Message for response to listing Collections +type ListCollectionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of Collection + Collections []*Collection `protobuf:"bytes,1,rep,name=collections,proto3" json:"collections,omitempty"` + // A token identifying a page of results the server should return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Unordered list. Locations that could not be reached. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListCollectionsResponse) Reset() { + *x = ListCollectionsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListCollectionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListCollectionsResponse) ProtoMessage() {} + +func (x *ListCollectionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListCollectionsResponse.ProtoReflect.Descriptor instead. +func (*ListCollectionsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListCollectionsResponse) GetCollections() []*Collection { + if x != nil { + return x.Collections + } + return nil +} + +func (x *ListCollectionsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListCollectionsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// Message for getting a Collection +type GetCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetCollectionRequest) Reset() { + *x = GetCollectionRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCollectionRequest) ProtoMessage() {} + +func (x *GetCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCollectionRequest.ProtoReflect.Descriptor instead. +func (*GetCollectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{6} +} + +func (x *GetCollectionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Message for creating a Collection +type CreateCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Value for parent. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // collection_id from the method_signature of Create RPC + CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"` + // Required. The resource being created + Collection *Collection `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"` + // 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). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateCollectionRequest) Reset() { + *x = CreateCollectionRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCollectionRequest) ProtoMessage() {} + +func (x *CreateCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateCollectionRequest.ProtoReflect.Descriptor instead. +func (*CreateCollectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateCollectionRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateCollectionRequest) GetCollectionId() string { + if x != nil { + return x.CollectionId + } + return "" +} + +func (x *CreateCollectionRequest) GetCollection() *Collection { + if x != nil { + return x.Collection + } + return nil +} + +func (x *CreateCollectionRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Message for updating a Collection +type UpdateCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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 + // modified or deleted. + // 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. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Required. The resource being updated + Collection *Collection `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` + // 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). + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *UpdateCollectionRequest) Reset() { + *x = UpdateCollectionRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateCollectionRequest) ProtoMessage() {} + +func (x *UpdateCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateCollectionRequest.ProtoReflect.Descriptor instead. +func (*UpdateCollectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateCollectionRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateCollectionRequest) GetCollection() *Collection { + if x != nil { + return x.Collection + } + return nil +} + +func (x *UpdateCollectionRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Message for deleting a Collection +type DeleteCollectionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // 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). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteCollectionRequest) Reset() { + *x = DeleteCollectionRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteCollectionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteCollectionRequest) ProtoMessage() {} + +func (x *DeleteCollectionRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteCollectionRequest.ProtoReflect.Descriptor instead. +func (*DeleteCollectionRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteCollectionRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteCollectionRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Message describing Index object +type Index struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. name of resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. User-specified display name of the index + DisplayName string `protobuf:"bytes,8,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional. User-specified description of the index + Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"` + // Optional. Labels as key value pairs. + Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. [Output only] Create time stamp + CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. [Output only] Update time stamp + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Optional. Distance metric used for indexing. If not specified, will default + // to DOT_PRODUCT. + DistanceMetric DistanceMetric `protobuf:"varint,4,opt,name=distance_metric,json=distanceMetric,proto3,enum=google.cloud.vectorsearch.v1beta.DistanceMetric" json:"distance_metric,omitempty"` + // Required. The collection schema field to index. + IndexField string `protobuf:"bytes,5,opt,name=index_field,json=indexField,proto3" json:"index_field,omitempty"` + // Optional. The fields to push into the index to enable fast ANN inline + // filtering. + FilterFields []string `protobuf:"bytes,6,rep,name=filter_fields,json=filterFields,proto3" json:"filter_fields,omitempty"` + // Optional. The fields to push into the index to enable inline data + // retrieval. + StoreFields []string `protobuf:"bytes,7,rep,name=store_fields,json=storeFields,proto3" json:"store_fields,omitempty"` +} + +func (x *Index) Reset() { + *x = Index{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Index) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index) ProtoMessage() {} + +func (x *Index) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Index.ProtoReflect.Descriptor instead. +func (*Index) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{10} +} + +func (x *Index) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Index) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Index) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Index) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Index) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Index) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Index) GetDistanceMetric() DistanceMetric { + if x != nil { + return x.DistanceMetric + } + return DistanceMetric_DISTANCE_METRIC_UNSPECIFIED +} + +func (x *Index) GetIndexField() string { + if x != nil { + return x.IndexField + } + return "" +} + +func (x *Index) GetFilterFields() []string { + if x != nil { + return x.FilterFields + } + return nil +} + +func (x *Index) GetStoreFields() []string { + if x != nil { + return x.StoreFields + } + return nil +} + +// Message for creating an Index. +type CreateIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Collection for which to create the + // Index. Format: + // `projects/{project}/locations/{location}/collections/{collection}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. Id of the requesting object + // If auto-generating Id server-side, remove this field and + // index_id from the method_signature of Create RPC + IndexId string `protobuf:"bytes,2,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` + // Required. The resource being created + Index *Index `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` + // 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). + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead. +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateIndexRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateIndexRequest) GetIndexId() string { + if x != nil { + return x.IndexId + } + return "" +} + +func (x *CreateIndexRequest) GetIndex() *Index { + if x != nil { + return x.Index + } + return nil +} + +func (x *CreateIndexRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Message for deleting an Index. +type DeleteIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the Index to delete. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/indexes/{index}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // 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). + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteIndexRequest) Reset() { + *x = DeleteIndexRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIndexRequest) ProtoMessage() {} + +func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteIndexRequest.ProtoReflect.Descriptor instead. +func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteIndexRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteIndexRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Message for requesting list of Indexes +type ListIndexesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Parent value for ListIndexesRequest + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A token identifying a page of results the server should return. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Filtering results + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. Hint for how to order the results + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListIndexesRequest) Reset() { + *x = ListIndexesRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListIndexesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIndexesRequest) ProtoMessage() {} + +func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIndexesRequest.ProtoReflect.Descriptor instead. +func (*ListIndexesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{13} +} + +func (x *ListIndexesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListIndexesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListIndexesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListIndexesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListIndexesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Message for response to listing Indexes +type ListIndexesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of Index + Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` + // A token identifying a page of results the server should return. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListIndexesResponse) Reset() { + *x = ListIndexesResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListIndexesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIndexesResponse) ProtoMessage() {} + +func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIndexesResponse.ProtoReflect.Descriptor instead. +func (*ListIndexesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{14} +} + +func (x *ListIndexesResponse) GetIndexes() []*Index { + if x != nil { + return x.Indexes + } + return nil +} + +func (x *ListIndexesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// Message for getting an Index +type GetIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the resource + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetIndexRequest) Reset() { + *x = GetIndexRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexRequest) ProtoMessage() {} + +func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIndexRequest.ProtoReflect.Descriptor instead. +func (*GetIndexRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{15} +} + +func (x *GetIndexRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Represents the metadata of the long-running operation. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The time the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time the operation finished running. + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Output only. Server-defined resource path for the target of the operation. + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // Output only. Name of the verb executed by the operation. + Verb string `protobuf:"bytes,4,opt,name=verb,proto3" json:"verb,omitempty"` + // Output only. Human-readable status of the operation, if any. + StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` + // 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`. + RequestedCancellation bool `protobuf:"varint,6,opt,name=requested_cancellation,json=requestedCancellation,proto3" json:"requested_cancellation,omitempty"` + // Output only. API version used to start the operation. + ApiVersion string `protobuf:"bytes,7,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{16} +} + +func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *OperationMetadata) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *OperationMetadata) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *OperationMetadata) GetVerb() string { + if x != nil { + return x.Verb + } + return "" +} + +func (x *OperationMetadata) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +func (x *OperationMetadata) GetRequestedCancellation() bool { + if x != nil { + return x.RequestedCancellation + } + return false +} + +func (x *OperationMetadata) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +// Request message for [DataObjectService.ImportDataObjects][]. +type ImportDataObjectsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The configuration for the import data and error results. + // + // Types that are assignable to Config: + // + // *ImportDataObjectsRequest_GcsImport + Config isImportDataObjectsRequest_Config `protobuf_oneof:"config"` + // Required. The resource name of the Collection to import DataObjects into. + // Format: `projects/{project}/locations/{location}/collections/{collection}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ImportDataObjectsRequest) Reset() { + *x = ImportDataObjectsRequest{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ImportDataObjectsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataObjectsRequest) ProtoMessage() {} + +func (x *ImportDataObjectsRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataObjectsRequest.ProtoReflect.Descriptor instead. +func (*ImportDataObjectsRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{17} +} + +func (m *ImportDataObjectsRequest) GetConfig() isImportDataObjectsRequest_Config { + if m != nil { + return m.Config + } + return nil +} + +func (x *ImportDataObjectsRequest) GetGcsImport() *ImportDataObjectsRequest_GcsImportConfig { + if x, ok := x.GetConfig().(*ImportDataObjectsRequest_GcsImport); ok { + return x.GcsImport + } + return nil +} + +func (x *ImportDataObjectsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type isImportDataObjectsRequest_Config interface { + isImportDataObjectsRequest_Config() +} + +type ImportDataObjectsRequest_GcsImport struct { + // The Cloud Storage location of the input content. + GcsImport *ImportDataObjectsRequest_GcsImportConfig `protobuf:"bytes,2,opt,name=gcs_import,json=gcsImport,proto3,oneof"` +} + +func (*ImportDataObjectsRequest_GcsImport) isImportDataObjectsRequest_Config() {} + +// Metadata for [DataObjectService.ImportDataObjects][]. +type ImportDataObjectsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time the operation was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Number of DataObjects that were processed successfully. + SuccessCount int64 `protobuf:"varint,3,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"` + // Number of DataObjects that failed during processing. + FailureCount int64 `protobuf:"varint,4,opt,name=failure_count,json=failureCount,proto3" json:"failure_count,omitempty"` +} + +func (x *ImportDataObjectsMetadata) Reset() { + *x = ImportDataObjectsMetadata{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ImportDataObjectsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataObjectsMetadata) ProtoMessage() {} + +func (x *ImportDataObjectsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataObjectsMetadata.ProtoReflect.Descriptor instead. +func (*ImportDataObjectsMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{18} +} + +func (x *ImportDataObjectsMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ImportDataObjectsMetadata) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *ImportDataObjectsMetadata) GetSuccessCount() int64 { + if x != nil { + return x.SuccessCount + } + return 0 +} + +func (x *ImportDataObjectsMetadata) GetFailureCount() int64 { + if x != nil { + return x.FailureCount + } + return 0 +} + +// Response for [DataObjectService.ImportDataObjects][]. +type ImportDataObjectsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status of the LRO + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ImportDataObjectsResponse) Reset() { + *x = ImportDataObjectsResponse{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ImportDataObjectsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataObjectsResponse) ProtoMessage() {} + +func (x *ImportDataObjectsResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataObjectsResponse.ProtoReflect.Descriptor instead. +func (*ImportDataObjectsResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{19} +} + +func (x *ImportDataObjectsResponse) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + +// Google Cloud Storage configuration for the import. +type ImportDataObjectsRequest_GcsImportConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. URI prefix of the Cloud Storage DataObjects to import. + ContentsUri string `protobuf:"bytes,1,opt,name=contents_uri,json=contentsUri,proto3" json:"contents_uri,omitempty"` + // Required. URI prefix of the Cloud Storage location to write any errors + // encountered during the import. + ErrorUri string `protobuf:"bytes,2,opt,name=error_uri,json=errorUri,proto3" json:"error_uri,omitempty"` +} + +func (x *ImportDataObjectsRequest_GcsImportConfig) Reset() { + *x = ImportDataObjectsRequest_GcsImportConfig{} + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ImportDataObjectsRequest_GcsImportConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDataObjectsRequest_GcsImportConfig) ProtoMessage() {} + +func (x *ImportDataObjectsRequest_GcsImportConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDataObjectsRequest_GcsImportConfig.ProtoReflect.Descriptor instead. +func (*ImportDataObjectsRequest_GcsImportConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP(), []int{17, 0} +} + +func (x *ImportDataObjectsRequest_GcsImportConfig) GetContentsUri() string { + if x != nil { + return x.ContentsUri + } + return "" +} + +func (x *ImportDataObjectsRequest_GcsImportConfig) GetErrorUri() string { + if x != nil { + return x.ErrorUri + } + return "" +} + +var File_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto protoreflect.FileDescriptor + +var file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xe5, 0x06, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, 0x64, + 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x55, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x05, + 0xe0, 0x41, 0x01, 0x18, 0x01, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x68, 0x0a, + 0x0d, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3d, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x6e, 0x0a, 0x11, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x3a, 0x87, 0x01, 0xea, 0x41, 0x83, 0x01, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x40, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x7d, 0x2a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, + 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x0b, + 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x57, 0x0a, 0x0c, 0x64, + 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6e, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x73, 0x65, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5a, 0x0a, 0x0d, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x53, + 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x48, 0x00, 0x52, 0x0c, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x42, 0x14, 0x0a, 0x12, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6e, 0x73, 0x65, + 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, + 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x74, 0x0a, 0x17, 0x76, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x5f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, + 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x15, 0x76, 0x65, 0x72, 0x74, + 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0xe3, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xb8, 0x01, 0x0a, + 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x25, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x06, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, + 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x5a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x8a, 0x02, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x12, 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x51, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x01, 0xe2, 0x8c, 0xcf, + 0xd7, 0x08, 0x02, 0x08, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x22, 0xda, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x51, + 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x01, 0xe2, 0x8c, 0xcf, 0xd7, 0x08, 0x02, + 0x08, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x89, 0x01, + 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, + 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, + 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x01, 0xe2, 0x8c, 0xcf, 0xd7, 0x08, 0x02, 0x08, 0x01, 0x52, 0x09, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0xe4, 0x05, 0x0a, 0x05, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0c, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x5e, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x69, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x28, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x12, 0x26, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x89, 0x01, 0xea, 0x41, 0x85, 0x01, 0x0a, 0x21, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x50, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, + 0x2a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x32, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0xec, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, + 0x26, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1e, 0x0a, 0x08, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x49, 0x64, 0x12, + 0x42, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x01, 0xe2, 0x8c, 0xcf, 0xd7, + 0x08, 0x02, 0x08, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, + 0x7f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x01, 0xe2, 0x8c, 0xcf, + 0xd7, 0x08, 0x02, 0x08, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, + 0x22, 0xda, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x12, + 0x21, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0x80, 0x01, + 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, + 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x50, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x76, 0x65, 0x72, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x2a, 0x0a, 0x0e, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3a, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb2, 0x02, 0x0a, 0x18, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6b, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x63, 0x73, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x09, 0x67, 0x63, 0x73, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x42, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2e, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x28, 0x0a, 0x26, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x5b, 0x0a, 0x0f, 0x47, 0x63, 0x73, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0c, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, + 0x55, 0x72, 0x69, 0x12, 0x20, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x75, 0x72, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x55, 0x72, 0x69, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0xdf, 0x01, 0x0a, 0x19, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x47, 0x0a, 0x19, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x97, 0x12, 0x0a, 0x13, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0xcc, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0xb9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xfa, 0x01, + 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8b, 0x01, 0xca, + 0x41, 0x1f, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xda, 0x41, 0x1f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x3a, 0x0a, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfc, 0x01, 0x0a, 0x10, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0xca, 0x41, 0x1f, 0x0a, + 0x0a, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, + 0x16, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x3a, 0x0a, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xdd, 0x01, 0x0a, 0x10, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0xca, 0x41, 0x2a, 0x0a, 0x15, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xca, 0x01, 0x0a, 0x0b, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, + 0x4c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xe6, 0x01, + 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x81, 0x01, 0xca, 0x41, 0x1a, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xda, 0x41, 0x15, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x2c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x46, + 0x3a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0xdd, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0xca, 0x41, 0x2a, + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x2a, 0x3d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xfa, 0x01, 0x0a, 0x11, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, 0xca, 0x41, 0x36, 0x0a, 0x19, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x3a, 0x01, 0x2a, 0x22, 0x45, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x1a, 0x4f, 0xca, 0x41, 0x1b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x8c, 0x01, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x42, 0x18, 0x56, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x2f, 0x61, 0x70, 0x69, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x70, 0x62, 0x3b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescOnce sync.Once + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescData = file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDesc +) + +func file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescGZIP() []byte { + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescOnce.Do(func() { + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescData) + }) + return file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDescData +} + +var file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_goTypes = []any{ + (*Collection)(nil), // 0: google.cloud.vectorsearch.v1beta.Collection + (*VectorField)(nil), // 1: google.cloud.vectorsearch.v1beta.VectorField + (*DenseVectorField)(nil), // 2: google.cloud.vectorsearch.v1beta.DenseVectorField + (*SparseVectorField)(nil), // 3: google.cloud.vectorsearch.v1beta.SparseVectorField + (*ListCollectionsRequest)(nil), // 4: google.cloud.vectorsearch.v1beta.ListCollectionsRequest + (*ListCollectionsResponse)(nil), // 5: google.cloud.vectorsearch.v1beta.ListCollectionsResponse + (*GetCollectionRequest)(nil), // 6: google.cloud.vectorsearch.v1beta.GetCollectionRequest + (*CreateCollectionRequest)(nil), // 7: google.cloud.vectorsearch.v1beta.CreateCollectionRequest + (*UpdateCollectionRequest)(nil), // 8: google.cloud.vectorsearch.v1beta.UpdateCollectionRequest + (*DeleteCollectionRequest)(nil), // 9: google.cloud.vectorsearch.v1beta.DeleteCollectionRequest + (*Index)(nil), // 10: google.cloud.vectorsearch.v1beta.Index + (*CreateIndexRequest)(nil), // 11: google.cloud.vectorsearch.v1beta.CreateIndexRequest + (*DeleteIndexRequest)(nil), // 12: google.cloud.vectorsearch.v1beta.DeleteIndexRequest + (*ListIndexesRequest)(nil), // 13: google.cloud.vectorsearch.v1beta.ListIndexesRequest + (*ListIndexesResponse)(nil), // 14: google.cloud.vectorsearch.v1beta.ListIndexesResponse + (*GetIndexRequest)(nil), // 15: google.cloud.vectorsearch.v1beta.GetIndexRequest + (*OperationMetadata)(nil), // 16: google.cloud.vectorsearch.v1beta.OperationMetadata + (*ImportDataObjectsRequest)(nil), // 17: google.cloud.vectorsearch.v1beta.ImportDataObjectsRequest + (*ImportDataObjectsMetadata)(nil), // 18: google.cloud.vectorsearch.v1beta.ImportDataObjectsMetadata + (*ImportDataObjectsResponse)(nil), // 19: google.cloud.vectorsearch.v1beta.ImportDataObjectsResponse + nil, // 20: google.cloud.vectorsearch.v1beta.Collection.LabelsEntry + nil, // 21: google.cloud.vectorsearch.v1beta.Collection.VectorSchemaEntry + nil, // 22: google.cloud.vectorsearch.v1beta.Index.LabelsEntry + (*ImportDataObjectsRequest_GcsImportConfig)(nil), // 23: google.cloud.vectorsearch.v1beta.ImportDataObjectsRequest.GcsImportConfig + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 25: google.protobuf.Struct + (*VertexEmbeddingConfig)(nil), // 26: google.cloud.vectorsearch.v1beta.VertexEmbeddingConfig + (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask + (DistanceMetric)(0), // 28: google.cloud.vectorsearch.v1beta.DistanceMetric + (*status.Status)(nil), // 29: google.rpc.Status + (*longrunningpb.Operation)(nil), // 30: google.longrunning.Operation +} +var file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_depIdxs = []int32{ + 24, // 0: google.cloud.vectorsearch.v1beta.Collection.create_time:type_name -> google.protobuf.Timestamp + 24, // 1: google.cloud.vectorsearch.v1beta.Collection.update_time:type_name -> google.protobuf.Timestamp + 20, // 2: google.cloud.vectorsearch.v1beta.Collection.labels:type_name -> google.cloud.vectorsearch.v1beta.Collection.LabelsEntry + 25, // 3: google.cloud.vectorsearch.v1beta.Collection.schema:type_name -> google.protobuf.Struct + 21, // 4: google.cloud.vectorsearch.v1beta.Collection.vector_schema:type_name -> google.cloud.vectorsearch.v1beta.Collection.VectorSchemaEntry + 25, // 5: google.cloud.vectorsearch.v1beta.Collection.data_schema:type_name -> google.protobuf.Struct + 2, // 6: google.cloud.vectorsearch.v1beta.VectorField.dense_vector:type_name -> google.cloud.vectorsearch.v1beta.DenseVectorField + 3, // 7: google.cloud.vectorsearch.v1beta.VectorField.sparse_vector:type_name -> google.cloud.vectorsearch.v1beta.SparseVectorField + 26, // 8: google.cloud.vectorsearch.v1beta.DenseVectorField.vertex_embedding_config:type_name -> google.cloud.vectorsearch.v1beta.VertexEmbeddingConfig + 0, // 9: google.cloud.vectorsearch.v1beta.ListCollectionsResponse.collections:type_name -> google.cloud.vectorsearch.v1beta.Collection + 0, // 10: google.cloud.vectorsearch.v1beta.CreateCollectionRequest.collection:type_name -> google.cloud.vectorsearch.v1beta.Collection + 27, // 11: google.cloud.vectorsearch.v1beta.UpdateCollectionRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 12: google.cloud.vectorsearch.v1beta.UpdateCollectionRequest.collection:type_name -> google.cloud.vectorsearch.v1beta.Collection + 22, // 13: google.cloud.vectorsearch.v1beta.Index.labels:type_name -> google.cloud.vectorsearch.v1beta.Index.LabelsEntry + 24, // 14: google.cloud.vectorsearch.v1beta.Index.create_time:type_name -> google.protobuf.Timestamp + 24, // 15: google.cloud.vectorsearch.v1beta.Index.update_time:type_name -> google.protobuf.Timestamp + 28, // 16: google.cloud.vectorsearch.v1beta.Index.distance_metric:type_name -> google.cloud.vectorsearch.v1beta.DistanceMetric + 10, // 17: google.cloud.vectorsearch.v1beta.CreateIndexRequest.index:type_name -> google.cloud.vectorsearch.v1beta.Index + 10, // 18: google.cloud.vectorsearch.v1beta.ListIndexesResponse.indexes:type_name -> google.cloud.vectorsearch.v1beta.Index + 24, // 19: google.cloud.vectorsearch.v1beta.OperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 24, // 20: google.cloud.vectorsearch.v1beta.OperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 23, // 21: google.cloud.vectorsearch.v1beta.ImportDataObjectsRequest.gcs_import:type_name -> google.cloud.vectorsearch.v1beta.ImportDataObjectsRequest.GcsImportConfig + 24, // 22: google.cloud.vectorsearch.v1beta.ImportDataObjectsMetadata.create_time:type_name -> google.protobuf.Timestamp + 24, // 23: google.cloud.vectorsearch.v1beta.ImportDataObjectsMetadata.update_time:type_name -> google.protobuf.Timestamp + 29, // 24: google.cloud.vectorsearch.v1beta.ImportDataObjectsResponse.status:type_name -> google.rpc.Status + 1, // 25: google.cloud.vectorsearch.v1beta.Collection.VectorSchemaEntry.value:type_name -> google.cloud.vectorsearch.v1beta.VectorField + 4, // 26: google.cloud.vectorsearch.v1beta.VectorSearchService.ListCollections:input_type -> google.cloud.vectorsearch.v1beta.ListCollectionsRequest + 6, // 27: google.cloud.vectorsearch.v1beta.VectorSearchService.GetCollection:input_type -> google.cloud.vectorsearch.v1beta.GetCollectionRequest + 7, // 28: google.cloud.vectorsearch.v1beta.VectorSearchService.CreateCollection:input_type -> google.cloud.vectorsearch.v1beta.CreateCollectionRequest + 8, // 29: google.cloud.vectorsearch.v1beta.VectorSearchService.UpdateCollection:input_type -> google.cloud.vectorsearch.v1beta.UpdateCollectionRequest + 9, // 30: google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteCollection:input_type -> google.cloud.vectorsearch.v1beta.DeleteCollectionRequest + 13, // 31: google.cloud.vectorsearch.v1beta.VectorSearchService.ListIndexes:input_type -> google.cloud.vectorsearch.v1beta.ListIndexesRequest + 15, // 32: google.cloud.vectorsearch.v1beta.VectorSearchService.GetIndex:input_type -> google.cloud.vectorsearch.v1beta.GetIndexRequest + 11, // 33: google.cloud.vectorsearch.v1beta.VectorSearchService.CreateIndex:input_type -> google.cloud.vectorsearch.v1beta.CreateIndexRequest + 12, // 34: google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteIndex:input_type -> google.cloud.vectorsearch.v1beta.DeleteIndexRequest + 17, // 35: google.cloud.vectorsearch.v1beta.VectorSearchService.ImportDataObjects:input_type -> google.cloud.vectorsearch.v1beta.ImportDataObjectsRequest + 5, // 36: google.cloud.vectorsearch.v1beta.VectorSearchService.ListCollections:output_type -> google.cloud.vectorsearch.v1beta.ListCollectionsResponse + 0, // 37: google.cloud.vectorsearch.v1beta.VectorSearchService.GetCollection:output_type -> google.cloud.vectorsearch.v1beta.Collection + 30, // 38: google.cloud.vectorsearch.v1beta.VectorSearchService.CreateCollection:output_type -> google.longrunning.Operation + 30, // 39: google.cloud.vectorsearch.v1beta.VectorSearchService.UpdateCollection:output_type -> google.longrunning.Operation + 30, // 40: google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteCollection:output_type -> google.longrunning.Operation + 14, // 41: google.cloud.vectorsearch.v1beta.VectorSearchService.ListIndexes:output_type -> google.cloud.vectorsearch.v1beta.ListIndexesResponse + 10, // 42: google.cloud.vectorsearch.v1beta.VectorSearchService.GetIndex:output_type -> google.cloud.vectorsearch.v1beta.Index + 30, // 43: google.cloud.vectorsearch.v1beta.VectorSearchService.CreateIndex:output_type -> google.longrunning.Operation + 30, // 44: google.cloud.vectorsearch.v1beta.VectorSearchService.DeleteIndex:output_type -> google.longrunning.Operation + 30, // 45: google.cloud.vectorsearch.v1beta.VectorSearchService.ImportDataObjects:output_type -> google.longrunning.Operation + 36, // [36:46] is the sub-list for method output_type + 26, // [26:36] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name +} + +func init() { file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_init() } +func file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_init() { + if File_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto != nil { + return + } + file_google_cloud_vectorsearch_v1beta_common_proto_init() + file_google_cloud_vectorsearch_v1beta_embedding_config_proto_init() + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[1].OneofWrappers = []any{ + (*VectorField_DenseVector)(nil), + (*VectorField_SparseVector)(nil), + } + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes[17].OneofWrappers = []any{ + (*ImportDataObjectsRequest_GcsImport)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 24, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_goTypes, + DependencyIndexes: file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_depIdxs, + MessageInfos: file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_msgTypes, + }.Build() + File_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto = out.File + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_rawDesc = nil + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_goTypes = nil + file_google_cloud_vectorsearch_v1beta_vectorsearch_service_proto_depIdxs = nil +} diff --git a/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service_grpc.pb.go b/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service_grpc.pb.go new file mode 100644 index 000000000000..df23e2128cea --- /dev/null +++ b/vectorsearch/apiv1beta/vectorsearchpb/vectorsearch_service_grpc.pb.go @@ -0,0 +1,476 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/vectorsearch/v1beta/vectorsearch_service.proto + +package vectorsearchpb + +import ( + context "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + VectorSearchService_ListCollections_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/ListCollections" + VectorSearchService_GetCollection_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/GetCollection" + VectorSearchService_CreateCollection_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/CreateCollection" + VectorSearchService_UpdateCollection_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/UpdateCollection" + VectorSearchService_DeleteCollection_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/DeleteCollection" + VectorSearchService_ListIndexes_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/ListIndexes" + VectorSearchService_GetIndex_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/GetIndex" + VectorSearchService_CreateIndex_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/CreateIndex" + VectorSearchService_DeleteIndex_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/DeleteIndex" + VectorSearchService_ImportDataObjects_FullMethodName = "/google.cloud.vectorsearch.v1beta.VectorSearchService/ImportDataObjects" +) + +// VectorSearchServiceClient is the client API for VectorSearchService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type VectorSearchServiceClient interface { + // Lists Collections in a given project and location. + ListCollections(ctx context.Context, in *ListCollectionsRequest, opts ...grpc.CallOption) (*ListCollectionsResponse, error) + // Gets details of a single Collection. + GetCollection(ctx context.Context, in *GetCollectionRequest, opts ...grpc.CallOption) (*Collection, error) + // Creates a new Collection in a given project and location. + CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Updates the parameters of a single Collection. + UpdateCollection(ctx context.Context, in *UpdateCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Deletes a single Collection. + DeleteCollection(ctx context.Context, in *DeleteCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Lists Indexes in a given project and location. + ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) + // Gets details of a single Index. + GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) + // Creates a new Index in a given project and location. + CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Deletes a single Index. + DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Initiates a Long-Running Operation to import DataObjects into a Collection. + ImportDataObjects(ctx context.Context, in *ImportDataObjectsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) +} + +type vectorSearchServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewVectorSearchServiceClient(cc grpc.ClientConnInterface) VectorSearchServiceClient { + return &vectorSearchServiceClient{cc} +} + +func (c *vectorSearchServiceClient) ListCollections(ctx context.Context, in *ListCollectionsRequest, opts ...grpc.CallOption) (*ListCollectionsResponse, error) { + out := new(ListCollectionsResponse) + err := c.cc.Invoke(ctx, VectorSearchService_ListCollections_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) GetCollection(ctx context.Context, in *GetCollectionRequest, opts ...grpc.CallOption) (*Collection, error) { + out := new(Collection) + err := c.cc.Invoke(ctx, VectorSearchService_GetCollection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_CreateCollection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) UpdateCollection(ctx context.Context, in *UpdateCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_UpdateCollection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) DeleteCollection(ctx context.Context, in *DeleteCollectionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_DeleteCollection_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) { + out := new(ListIndexesResponse) + err := c.cc.Invoke(ctx, VectorSearchService_ListIndexes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) { + out := new(Index) + err := c.cc.Invoke(ctx, VectorSearchService_GetIndex_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_CreateIndex_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_DeleteIndex_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *vectorSearchServiceClient) ImportDataObjects(ctx context.Context, in *ImportDataObjectsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, VectorSearchService_ImportDataObjects_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VectorSearchServiceServer is the server API for VectorSearchService service. +// All implementations should embed UnimplementedVectorSearchServiceServer +// for forward compatibility +type VectorSearchServiceServer interface { + // Lists Collections in a given project and location. + ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error) + // Gets details of a single Collection. + GetCollection(context.Context, *GetCollectionRequest) (*Collection, error) + // Creates a new Collection in a given project and location. + CreateCollection(context.Context, *CreateCollectionRequest) (*longrunningpb.Operation, error) + // Updates the parameters of a single Collection. + UpdateCollection(context.Context, *UpdateCollectionRequest) (*longrunningpb.Operation, error) + // Deletes a single Collection. + DeleteCollection(context.Context, *DeleteCollectionRequest) (*longrunningpb.Operation, error) + // Lists Indexes in a given project and location. + ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) + // Gets details of a single Index. + GetIndex(context.Context, *GetIndexRequest) (*Index, error) + // Creates a new Index in a given project and location. + CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) + // Deletes a single Index. + DeleteIndex(context.Context, *DeleteIndexRequest) (*longrunningpb.Operation, error) + // Initiates a Long-Running Operation to import DataObjects into a Collection. + ImportDataObjects(context.Context, *ImportDataObjectsRequest) (*longrunningpb.Operation, error) +} + +// UnimplementedVectorSearchServiceServer should be embedded to have forward compatible implementations. +type UnimplementedVectorSearchServiceServer struct { +} + +func (UnimplementedVectorSearchServiceServer) ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListCollections not implemented") +} +func (UnimplementedVectorSearchServiceServer) GetCollection(context.Context, *GetCollectionRequest) (*Collection, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCollection not implemented") +} +func (UnimplementedVectorSearchServiceServer) CreateCollection(context.Context, *CreateCollectionRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented") +} +func (UnimplementedVectorSearchServiceServer) UpdateCollection(context.Context, *UpdateCollectionRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCollection not implemented") +} +func (UnimplementedVectorSearchServiceServer) DeleteCollection(context.Context, *DeleteCollectionRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteCollection not implemented") +} +func (UnimplementedVectorSearchServiceServer) ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListIndexes not implemented") +} +func (UnimplementedVectorSearchServiceServer) GetIndex(context.Context, *GetIndexRequest) (*Index, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIndex not implemented") +} +func (UnimplementedVectorSearchServiceServer) CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") +} +func (UnimplementedVectorSearchServiceServer) DeleteIndex(context.Context, *DeleteIndexRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteIndex not implemented") +} +func (UnimplementedVectorSearchServiceServer) ImportDataObjects(context.Context, *ImportDataObjectsRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportDataObjects not implemented") +} + +// UnsafeVectorSearchServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VectorSearchServiceServer will +// result in compilation errors. +type UnsafeVectorSearchServiceServer interface { + mustEmbedUnimplementedVectorSearchServiceServer() +} + +func RegisterVectorSearchServiceServer(s grpc.ServiceRegistrar, srv VectorSearchServiceServer) { + s.RegisterService(&VectorSearchService_ServiceDesc, srv) +} + +func _VectorSearchService_ListCollections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCollectionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).ListCollections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_ListCollections_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).ListCollections(ctx, req.(*ListCollectionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_GetCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).GetCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_GetCollection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).GetCollection(ctx, req.(*GetCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_CreateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).CreateCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_CreateCollection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).CreateCollection(ctx, req.(*CreateCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_UpdateCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).UpdateCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_UpdateCollection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).UpdateCollection(ctx, req.(*UpdateCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_DeleteCollection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteCollectionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).DeleteCollection(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_DeleteCollection_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).DeleteCollection(ctx, req.(*DeleteCollectionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_ListIndexes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIndexesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).ListIndexes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_ListIndexes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).ListIndexes(ctx, req.(*ListIndexesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).GetIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_GetIndex_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).GetIndex(ctx, req.(*GetIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).CreateIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_CreateIndex_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).CreateIndex(ctx, req.(*CreateIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).DeleteIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_DeleteIndex_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).DeleteIndex(ctx, req.(*DeleteIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _VectorSearchService_ImportDataObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportDataObjectsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VectorSearchServiceServer).ImportDataObjects(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: VectorSearchService_ImportDataObjects_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VectorSearchServiceServer).ImportDataObjects(ctx, req.(*ImportDataObjectsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// VectorSearchService_ServiceDesc is the grpc.ServiceDesc for VectorSearchService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var VectorSearchService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.vectorsearch.v1beta.VectorSearchService", + HandlerType: (*VectorSearchServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListCollections", + Handler: _VectorSearchService_ListCollections_Handler, + }, + { + MethodName: "GetCollection", + Handler: _VectorSearchService_GetCollection_Handler, + }, + { + MethodName: "CreateCollection", + Handler: _VectorSearchService_CreateCollection_Handler, + }, + { + MethodName: "UpdateCollection", + Handler: _VectorSearchService_UpdateCollection_Handler, + }, + { + MethodName: "DeleteCollection", + Handler: _VectorSearchService_DeleteCollection_Handler, + }, + { + MethodName: "ListIndexes", + Handler: _VectorSearchService_ListIndexes_Handler, + }, + { + MethodName: "GetIndex", + Handler: _VectorSearchService_GetIndex_Handler, + }, + { + MethodName: "CreateIndex", + Handler: _VectorSearchService_CreateIndex_Handler, + }, + { + MethodName: "DeleteIndex", + Handler: _VectorSearchService_DeleteIndex_Handler, + }, + { + MethodName: "ImportDataObjects", + Handler: _VectorSearchService_ImportDataObjects_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/vectorsearch/v1beta/vectorsearch_service.proto", +} diff --git a/vectorsearch/apiv1beta/version.go b/vectorsearch/apiv1beta/version.go new file mode 100644 index 000000000000..4543a0b12546 --- /dev/null +++ b/vectorsearch/apiv1beta/version.go @@ -0,0 +1,23 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package vectorsearch + +import "cloud.google.com/go/vectorsearch/internal" + +func init() { + versionClient = internal.Version +} diff --git a/vectorsearch/go.mod b/vectorsearch/go.mod new file mode 100644 index 000000000000..b9d9a1d2f3c9 --- /dev/null +++ b/vectorsearch/go.mod @@ -0,0 +1,39 @@ +module cloud.google.com/go/vectorsearch + +go 1.24.0 + +require ( + cloud.google.com/go/longrunning v0.7.0 + github.com/googleapis/gax-go/v2 v2.15.0 + google.golang.org/api v0.256.0 + google.golang.org/genproto v0.0.0-20251111163417-95abcf5c77ba + google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba + google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba + google.golang.org/grpc v1.76.0 + google.golang.org/protobuf v1.36.10 +) + +require ( + cloud.google.com/go v0.121.6 // indirect + cloud.google.com/go/auth v0.17.0 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.9.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/metric v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect + golang.org/x/crypto v0.43.0 // indirect + golang.org/x/net v0.46.0 // indirect + golang.org/x/oauth2 v0.33.0 // indirect + golang.org/x/sync v0.18.0 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/text v0.30.0 // indirect + golang.org/x/time v0.14.0 // indirect +) diff --git a/vectorsearch/go.sum b/vectorsearch/go.sum new file mode 100644 index 000000000000..6a53edecd244 --- /dev/null +++ b/vectorsearch/go.sum @@ -0,0 +1,90 @@ +cloud.google.com/go v0.121.6 h1:waZiuajrI28iAf40cWgycWNgaXPO06dupuS+sgibK6c= +cloud.google.com/go v0.121.6/go.mod h1:coChdst4Ea5vUpiALcYKXEpR1S9ZgXbhEzzMcMR66vI= +cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4= +cloud.google.com/go/auth v0.17.0/go.mod h1:6wv/t5/6rOPAX4fJiRjKkJCvswLwdet7G8+UGXt7nCQ= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +cloud.google.com/go/longrunning v0.7.0 h1:FV0+SYF1RIj59gyoWDRi45GiYUMM3K1qO51qoboQT1E= +cloud.google.com/go/longrunning v0.7.0/go.mod h1:ySn2yXmjbK9Ba0zsQqunhDkYi0+9rlXIwnoAf+h+TPY= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= +github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.7 h1:zrn2Ee/nWmHulBx5sAVrGgAa0f2/R35S4DJwfFaUPFQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.7/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= +github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= +golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04= +golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0= +golang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4= +golang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/oauth2 v0.33.0 h1:4Q+qn+E5z8gPRJfmRy7C2gGG3T4jIprK6aSYgTXGRpo= +golang.org/x/oauth2 v0.33.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= +golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/api v0.256.0 h1:u6Khm8+F9sxbCTYNoBHg6/Hwv0N/i+V94MvkOSor6oI= +google.golang.org/api v0.256.0/go.mod h1:KIgPhksXADEKJlnEoRa9qAII4rXcy40vfI8HRqcU964= +google.golang.org/genproto v0.0.0-20251111163417-95abcf5c77ba h1:Ze6qXW0j37YCqZdCD2LkzVSxgEWez0cO4NUyd44DiDY= +google.golang.org/genproto v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:4FLPzLA8eGAktPOTemJGDgDYRpLYwrNu4u2JtWINhnI= +google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba h1:B14OtaXuMaCQsl2deSvNkyPKIzq3BjfxQp8d00QyWx4= +google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:G5IanEx8/PgI9w6CFcYQf7jMtHQhZruvfM1i3qOqk5U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba h1:UKgtfRM7Yh93Sya0Fo8ZzhDP4qBckrrxEr2oF5UIVb8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= +google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vectorsearch/internal/version.go b/vectorsearch/internal/version.go new file mode 100644 index 000000000000..04ec61c29392 --- /dev/null +++ b/vectorsearch/internal/version.go @@ -0,0 +1,20 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package internal + +// Version is the current tagged release of the library. +const Version = "0.0.0"