# Interface AdaptMessageRequestOrBuilder (0.29.0)

0.29.0 (latest) 0.27.0 0.24.0 0.23.0 0.21.0 0.19.0 0.18.0 0.16.0 0.14.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0

    public interface AdaptMessageRequestOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsAttachments(String key)

    public abstract boolean containsAttachments(String key)

Optional. Opaque request state passed by the client to the server.

`map<string, string> attachments = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAttachments() (deprecated)

    public abstract Map<String,String> getAttachments()

Use [#getAttachmentsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.AdaptMessageRequestOrBuilder#com_google_spanner_adapter_v1_AdaptMessageRequestOrBuilder_getAttachmentsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getAttachmentsCount()

    public abstract int getAttachmentsCount()

Optional. Opaque request state passed by the client to the server.

`map<string, string> attachments = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAttachmentsMap()

    public abstract Map<String,String> getAttachmentsMap()

Optional. Opaque request state passed by the client to the server.

`map<string, string> attachments = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getAttachmentsOrDefault(String key, String defaultValue)

    public abstract String getAttachmentsOrDefault(String key, String defaultValue)

Optional. Opaque request state passed by the client to the server.

`map<string, string> attachments = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getAttachmentsOrThrow(String key)

    public abstract String getAttachmentsOrThrow(String key)

Optional. Opaque request state passed by the client to the server.

`map<string, string> attachments = 4 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

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

### getName()

    public abstract String getName()

Required. The database session in which the adapter request is processed.

`
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

Required. The database session in which the adapter request is processed.

`
string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

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

### getPayload()

    public abstract ByteString getPayload()

Optional. Uninterpreted bytes from the underlying wire protocol.

`bytes payload = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

### getProtocol()

    public abstract String getProtocol()

Required. Identifier for the underlying wire protocol.

`string protocol = 2 [(.google.api.field_behavior) = REQUIRED];`

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

### getProtocolBytes()

    public abstract ByteString getProtocolBytes()

Required. Identifier for the underlying wire protocol.

`string protocol = 2 [(.google.api.field_behavior) = REQUIRED];`

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