# GetStateRequest (dapr-sdk-parent 1.10.0 API)

Package io.dapr.client.domain

## Class GetStateRequest

- java.lang.Object
- - io.dapr.client.domain.GetStateRequest

    public class GetStateRequest
    extends Object

A request to get a state by key.

### Constructor Summary

Constructors
`GetStateRequest​(String storeName, String key)` Constructor for GetStateRequest.

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getKey()`
`Map<String,​String>` `getMetadata()`
`StateOptions` `getStateOptions()`
`String` `getStoreName()`
`GetStateRequest` `setMetadata​(Map<String,​String> metadata)`
`GetStateRequest` `setStateOptions​(StateOptions stateOptions)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### GetStateRequest

    public GetStateRequest​(String storeName,
                           String key)

Constructor for GetStateRequest.

Parameters:
  `storeName` - Name of the state store
  `key` - Key of the state object

### Method Detail

#### getStoreName

    public String getStoreName()

#### getKey

    public String getKey()

#### getStateOptions

    public StateOptions getStateOptions()

#### setStateOptions

    public GetStateRequest setStateOptions​(StateOptions stateOptions)

#### getMetadata

    public Map<String,​String> getMetadata()

#### setMetadata

    public GetStateRequest setMetadata​(Map<String,​String> metadata)