package com.backendsys.entity.Ai.Aiivh.AiivhAsset;

import lombok.Builder;
import lombok.Data;

import java.util.Map;

@Data
@Builder
public class QuotaStatistics {

    private Map<Boolean, Long> free;
    private Map<Boolean, Long> using;
    private Map<Boolean, Long> used;

    public QuotaStatistics(Map<Boolean, Long> free, Map<Boolean, Long> using, Map<Boolean, Long> used) {
        this.free = free;
        this.using = using;
        this.used = used;
    }
    public Long getFreeUnexpired() {
        return free.getOrDefault(false, 0L);
    }
    public Long getFreeExpired() {
        return free.getOrDefault(true, 0L);
    }
    public Long getUsingUnexpired() {
        return using.getOrDefault(false, 0L);
    }
    public Long getUsingExpired() {
        return using.getOrDefault(true, 0L);
    }
    public Long getUsedUnexpired() {
        return used.getOrDefault(false, 0L);
    }
    public Long getUsedExpired() {
        return used.getOrDefault(true, 0L);
    }

}
