frostfs-sdk-csharp/src/FrostFS.SDK.ModelsV2/Object.cs
Ivan Pchelintsev b307c2c899 [#1] Add object Get operation + code quality
Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
2024-05-22 14:29:20 +03:00

42 lines
No EOL
954 B
C#

using FrostFS.SDK.ModelsV2.Enums;
namespace FrostFS.SDK.ModelsV2;
public class ObjectAttribute
{
public string Key { get; set; }
public string Value { get; set; }
public ObjectAttribute(string key, string value)
{
Key = key;
Value = value;
}
}
public class ObjectHeader
{
public ObjectAttribute[] Attributes { get; set; }
public ContainerId ContainerId { get; set; }
public long Size { get; set; }
public ObjectType ObjectType { get; set; }
public Version Version { get; set; }
public ObjectHeader(
ContainerId containerId,
ObjectType type = ObjectType.Regular,
params ObjectAttribute[] attributes
)
{
Attributes = attributes;
ContainerId = containerId;
ObjectType = type;
}
}
public class Object
{
public ObjectHeader Header { get; set; }
public ObjectId ObjectId { get; set; }
public byte[] Payload { get; set; }
}