using FrostFS.Refs; using FrostFS.SDK.Client.Mappers.GRPC; namespace FrostFS.SDK; public class FrostFsAddress { private FrostFsObjectId? frostFsObjectId; private FrostFsContainerId? frostFsContainerId; private ObjectID? objectId; private ContainerID? containerId; public FrostFsAddress(FrostFsContainerId frostFsContainerId, FrostFsObjectId frostFsObjectId) { FrostFsObjectId = frostFsObjectId ?? throw new System.ArgumentNullException(nameof(frostFsObjectId)); FrostFsContainerId = frostFsContainerId ?? throw new System.ArgumentNullException(nameof(frostFsContainerId)); } internal FrostFsAddress(ObjectID objectId, ContainerID containerId) { ObjectId = objectId ?? throw new System.ArgumentNullException(nameof(objectId)); ContainerId = containerId ?? throw new System.ArgumentNullException(nameof(containerId)); } public FrostFsObjectId FrostFsObjectId { get => frostFsObjectId ??= objectId!.ToModel(); set => frostFsObjectId = value; } public FrostFsContainerId FrostFsContainerId { get => frostFsContainerId ??= containerId!.ToModel(); set => frostFsContainerId = value; } public ObjectID ObjectId { get => objectId ??= frostFsObjectId!.ToMessage(); set => objectId = value; } public ContainerID ContainerId { get => containerId ??= frostFsContainerId!.ToMessage(); set => containerId = value; } }