# Interface RequestOptionsOrBuilder (6.118.0)

6.118.0 (latest) 6.116.0 6.111.1 6.108.0 6.107.0 6.103.0 6.102.1 6.101.1 6.100.0 6.99.0 6.98.1 6.97.1 6.96.1 6.95.1 6.94.0 6.93.0 6.89.0 6.88.0 6.87.0 6.86.0 6.85.0 6.83.0 6.82.0 6.80.1 6.79.0 6.77.0 6.74.1 6.72.0 6.71.0 6.69.0 6.68.0 6.66.0 6.65.1 6.62.0 6.60.0 6.58.0 6.57.0 6.56.0 6.55.0 6.54.0 6.53.0 6.52.1 6.51.0 6.50.1 6.49.0 6.25.1 6.24.0 6.23.4 6.22.0 6.21.2 6.20.0 6.19.1 6.18.0 6.17.4 6.14.1

    public interface RequestOptionsOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getClientContext()

    public abstract RequestOptions.ClientContext getClientContext()

Optional. Optional context that may be needed for some requests.

`
.google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.RequestOptions.ClientContext` | The clientContext. |

### getClientContextOrBuilder()

    public abstract RequestOptions.ClientContextOrBuilder getClientContextOrBuilder()

Optional. Optional context that may be needed for some requests.

`
.google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.RequestOptions.ClientContextOrBuilder` |   |

### getPriority()

    public abstract RequestOptions.Priority getPriority()

Priority for the request.

`.google.spanner.v1.RequestOptions.Priority priority = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-spanner/latest/com.google.spanner.v1.RequestOptions.Priority` | The priority. |

### getPriorityValue()

    public abstract int getPriorityValue()

Priority for the request.

`.google.spanner.v1.RequestOptions.Priority priority = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for priority. |

### getRequestTag()

    public abstract String getRequestTag()

A per-request tag which can be applied to queries or reads, used for
statistics collection.
Both `request_tag` and `transaction_tag` can be specified for a read or
query that belongs to a transaction.
This field is ignored for requests where it's not applicable (for example,
`CommitRequest`).
Legal characters for `request_tag` values are all printable characters
(ASCII 32 - 126) and the length of a request_tag is limited to 50
characters. Values that exceed this limit are truncated.
Any leading underscore (_) characters are removed from the string.

`string request_tag = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The requestTag. |

### getRequestTagBytes()

    public abstract ByteString getRequestTagBytes()

A per-request tag which can be applied to queries or reads, used for
statistics collection.
Both `request_tag` and `transaction_tag` can be specified for a read or
query that belongs to a transaction.
This field is ignored for requests where it's not applicable (for example,
`CommitRequest`).
Legal characters for `request_tag` values are all printable characters
(ASCII 32 - 126) and the length of a request_tag is limited to 50
characters. Values that exceed this limit are truncated.
Any leading underscore (_) characters are removed from the string.

`string request_tag = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for requestTag. |

### getTransactionTag()

    public abstract String getTransactionTag()

A tag used for statistics collection about this transaction.
Both `request_tag` and `transaction_tag` can be specified for a read or
query that belongs to a transaction.
To enable tagging on a transaction, `transaction_tag` must be set to the
same value for all requests belonging to the same transaction, including
BeginTransaction.
If this request doesn't belong to any transaction, `transaction_tag` is
ignored.
Legal characters for `transaction_tag` values are all printable characters
(ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50
characters. Values that exceed this limit are truncated.
Any leading underscore (_) characters are removed from the string.

`string transaction_tag = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The transactionTag. |

### getTransactionTagBytes()

    public abstract ByteString getTransactionTagBytes()

A tag used for statistics collection about this transaction.
Both `request_tag` and `transaction_tag` can be specified for a read or
query that belongs to a transaction.
To enable tagging on a transaction, `transaction_tag` must be set to the
same value for all requests belonging to the same transaction, including
BeginTransaction.
If this request doesn't belong to any transaction, `transaction_tag` is
ignored.
Legal characters for `transaction_tag` values are all printable characters
(ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50
characters. Values that exceed this limit are truncated.
Any leading underscore (_) characters are removed from the string.

`string transaction_tag = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for transactionTag. |

### hasClientContext()

    public abstract boolean hasClientContext()

Optional. Optional context that may be needed for some requests.

`
.google.spanner.v1.RequestOptions.ClientContext client_context = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the clientContext field is set. |