17 lines
571 B
Java
17 lines
571 B
Java
package info.FrostFS.sdk.mappers;
|
|
|
|
import frostFS.object.Types;
|
|
import info.FrostFS.sdk.jdo.ObjectAttribute;
|
|
|
|
public class ObjectAttributeMapper {
|
|
public static Types.Header.Attribute toGrpcMessage(ObjectAttribute attribute) {
|
|
return Types.Header.Attribute.newBuilder()
|
|
.setKey(attribute.getKey())
|
|
.setValue(attribute.getValue())
|
|
.build();
|
|
}
|
|
|
|
public static ObjectAttribute toModel(Types.Header.Attribute attribute) {
|
|
return new ObjectAttribute(attribute.getKey(), attribute.getValue());
|
|
}
|
|
}
|