Share via


MemoryOperation Class

Definition

Represents a single memory operation (create, update, or delete) performed on a memory item.

public class MemoryOperation : Azure.AI.AgentServer.Contracts.Generated.Common.IUtf8JsonSerializable, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.MemoryStore.MemoryOperation>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.MemoryStore.MemoryOperation>
type MemoryOperation = class
    interface IUtf8JsonSerializable
    interface IJsonModel<MemoryOperation>
    interface IPersistableModel<MemoryOperation>
Public Class MemoryOperation
Implements IJsonModel(Of MemoryOperation), IPersistableModel(Of MemoryOperation), IUtf8JsonSerializable
Inheritance
MemoryOperation
Implements

Constructors

Name Description
MemoryOperation()

Initializes a new instance of MemoryOperation for deserialization.

MemoryOperation(MemoryOperationKind, MemoryItem, IDictionary<String,BinaryData>)

Initializes a new instance of MemoryOperation.

MemoryOperation(MemoryOperationKind, MemoryItem)

Initializes a new instance of MemoryOperation.

Properties

Name Description
Kind

The type of memory operation being performed.

MemoryItem

The memory item to create, update, or delete. Please note MemoryItem is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. The available derived classes include UserProfileMemoryItem.

Methods

Name Description
DeserializeMemoryOperation(JsonElement, ModelReaderWriterOptions)
FromResponse(Response)

Deserializes the model from a raw response.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
ToRequestContent()

Convert into a RequestContent.

Explicit Interface Implementations

Name Description
IJsonModel<MemoryOperation>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<MemoryOperation>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MemoryOperation>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MemoryOperation>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<MemoryOperation>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to