package io.delphiplatform.api.v3.model.spotify;

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.util.Objects;

/**
 * SpotifySaves
 */
public class SpotifySaves {

    @JsonProperty("free")
    private JsonNullable<Long> free = JsonNullable.undefined();

    @JsonProperty("premium")
    private JsonNullable<Long> premium = JsonNullable.undefined();

    @JsonProperty("total")
    private JsonNullable<Long> total = JsonNullable.undefined();

    public SpotifySaves free(Long free) {
        this.free = JsonNullable.of(free);
        return this;
    }

    /**
     * The number of streams, aggregated by provided filter parameters.
     *
     * @return free
     */
    public JsonNullable<Long> getFree() {
        return free;
    }

    public void setFree(JsonNullable<Long> free) {
        this.free = free;
    }

    public SpotifySaves premium(Long premium) {
        this.premium = JsonNullable.of(premium);
        return this;
    }

    /**
     * The number of streams, aggregated by provided filter parameters.
     *
     * @return premium
     */
    public JsonNullable<Long> getPremium() {
        return premium;
    }

    public void setPremium(JsonNullable<Long> premium) {
        this.premium = premium;
    }

    public SpotifySaves total(Long total) {
        this.total = JsonNullable.of(total);
        return this;
    }

    /**
     * The number of streams, aggregated by provided filter parameters.
     *
     * @return total
     */
    public JsonNullable<Long> getTotal() {
        return total;
    }

    public void setTotal(JsonNullable<Long> total) {
        this.total = total;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SpotifySaves spotifySaves = (SpotifySaves) o;
        return Objects.equals(this.free, spotifySaves.free) &&
            Objects.equals(this.premium, spotifySaves.premium) &&
            Objects.equals(this.total, spotifySaves.total);
    }

    @Override
    public int hashCode() {
        return Objects.hash(free, premium, total);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class SpotifySaves {\n");

        sb.append("    free: ").append(toIndentedString(free)).append("\n");
        sb.append("    premium: ").append(toIndentedString(premium)).append("\n");
        sb.append("    total: ").append(toIndentedString(total)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}

