# Namespace google::cloud::generativelanguage_v1 (2.30.0-rc)

## Classes

### [GenerativeServiceClient](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceClient)

API for using Large Models that generate multimodal content and have additional capabilities beyond text generation.

### [GenerativeServiceConnection](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection)

The [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection) object for [`GenerativeServiceClient`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceClient).

### [GenerativeServiceConnectionIdempotencyPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnectionIdempotencyPolicy)

### [GenerativeServiceLimitedErrorCountRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceLimitedErrorCountRetryPolicy)

A retry policy for [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection) based on counting errors.

### [GenerativeServiceLimitedTimeRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceLimitedTimeRetryPolicy)

A retry policy for [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection) based on elapsed time.

### [GenerativeServiceRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceRetryPolicy)

The retry policy for [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection).

### [ModelServiceClient](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceClient)

Provides methods for getting metadata information about Generative Models.

### [ModelServiceConnection](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection)

The [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection) object for [`ModelServiceClient`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceClient).

### [ModelServiceConnectionIdempotencyPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnectionIdempotencyPolicy)

### [ModelServiceLimitedErrorCountRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceLimitedErrorCountRetryPolicy)

A retry policy for [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection) based on counting errors.

### [ModelServiceLimitedTimeRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceLimitedTimeRetryPolicy)

A retry policy for [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection) based on elapsed time.

### [ModelServiceRetryPolicy](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceRetryPolicy)

The retry policy for [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection).

## Structs

### [GenerativeServiceBackoffPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceBackoffPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the backoff policy.

### [GenerativeServiceConnectionIdempotencyPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnectionIdempotencyPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure which operations are retried.

### [GenerativeServiceRetryPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceRetryPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the retry policy.

### [ModelServiceBackoffPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceBackoffPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the backoff policy.

### [ModelServiceConnectionIdempotencyPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnectionIdempotencyPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure which operations are retried.

### [ModelServiceRetryPolicyOption](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/structgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceRetryPolicyOption)

Use with [`google::cloud::Options`](https://cloud.google.com/cpp/docs/reference/common/latest/classgoogle_1_1cloud_1_1Options.html) to configure the retry policy.

## Functions

### MakeGenerativeServiceConnection(Options)

A factory function to construct an object of type [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection).
The returned connection object should not be used directly; instead it should be passed as an argument to the constructor of [GenerativeServiceClient](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceClient).

The optional `options` argument may be used to configure aspects of the returned [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection). Expected options are any of the types in the following option lists:

- [`google::cloud::CommonOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::GrpcOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::UnifiedCredentialsOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::generativelanguage_v1::GenerativeServicePolicyOptionList`](about:invalid#zCSafez)

> [!NOTE]
> **Note:** Unexpected options will be ignored. To log unexpected options instead, set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | (optional) Configure the [`GenerativeServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1GenerativeServiceConnection) created by this function. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::shared_ptr< GenerativeServiceConnection >` |   |

### MakeDefaultGenerativeServiceConnectionIdempotencyPolicy()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::unique_ptr< GenerativeServiceConnectionIdempotencyPolicy >` |   |

### MakeModelServiceConnection(Options)

A factory function to construct an object of type [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection).
The returned connection object should not be used directly; instead it should be passed as an argument to the constructor of [ModelServiceClient](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceClient).

The optional `options` argument may be used to configure aspects of the returned [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection). Expected options are any of the types in the following option lists:

- [`google::cloud::CommonOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::GrpcOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::UnifiedCredentialsOptionList`](https://cloud.google.com/cpp/docs/reference/common/latest/namespacegoogle_1_1cloud.html)
- [`google::cloud::generativelanguage_v1::ModelServicePolicyOptionList`](about:invalid#zCSafez)

> [!NOTE]
> **Note:** Unexpected options will be ignored. To log unexpected options instead, set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `options` | (optional) Configure the [`ModelServiceConnection`](https://docs.cloud.google.com/cpp/docs/reference/generativelanguage/latest/classgoogle_1_1cloud_1_1generativelanguage__v1_1_1ModelServiceConnection) created by this function. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::shared_ptr< ModelServiceConnection >` |   |

### MakeDefaultModelServiceConnectionIdempotencyPolicy()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `std::unique_ptr< ModelServiceConnectionIdempotencyPolicy >` |   |