Class SetItemBody
Request type for a Data Item to store in the Cloud Save service.
Inherited Members
Namespace: Unity.Services.Apis.Admin.CloudSave
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "SetItemBody")]
[Preserve]
public class SetItemBody
Constructors
SetItemBody(string, object, string)
Initializes a new instance of the Set
Declaration
[Preserve]
public SetItemBody(string key = null, object value = null, string writeLock = null)
Parameters
Type | Name | Description |
---|---|---|
string | key | The key will be created if it does not exist, provided the item limit of 2000 keys has not been reached for this entity. (required). |
object | value | Any JSON serializable structure with a maximum size of 5 MB. (required). |
string | writeLock | Enforces conflict checking when updating an existing data item. This field should be omitted when creating a new data item. When updating an existing item, omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock.. |
Properties
Key
The key will be created if it does not exist, provided the item limit of 2000 keys has not been reached for this entity.
Declaration
[DataMember(Name = "key", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Key { get; set; }
Property Value
Type | Description |
---|---|
string | The key will be created if it does not exist, provided the item limit of 2000 keys has not been reached for this entity. |
Value
Any JSON serializable structure with a maximum size of 5 MB.
Declaration
[DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public object Value { get; set; }
Property Value
Type | Description |
---|---|
object | Any JSON serializable structure with a maximum size of 5 MB. |
WriteLock
Enforces conflict checking when updating an existing data item. This field should be omitted when creating a new data item. When updating an existing item, omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock.
Declaration
[DataMember(Name = "writeLock", EmitDefaultValue = false)]
[Preserve]
public string WriteLock { get; set; }
Property Value
Type | Description |
---|---|
string | Enforces conflict checking when updating an existing data item. This field should be omitted when creating a new data item. When updating an existing item, omitting this field ignores write conflicts. When present, an error response will be returned if the writeLock in the request does not match the stored writeLock. |