Skip to main content
Google Cloud Documentation
Documentation Technology areas
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
/
Console
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어
Sign in
  • C++
  • Documentation
  • Reference
Start free
Overview Guides Reference Samples
Google Cloud Documentation
  • Documentation
    • Overview
    • Guides
    • Reference
    • Samples
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Console
  • Overview
  • Library reference docs
  • Generative Language API C++ Client Library
  • In-Depth Topics
    • Environment Variables
    • How to Override the Authentication Credentials
    • How to Override the Default Endpoint
    • Override Retry, Backoff, and Idempotency Policies
    • Override generativelanguage_v1::GenerativeServiceClient Retry Policies
    • Override generativelanguage_v1::ModelServiceClient Retry Policies
  • Modules
    • Generative Language API Configuration Options
  • Namespaces
    • google::cloud::generativelanguage_v1
      • Overview
      • Classes
        • GenerativeServiceClient
          • Overview
          • Constructors
            • GenerativeServiceClient(GenerativeServiceClient const &)
            • GenerativeServiceClient(GenerativeServiceClient &&)
            • GenerativeServiceClient(std::shared_ptr< GenerativeServiceConnection >, Options)
          • Operators
            • operator=(GenerativeServiceClient const &)
            • operator=(GenerativeServiceClient &&)
            • operator==(GenerativeServiceClient const &, GenerativeServiceClient const &)
            • operator!=(GenerativeServiceClient const &, GenerativeServiceClient const &)
          • Functions
            • GenerateContent(std::string const &, std::vector< google::ai::generativelanguage::v1::Content > const &, Options)
            • GenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &, Options)
            • StreamGenerateContent(std::string const &, std::vector< google::ai::generativelanguage::v1::Content > const &, Options)
            • StreamGenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &, Options)
            • EmbedContent(std::string const &, google::ai::generativelanguage::v1::Content const &, Options)
            • EmbedContent(google::ai::generativelanguage::v1::EmbedContentRequest const &, Options)
            • BatchEmbedContents(std::string const &, std::vector< google::ai::generativelanguage::v1::EmbedContentRequest > const &, Options)
            • BatchEmbedContents(google::ai::generativelanguage::v1::BatchEmbedContentsRequest const &, Options)
            • CountTokens(std::string const &, std::vector< google::ai::generativelanguage::v1::Content > const &, Options)
            • CountTokens(google::ai::generativelanguage::v1::CountTokensRequest const &, Options)
        • GenerativeServiceConnection
          • Overview
          • Functions
            • virtual options()
            • virtual GenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &)
            • virtual StreamGenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &)
            • virtual EmbedContent(google::ai::generativelanguage::v1::EmbedContentRequest const &)
            • virtual BatchEmbedContents(google::ai::generativelanguage::v1::BatchEmbedContentsRequest const &)
            • virtual CountTokens(google::ai::generativelanguage::v1::CountTokensRequest const &)
        • GenerativeServiceConnectionIdempotencyPolicy
          • Overview
          • Functions
            • virtual clone() const
            • virtual GenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &)
            • virtual EmbedContent(google::ai::generativelanguage::v1::EmbedContentRequest const &)
            • virtual BatchEmbedContents(google::ai::generativelanguage::v1::BatchEmbedContentsRequest const &)
            • virtual CountTokens(google::ai::generativelanguage::v1::CountTokensRequest const &)
        • GenerativeServiceLimitedErrorCountRetryPolicy
          • Overview
          • Constructors
            • GenerativeServiceLimitedErrorCountRetryPolicy(int)
            • GenerativeServiceLimitedErrorCountRetryPolicy(GenerativeServiceLimitedErrorCountRetryPolicy &&)
            • GenerativeServiceLimitedErrorCountRetryPolicy(GenerativeServiceLimitedErrorCountRetryPolicy const &)
          • Functions
            • maximum_failures() const
            • virtual OnFailure(Status const &)
            • virtual IsExhausted() const
            • virtual IsPermanentFailure(Status const &) const
            • virtual clone() const
          • Types
            • BaseType
        • GenerativeServiceLimitedTimeRetryPolicy
          • Overview
          • Constructors
            • GenerativeServiceLimitedTimeRetryPolicy(std::chrono::duration< DurationRep, DurationPeriod >)
            • GenerativeServiceLimitedTimeRetryPolicy(GenerativeServiceLimitedTimeRetryPolicy &&)
            • GenerativeServiceLimitedTimeRetryPolicy(GenerativeServiceLimitedTimeRetryPolicy const &)
          • Functions
            • maximum_duration() const
            • virtual OnFailure(Status const &)
            • virtual IsExhausted() const
            • virtual IsPermanentFailure(Status const &) const
            • virtual clone() const
          • Types
            • BaseType
        • GenerativeServiceRetryPolicy
          • Overview
          • Functions
            • clone() const
            • OnFailure(Status const &)
            • OnFailure(Status const &)
            • IsExhausted() const
            • IsExhausted() const
            • IsPermanentFailure(Status const &) const
            • IsPermanentFailure(Status const &) const
        • ModelServiceClient
          • Overview
          • Constructors
            • ModelServiceClient(ModelServiceClient const &)
            • ModelServiceClient(ModelServiceClient &&)
            • ModelServiceClient(std::shared_ptr< ModelServiceConnection >, Options)
          • Operators
            • operator=(ModelServiceClient const &)
            • operator=(ModelServiceClient &&)
            • operator==(ModelServiceClient const &, ModelServiceClient const &)
            • operator!=(ModelServiceClient const &, ModelServiceClient const &)
          • Functions
            • GetModel(std::string const &, Options)
            • GetModel(google::ai::generativelanguage::v1::GetModelRequest const &, Options)
            • ListModels(std::int32_t, std::string const &, Options)
            • ListModels(google::ai::generativelanguage::v1::ListModelsRequest, Options)
        • ModelServiceConnection
          • Overview
          • Functions
            • virtual options()
            • virtual GetModel(google::ai::generativelanguage::v1::GetModelRequest const &)
            • virtual ListModels(google::ai::generativelanguage::v1::ListModelsRequest)
        • ModelServiceConnectionIdempotencyPolicy
          • Overview
          • Functions
            • virtual clone() const
            • virtual GetModel(google::ai::generativelanguage::v1::GetModelRequest const &)
            • virtual ListModels(google::ai::generativelanguage::v1::ListModelsRequest)
        • ModelServiceLimitedErrorCountRetryPolicy
          • Overview
          • Constructors
            • ModelServiceLimitedErrorCountRetryPolicy(int)
            • ModelServiceLimitedErrorCountRetryPolicy(ModelServiceLimitedErrorCountRetryPolicy &&)
            • ModelServiceLimitedErrorCountRetryPolicy(ModelServiceLimitedErrorCountRetryPolicy const &)
          • Functions
            • maximum_failures() const
            • virtual OnFailure(Status const &)
            • virtual IsExhausted() const
            • virtual IsPermanentFailure(Status const &) const
            • virtual clone() const
          • Types
            • BaseType
        • ModelServiceLimitedTimeRetryPolicy
          • Overview
          • Constructors
            • ModelServiceLimitedTimeRetryPolicy(std::chrono::duration< DurationRep, DurationPeriod >)
            • ModelServiceLimitedTimeRetryPolicy(ModelServiceLimitedTimeRetryPolicy &&)
            • ModelServiceLimitedTimeRetryPolicy(ModelServiceLimitedTimeRetryPolicy const &)
          • Functions
            • maximum_duration() const
            • virtual OnFailure(Status const &)
            • virtual IsExhausted() const
            • virtual IsPermanentFailure(Status const &) const
            • virtual clone() const
          • Types
            • BaseType
        • ModelServiceRetryPolicy
          • Overview
          • Functions
            • clone() const
            • OnFailure(Status const &)
            • OnFailure(Status const &)
            • IsExhausted() const
            • IsExhausted() const
            • IsPermanentFailure(Status const &) const
            • IsPermanentFailure(Status const &) const
      • Structs
        • GenerativeServiceBackoffPolicyOption
          • Overview
          • Types
            • Type
        • GenerativeServiceConnectionIdempotencyPolicyOption
          • Overview
          • Types
            • Type
        • GenerativeServiceRetryPolicyOption
          • Overview
          • Types
            • Type
        • ModelServiceBackoffPolicyOption
          • Overview
          • Types
            • Type
        • ModelServiceConnectionIdempotencyPolicyOption
          • Overview
          • Types
            • Type
        • ModelServiceRetryPolicyOption
          • Overview
          • Types
            • Type
      • Functions
        • MakeGenerativeServiceConnection(Options)
        • MakeDefaultGenerativeServiceConnectionIdempotencyPolicy()
        • MakeModelServiceConnection(Options)
        • MakeDefaultModelServiceConnectionIdempotencyPolicy()
    • google::cloud::generativelanguage_v1_mocks
      • Overview
      • Classes
        • MockGenerativeServiceConnection
          • Overview
          • Functions
            • virtual options()
            • virtual GenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &)
            • virtual StreamGenerateContent(google::ai::generativelanguage::v1::GenerateContentRequest const &)
            • virtual EmbedContent(google::ai::generativelanguage::v1::EmbedContentRequest const &)
            • virtual BatchEmbedContents(google::ai::generativelanguage::v1::BatchEmbedContentsRequest const &)
            • virtual CountTokens(google::ai::generativelanguage::v1::CountTokensRequest const &)
        • MockModelServiceConnection
          • Overview
          • Functions
            • virtual options()
            • virtual GetModel(google::ai::generativelanguage::v1::GetModelRequest const &)
            • virtual ListModels(google::ai::generativelanguage::v1::ListModelsRequest)
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
  • Home
  • C++
  • Documentation
  • Reference

Namespace google::cloud::generativelanguage_v1_mocks (2.30.0-rc)
Stay organized with collections Save and categorize content based on your preferences.

Classes

MockGenerativeServiceConnection

A class to mock GenerativeServiceConnection.

MockModelServiceConnection

A class to mock ModelServiceConnection.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-10 UTC.

  • Products and pricing

    • See all products
    • Google Cloud pricing
    • Google Cloud Marketplace
    • Contact sales
  • Support

    • Google Cloud Community
    • Support
    • Release Notes
    • System status
  • Resources

    • GitHub
    • Getting Started with Google Cloud
    • Code samples
    • Cloud Architecture Center
    • Training and Certification
  • Engage

    • Blog
    • Events
    • X (Twitter)
    • Google Cloud on YouTube
    • Google Cloud Tech on YouTube
  • About Google
  • Privacy
  • Site terms
  • Google Cloud terms
  • Manage cookies
  • Our third decade of climate action: join us
  • Sign up for the Google Cloud newsletter Subscribe
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어