21 lines
536 B
C#
21 lines
536 B
C#
using FrostFS.Object;
|
|
using FrostFS.SDK.ModelsV2;
|
|
|
|
namespace FrostFS.SDK.ClientV2.Mappers.GRPC;
|
|
|
|
public static class ObjectAttributeMapper
|
|
{
|
|
public static Header.Types.Attribute ToGrpcMessage(this ObjectAttribute attribute)
|
|
{
|
|
return new Header.Types.Attribute
|
|
{
|
|
Key = attribute.Key,
|
|
Value = attribute.Value
|
|
};
|
|
}
|
|
|
|
public static ObjectAttribute ToModel(this Header.Types.Attribute attribute)
|
|
{
|
|
return new ObjectAttribute(attribute.Key, attribute.Value);
|
|
}
|
|
}
|