package com.dexorder.flink.publisher;

import java.io.Serializable;
import java.util.List;

/**
 * Wrapper for Market protobuf message from Kafka.
 * Represents symbol metadata for a trading pair.
 */
public class MarketWrapper implements Serializable {
    private static final long serialVersionUID = 2L;

    private String exchangeId;
    private String marketId;
    private String marketType;
    private String description;
    private String baseAsset;
    private String quoteAsset;
    private List<Integer> supportedPeriodSeconds;
    private long earliestTime;

    // Nautilus Instrument fields
    private int pricePrecision;
    private int sizePrecision;
    private double tickSize;
    private double lotSize;
    private double minNotional;
    private double marginInit;
    private double marginMaint;
    private double makerFee;
    private double takerFee;
    private double contractMultiplier;

    public MarketWrapper() {
    }

    // Getters and setters

    public String getExchangeId() { return exchangeId; }
    public void setExchangeId(String exchangeId) { this.exchangeId = exchangeId; }

    public String getMarketId() { return marketId; }
    public void setMarketId(String marketId) { this.marketId = marketId; }

    public String getMarketType() { return marketType; }
    public void setMarketType(String marketType) { this.marketType = marketType; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getBaseAsset() { return baseAsset; }
    public void setBaseAsset(String baseAsset) { this.baseAsset = baseAsset; }

    public String getQuoteAsset() { return quoteAsset; }
    public void setQuoteAsset(String quoteAsset) { this.quoteAsset = quoteAsset; }

    public List<Integer> getSupportedPeriodSeconds() { return supportedPeriodSeconds; }
    public void setSupportedPeriodSeconds(List<Integer> supportedPeriodSeconds) { this.supportedPeriodSeconds = supportedPeriodSeconds; }

    public long getEarliestTime() { return earliestTime; }
    public void setEarliestTime(long earliestTime) { this.earliestTime = earliestTime; }

    public int getPricePrecision() { return pricePrecision; }
    public void setPricePrecision(int pricePrecision) { this.pricePrecision = pricePrecision; }

    public int getSizePrecision() { return sizePrecision; }
    public void setSizePrecision(int sizePrecision) { this.sizePrecision = sizePrecision; }

    public double getTickSize() { return tickSize; }
    public void setTickSize(double tickSize) { this.tickSize = tickSize; }

    public double getLotSize() { return lotSize; }
    public void setLotSize(double lotSize) { this.lotSize = lotSize; }

    public double getMinNotional() { return minNotional; }
    public void setMinNotional(double minNotional) { this.minNotional = minNotional; }

    public double getMarginInit() { return marginInit; }
    public void setMarginInit(double marginInit) { this.marginInit = marginInit; }

    public double getMarginMaint() { return marginMaint; }
    public void setMarginMaint(double marginMaint) { this.marginMaint = marginMaint; }

    public double getMakerFee() { return makerFee; }
    public void setMakerFee(double makerFee) { this.makerFee = makerFee; }

    public double getTakerFee() { return takerFee; }
    public void setTakerFee(double takerFee) { this.takerFee = takerFee; }

    public double getContractMultiplier() { return contractMultiplier; }
    public void setContractMultiplier(double contractMultiplier) { this.contractMultiplier = contractMultiplier; }

    @Override
    public String toString() {
        return "MarketWrapper{" +
                "exchangeId='" + exchangeId + '\'' +
                ", marketId='" + marketId + '\'' +
                ", marketType='" + marketType + '\'' +
                ", baseAsset='" + baseAsset + '\'' +
                ", quoteAsset='" + quoteAsset + '\'' +
                '}';
    }
}
