package io.synor.compute;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Usage statistics for the account.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class UsageStats {
    @JsonProperty("total_jobs")
    private Integer totalJobs;

    @JsonProperty("completed_jobs")
    private Integer completedJobs;

    @JsonProperty("failed_jobs")
    private Integer failedJobs;

    @JsonProperty("total_compute_seconds")
    private Double totalComputeSeconds;

    @JsonProperty("total_cost")
    private Double totalCost;

    @JsonProperty("period_start")
    private String periodStart;

    @JsonProperty("period_end")
    private String periodEnd;

    public UsageStats() {}

    public Integer getTotalJobs() {
        return totalJobs;
    }

    public Integer getCompletedJobs() {
        return completedJobs;
    }

    public Integer getFailedJobs() {
        return failedJobs;
    }

    public Double getTotalComputeSeconds() {
        return totalComputeSeconds;
    }

    public Double getTotalCost() {
        return totalCost;
    }

    public String getPeriodStart() {
        return periodStart;
    }

    public String getPeriodEnd() {
        return periodEnd;
    }

    @Override
    public String toString() {
        return "UsageStats{" +
               "totalJobs=" + totalJobs +
               ", completedJobs=" + completedJobs +
               ", failedJobs=" + failedJobs +
               ", totalComputeSeconds=" + totalComputeSeconds +
               ", totalCost=" + totalCost +
               '}';
    }
}
