StateStoreItem Class

Definition

A single key -> value record within a state store (spec §2, §4.2).

public class StateStoreItem : System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Core.Storage.StateStoreItem>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Core.Storage.StateStoreItem>
type StateStoreItem = class
    interface IJsonModel<StateStoreItem>
    interface IPersistableModel<StateStoreItem>
Public Class StateStoreItem
Implements IJsonModel(Of StateStoreItem), IPersistableModel(Of StateStoreItem)
Inheritance
StateStoreItem
Implements

Properties

Name Description
CreatedAt

Gets the CreatedAt.

Etag

Optimistic-concurrency token for this item; also echoed in the ETag response header.

Id

Server-assigned, read-only. Not used for addressing (the key is.).

Key

Logical key, unique within the store. May contain /.

Object

Always "state_store.item".

Tags

Optional labels used to filter listKeys. Replaced wholesale on write.

UpdatedAt

Gets the UpdatedAt.

Value

Opaque JSON object; stored and returned verbatim. <= 1 MB serialized inline.

To assign an object to the value of this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Operators

Name Description
Explicit(ClientResult to StateStoreItem)

Explicit Interface Implementations

Name Description
IJsonModel<StateStoreItem>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<StateStoreItem>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IPersistableModel<StateStoreItem>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<StateStoreItem>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<StateStoreItem>.Write(ModelReaderWriterOptions)

Applies to