package server.logic.ws_protocol.JSON.handlers.channels.entyties;

import server.logic.ws_protocol.JSON.entyties.Net_Request;

import java.util.ArrayList;
import java.util.List;

public class Net_MarkChannelMessagesSeen_Request extends Net_Request {
    private String login;
    private ChannelSelector channel;
    private List<MessageRef> messages = new ArrayList<>();

    public String getLogin() { return login; }
    public void setLogin(String login) { this.login = login; }

    public ChannelSelector getChannel() { return channel; }
    public void setChannel(ChannelSelector channel) { this.channel = channel; }

    public List<MessageRef> getMessages() { return messages; }
    public void setMessages(List<MessageRef> messages) { this.messages = messages; }

    public static class ChannelSelector {
        private String ownerBlockchainName;
        private Integer channelRootBlockNumber;
        private String channelRootBlockHash;

        public String getOwnerBlockchainName() { return ownerBlockchainName; }
        public void setOwnerBlockchainName(String ownerBlockchainName) { this.ownerBlockchainName = ownerBlockchainName; }

        public Integer getChannelRootBlockNumber() { return channelRootBlockNumber; }
        public void setChannelRootBlockNumber(Integer channelRootBlockNumber) { this.channelRootBlockNumber = channelRootBlockNumber; }

        public String getChannelRootBlockHash() { return channelRootBlockHash; }
        public void setChannelRootBlockHash(String channelRootBlockHash) { this.channelRootBlockHash = channelRootBlockHash; }
    }

    public static class MessageRef {
        private String blockchainName;
        private Integer blockNumber;
        private String blockHash;

        public String getBlockchainName() { return blockchainName; }
        public void setBlockchainName(String blockchainName) { this.blockchainName = blockchainName; }

        public Integer getBlockNumber() { return blockNumber; }
        public void setBlockNumber(Integer blockNumber) { this.blockNumber = blockNumber; }

        public String getBlockHash() { return blockHash; }
        public void setBlockHash(String blockHash) { this.blockHash = blockHash; }
    }
}
