Skip to content

feat(vectorsearch): generate library#16012

Merged
scotthart merged 4 commits intogoogleapis:mainfrom
scotthart:feat-vectorsearch-generate-library
Feb 27, 2026
Merged

feat(vectorsearch): generate library#16012
scotthart merged 4 commits intogoogleapis:mainfrom
scotthart:feat-vectorsearch-generate-library

Conversation

@scotthart
Copy link
Member

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers the C++ client library for the Google Cloud Vector Search API. This new library empowers C++ applications to seamlessly interact with the Vector Search service, facilitating the management of collections, indexes, and data objects to leverage advanced vector search capabilities.

Highlights

  • New Client Library: Introduced a new C++ client library for the Google Cloud Vector Search API.
  • Build System Integration: Integrated the new library into the existing Bazel and CMake build systems.
  • Documentation and Examples: Added comprehensive documentation, quickstart guides, and example code for the Vector Search API.
Changelog
  • CHANGELOG.md
    • Added an entry for the new Vector Search API.
  • README.md
    • Updated the list of available libraries to include Vector Search API with quickstart and reference links.
  • ci/etc/expected_install_directories
    • Added expected install directories for the Vector Search API client library, including vectorsearch, vectorsearch/v1, vectorsearch/v1/internal, and vectorsearch/v1/mocks.
  • cmake/GoogleCloudCppFeatures.cmake
    • Added "vectorsearch" to the list of GA libraries.
  • external/googleapis/protodeps/vectorsearch.deps
    • Added new file listing protobuf dependencies for the Vector Search API.
  • external/googleapis/protolists/vectorsearch.list
    • Added new file listing proto files for the Vector Search API.
  • external/googleapis/update_libraries.sh
    • Updated the script to include vectorsearch_cc_grpc for the Vector Search library.
  • generator/generator_config.textproto
    • Added service configurations for DataObjectService, VectorSearchService, and DataObjectSearchService within the Vector Search API.
  • google/cloud/vectorsearch/BUILD.bazel
    • Added new Bazel build file for the Vector Search library.
  • google/cloud/vectorsearch/CMakeLists.txt
    • Added new CMake build file for the Vector Search library.
  • google/cloud/vectorsearch/README.md
    • Added new README file for the Vector Search API C++ Client Library.
  • google/cloud/vectorsearch/doc/environment-variables.dox
    • Added new Doxygen documentation for environment variables related to Vector Search.
  • google/cloud/vectorsearch/doc/main.dox
    • Added new main Doxygen documentation page for the Vector Search API C++ Client Library.
  • google/cloud/vectorsearch/doc/options.dox
    • Added new Doxygen documentation for configuration options related to Vector Search.
  • google/cloud/vectorsearch/doc/override-authentication.dox
    • Added new Doxygen documentation for overriding authentication credentials in Vector Search.
  • google/cloud/vectorsearch/doc/override-endpoint.dox
    • Added new Doxygen documentation for overriding the default endpoint in Vector Search.
  • google/cloud/vectorsearch/doc/override-retry-policies.dox
    • Added new Doxygen documentation for overriding retry, backoff, and idempotency policies in Vector Search.
  • google/cloud/vectorsearch/doc/override-universe-domain.dox
    • Added new Doxygen documentation for overriding the default universe domain in Vector Search.
  • google/cloud/vectorsearch/quickstart/.bazelrc
    • Added new Bazel configuration file for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/BUILD.bazel
    • Added new Bazel build file for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/CMakeLists.txt
    • Added new CMake build file for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/Makefile
    • Added new Makefile for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/README.md
    • Added new README file for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/WORKSPACE.bazel
    • Added new Bazel workspace file for the Vector Search quickstart.
  • google/cloud/vectorsearch/quickstart/quickstart.cc
    • Added new quickstart C++ code for the Vector Search API.
  • google/cloud/vectorsearch/v1/.repo-metadata.json
    • Added new repository metadata for the Vector Search API.
  • google/cloud/vectorsearch/v1/data_object_client.cc
    • Added new C++ client implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_client.h
    • Added new C++ client header for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_connection.cc
    • Added new C++ connection implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_connection.h
    • Added new C++ connection header for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_connection_idempotency_policy.cc
    • Added new C++ idempotency policy implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_connection_idempotency_policy.h
    • Added new C++ idempotency policy header for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_options.h
    • Added new C++ options header for DataObjectService.
  • google/cloud/vectorsearch/v1/data_object_search_client.cc
    • Added new C++ client implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_client.h
    • Added new C++ client header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_connection.cc
    • Added new C++ connection implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_connection.h
    • Added new C++ connection header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_connection_idempotency_policy.cc
    • Added new C++ idempotency policy implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_connection_idempotency_policy.h
    • Added new C++ idempotency policy header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/data_object_search_options.h
    • Added new C++ options header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_auth_decorator.cc
    • Added new C++ authentication decorator implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_auth_decorator.h
    • Added new C++ authentication decorator header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_connection_impl.cc
    • Added new C++ connection implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_connection_impl.h
    • Added new C++ connection implementation header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_logging_decorator.cc
    • Added new C++ logging decorator implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_logging_decorator.h
    • Added new C++ logging decorator header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_metadata_decorator.cc
    • Added new C++ metadata decorator implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_metadata_decorator.h
    • Added new C++ metadata decorator header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_option_defaults.cc
    • Added new C++ option defaults implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_option_defaults.h
    • Added new C++ option defaults header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_retry_traits.h
    • Added new C++ retry traits header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_auth_decorator.cc
    • Added new C++ authentication decorator implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_auth_decorator.h
    • Added new C++ authentication decorator header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_connection_impl.cc
    • Added new C++ connection implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_connection_impl.h
    • Added new C++ connection implementation header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_logging_decorator.cc
    • Added new C++ logging decorator implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_logging_decorator.h
    • Added new C++ logging decorator header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_metadata_decorator.cc
    • Added new C++ metadata decorator implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_metadata_decorator.h
    • Added new C++ metadata decorator header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_option_defaults.cc
    • Added new C++ option defaults implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_option_defaults.h
    • Added new C++ option defaults header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_retry_traits.h
    • Added new C++ retry traits header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_sources.cc
    • Added new C++ sources file for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_stub.cc
    • Added new C++ stub implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_stub.h
    • Added new C++ stub header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_stub_factory.cc
    • Added new C++ stub factory implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_stub_factory.h
    • Added new C++ stub factory header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_tracing_connection.cc
    • Added new C++ tracing connection implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_tracing_connection.h
    • Added new C++ tracing connection header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_tracing_stub.cc
    • Added new C++ tracing stub implementation for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_search_tracing_stub.h
    • Added new C++ tracing stub header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/internal/data_object_sources.cc
    • Added new C++ sources file for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_stub.cc
    • Added new C++ stub implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_stub.h
    • Added new C++ stub header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_stub_factory.cc
    • Added new C++ stub factory implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_stub_factory.h
    • Added new C++ stub factory header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_tracing_connection.cc
    • Added new C++ tracing connection implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_tracing_connection.h
    • Added new C++ tracing connection header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_tracing_stub.cc
    • Added new C++ tracing stub implementation for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/data_object_tracing_stub.h
    • Added new C++ tracing stub header for DataObjectService.
  • google/cloud/vectorsearch/v1/internal/vector_search_auth_decorator.cc
    • Added new C++ authentication decorator implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_auth_decorator.h
    • Added new C++ authentication decorator header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_connection_impl.cc
    • Added new C++ connection implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_connection_impl.h
    • Added new C++ connection implementation header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_logging_decorator.cc
    • Added new C++ logging decorator implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_logging_decorator.h
    • Added new C++ logging decorator header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_metadata_decorator.cc
    • Added new C++ metadata decorator implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_metadata_decorator.h
    • Added new C++ metadata decorator header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_option_defaults.cc
    • Added new C++ option defaults implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_option_defaults.h
    • Added new C++ option defaults header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_retry_traits.h
    • Added new C++ retry traits header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_sources.cc
    • Added new C++ sources file for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_stub.cc
    • Added new C++ stub implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_stub.h
    • Added new C++ stub header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_stub_factory.cc
    • Added new C++ stub factory implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_stub_factory.h
    • Added new C++ stub factory header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_tracing_connection.cc
    • Added new C++ tracing connection implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_tracing_connection.h
    • Added new C++ tracing connection header for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_tracing_stub.cc
    • Added new C++ tracing stub implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/internal/vector_search_tracing_stub.h
    • Added new C++ tracing stub header for VectorSearchService.
  • google/cloud/vectorsearch/v1/mocks/mock_data_object_connection.h
    • Added new C++ mock connection header for DataObjectService.
  • google/cloud/vectorsearch/v1/mocks/mock_data_object_search_connection.h
    • Added new C++ mock connection header for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/mocks/mock_vector_search_connection.h
    • Added new C++ mock connection header for VectorSearchService.
  • google/cloud/vectorsearch/v1/samples/data_object_client_samples.cc
    • Added new C++ client samples for DataObjectService.
  • google/cloud/vectorsearch/v1/samples/data_object_search_client_samples.cc
    • Added new C++ client samples for DataObjectSearchService.
  • google/cloud/vectorsearch/v1/samples/vector_search_client_samples.cc
    • Added new C++ client samples for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_client.cc
    • Added new C++ client implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_client.h
    • Added new C++ client header for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_connection.cc
    • Added new C++ connection implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_connection.h
    • Added new C++ connection header for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_connection_idempotency_policy.cc
    • Added new C++ idempotency policy implementation for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_connection_idempotency_policy.h
    • Added new C++ idempotency policy header for VectorSearchService.
  • google/cloud/vectorsearch/v1/vector_search_options.h
    • Added new C++ options header for VectorSearchService.
  • libraries.bzl
    • Updated the list of GA libraries to include "vectorsearch".
Activity
  • The pull request was created by scotthart.
  • The pull request introduces a new C++ client library for the Google Cloud Vector Search API.
  • The changes include adding numerous new files for the client library's implementation, documentation, and build configurations.
  • Existing core project files were updated to integrate the new Vector Search API client library.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the generated C++ client library for the Vector Search API. Overall, the changes look good, and all original comments have been kept as they align with the provided rules or are not covered by them. The comments address a configuration error leading to an incorrect copyright year, suggest improvements to quickstart documentation for clarity, and identify several methods in the idempotency policies that should be marked as idempotent according to AIP guidelines, which is crucial for correct retry behavior.

service {
service_proto_path: "google/cloud/vectorsearch/v1/data_object_service.proto"
product_path: "google/cloud/vectorsearch/v1"
initial_copyright_year: "2026"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The initial_copyright_year is set to 2026, which is in the future. This is likely a mistake and should be updated to the current year (e.g., 2024). This setting appears to be the root cause for the incorrect copyright year in all newly generated files in this pull request.

1. Run the example, changing the placeholder(s) to appropriate values:

```bash
bazel run :quickstart -- [...]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The placeholder [...] for command-line arguments is a bit vague. It would be more helpful for users to see the expected arguments, like <project-id> <location-id>, as defined in quickstart.cc.

Suggested change
bazel run :quickstart -- [...]
bazel run :quickstart -- <project-id> <location-id>

1. Run the example, changing the placeholder(s) to appropriate values:

```bash
.build/quickstart [...]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the bazel example, it would be more helpful to show the expected arguments here, e.g., <project-id> <location-id>.

Suggested change
.build/quickstart [...]
.build/quickstart <project-id> <location-id>


Idempotency DataObjectServiceConnectionIdempotencyPolicy::CreateDataObject(
google::cloud::vectorsearch::v1::CreateDataObjectRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

CreateDataObject takes a data_object_id from the client, which makes the operation idempotent according to AIP-133. This should be kIdempotent.

  return Idempotency::kIdempotent;

Idempotency
DataObjectServiceConnectionIdempotencyPolicy::BatchCreateDataObjects(
google::cloud::vectorsearch::v1::BatchCreateDataObjectsRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

BatchCreateDataObjects is a batch of CreateDataObjectRequest calls, each of which is idempotent. The batch operation should also be considered idempotent.

  return Idempotency::kIdempotent;


Idempotency VectorSearchServiceConnectionIdempotencyPolicy::DeleteCollection(
google::cloud::vectorsearch::v1::DeleteCollectionRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Delete operations are typically idempotent (see AIP-135). This should be kIdempotent.

  return Idempotency::kIdempotent;


Idempotency VectorSearchServiceConnectionIdempotencyPolicy::CreateIndex(
google::cloud::vectorsearch::v1::CreateIndexRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

CreateIndex takes an index_id from the client, which makes the operation idempotent according to AIP-133. This should be kIdempotent.

  return Idempotency::kIdempotent;


Idempotency VectorSearchServiceConnectionIdempotencyPolicy::DeleteIndex(
google::cloud::vectorsearch::v1::DeleteIndexRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Delete operations are typically idempotent (see AIP-135). This should be kIdempotent.

  return Idempotency::kIdempotent;


Idempotency VectorSearchServiceConnectionIdempotencyPolicy::DeleteOperation(
google::longrunning::DeleteOperationRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

DeleteOperation should be idempotent as per AIP-154.

  return Idempotency::kIdempotent;


Idempotency VectorSearchServiceConnectionIdempotencyPolicy::CancelOperation(
google::longrunning::CancelOperationRequest const&) {
return Idempotency::kNonIdempotent;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

CancelOperation should be idempotent as per AIP-155.

  return Idempotency::kIdempotent;

@scotthart scotthart enabled auto-merge (squash) February 27, 2026 19:02
@scotthart scotthart merged commit fbbfe53 into googleapis:main Feb 27, 2026
57 of 64 checks passed
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.64%. Comparing base (fc02353) to head (760b4a7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16012   +/-   ##
=======================================
  Coverage   92.63%   92.64%           
=======================================
  Files        2333     2333           
  Lines      214631   214631           
=======================================
+ Hits       198830   198846   +16     
+ Misses      15801    15785   -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants