Class Item
Response type for a Data Item stored in the Cloud Save service.
Inherited Members
Namespace: Unity.Services.Apis.CloudSave
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "Item")]
[Preserve]
public class Item
Constructors
Item(string, object, string, ModifiedMetadata, ModifiedMetadata)
Initializes a new instance of the Item class.
Declaration
[Preserve]
public Item(string key = null, object value = null, string writeLock = null, ModifiedMetadata modified = null, ModifiedMetadata created = null)
Parameters
Type | Name | Description |
---|---|---|
string | key | Item key (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. (required). |
Modified |
modified | modified (required). |
Modified |
created | created (required). |
Properties
Created
Gets or Sets Created
Declaration
[DataMember(Name = "created", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public ModifiedMetadata Created { get; set; }
Property Value
Type | Description |
---|---|
Modified |
Key
Item key
Declaration
[DataMember(Name = "key", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Key { get; set; }
Property Value
Type | Description |
---|---|
string | Item key |
Modified
Gets or Sets Modified
Declaration
[DataMember(Name = "modified", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public ModifiedMetadata Modified { get; set; }
Property Value
Type | Description |
---|---|
Modified |
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", IsRequired = true, EmitDefaultValue = true)]
[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. |