# Google API Core Client - Class CallOptions (1.43.0)

1.43.0 (latest) 1.42.5 1.40.0 1.38.2 1.36.1 1.35.1 Reference documentation and code samples for the Google API Core Client class CallOptions.

The CallOptions class provides typing to the associative array of options
passed to transport RPC methods. See
[Google\\ApiCore\\Transport\\TransportInterface::startUnaryCall()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface#_Google_ApiCore_Transport_TransportInterface__startUnaryCall__),
[Google\\ApiCore\\Transport\\TransportInterface::startBidiStreamingCall()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface#_Google_ApiCore_Transport_TransportInterface__startBidiStreamingCall__),
[Google\\ApiCore\\Transport\\TransportInterface::startClientStreamingCall()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface#_Google_ApiCore_Transport_TransportInterface__startClientStreamingCall__), and
[Google\\ApiCore\\Transport\\TransportInterface::startServerStreamingCall()](https://docs.cloud.google.com/php/docs/reference/gax/latest/Transport.TransportInterface#_Google_ApiCore_Transport_TransportInterface__startServerStreamingCall__).

## Namespace

Google \\ ApiCore \\ Options

## Methods

### __construct

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array` Call options |
| `↳ array` | `array<>` <br /> |
| `↳ timeoutMillis` | `int` The timeout in milliseconds for the call. |
| `↳ transportOptions` | `array` Transport-specific call options. See CallOptions::setTransportOptions. |
| `↳ retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings|array` A retry settings override for the call. If $retrySettings is an array, the settings will be merged with the method's default retry settings. If $retrySettings is a RetrySettings object, that object will be used instead of the method defaults. |

### setHeaders

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `headers` | `array` |

### setTimeoutMillis

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `timeoutMillis` | `int|null` |

### setTransportOptions

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `transportOptions` | `array` Transport-specific call-time options. |
| `↳ grpcOptions` | `array` Key-value pairs for gRPC-specific options passed as the `$options` argument to Grpc\\BaseStub request methods. Current options are `call_credentials_callback` and `timeout`. **NOTE** : This library sets `call_credentials_callback` using [Google\\ApiCore\\CredentialsWrapper](https://docs.cloud.google.com/php/docs/reference/gax/latest/CredentialsWrapper), and `timeout` using the `timeoutMillis` call option, so these options are not very useful. |
| `↳ grpcFallbackOptions` | `array` Key-value pairs for gRPC fallback specific options passed as the `$options` argument to the `$httpHandler` callable. By default these are passed to GuzzleHttp\\Client as request options. See {@link https://docs.guzzlephp.org/en/stable/request-options.html}. |
| `↳ restOptions` | `array` Key-value pairs for REST-specific options passed as the `$options` argument to the `$httpHandler` callable. By default these are passed to GuzzleHttp\\Client as request options. See {@link https://docs.guzzlephp.org/en/stable/request-options.html}. |

### setTransportSpecificOptions

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `transportSpecificOptions` | `array` |

### setRetrySettings

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `retrySettings` | `https://docs.cloud.google.com/php/docs/reference/gax/latest/RetrySettings|array|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |