# Interface AdaptMessageResponseOrBuilder (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 AdaptMessageResponseOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### containsStateUpdates(String key)

    public abstract boolean containsStateUpdates(String key)

Optional. Opaque state updates to be applied by the client.

`map<string, string> state_updates = 2 [(.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` |   |

### getLast()

    public abstract boolean getLast()

Optional. Indicates whether this is the last
AdaptMessageResponse in
the stream. This field may be optionally set by the server. Clients should
not rely on this field being set in all cases.

`bool last = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

### getPayload()

    public abstract ByteString getPayload()

Optional. Uninterpreted bytes from the underlying wire protocol.

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

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

### getStateUpdates() (deprecated)

    public abstract Map<String,String> getStateUpdates()

Use [#getStateUpdatesMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-spanneradapter/latest/com.google.spanner.adapter.v1.AdaptMessageResponseOrBuilder#com_google_spanner_adapter_v1_AdaptMessageResponseOrBuilder_getStateUpdatesMap__) 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>` |   |

### getStateUpdatesCount()

    public abstract int getStateUpdatesCount()

Optional. Opaque state updates to be applied by the client.

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

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

### getStateUpdatesMap()

    public abstract Map<String,String> getStateUpdatesMap()

Optional. Opaque state updates to be applied by the client.

`map<string, string> state_updates = 2 [(.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>` |   |

### getStateUpdatesOrDefault(String key, String defaultValue)

    public abstract String getStateUpdatesOrDefault(String key, String defaultValue)

Optional. Opaque state updates to be applied by the client.

`map<string, string> state_updates = 2 [(.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` |   |

### getStateUpdatesOrThrow(String key)

    public abstract String getStateUpdatesOrThrow(String key)

Optional. Opaque state updates to be applied by the client.

`map<string, string> state_updates = 2 [(.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` |   |