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

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.util.Objects;

/**
 * AppleOs
 */
public class AppleOs {

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

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

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

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

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

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

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

    public AppleOs ios(Long ios) {
        this.ios = JsonNullable.of(ios);
        return this;
    }

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

    public void setIos(JsonNullable<Long> ios) {
        this.ios = ios;
    }

    public AppleOs mac(Long mac) {
        this.mac = JsonNullable.of(mac);
        return this;
    }

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

    public void setMac(JsonNullable<Long> mac) {
        this.mac = mac;
    }

    public AppleOs android(Long android) {
        this.android = JsonNullable.of(android);
        return this;
    }

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

    public void setAndroid(JsonNullable<Long> android) {
        this.android = android;
    }

    public AppleOs windows(Long windows) {
        this.windows = JsonNullable.of(windows);
        return this;
    }

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

    public void setWindows(JsonNullable<Long> windows) {
        this.windows = windows;
    }

    public AppleOs tvos(Long tvos) {
        this.tvos = JsonNullable.of(tvos);
        return this;
    }

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

    public void setTvos(JsonNullable<Long> tvos) {
        this.tvos = tvos;
    }

    public AppleOs sonos(Long sonos) {
        this.sonos = JsonNullable.of(sonos);
        return this;
    }

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

    public void setSonos(JsonNullable<Long> sonos) {
        this.sonos = sonos;
    }

    public AppleOs other(Long other) {
        this.other = JsonNullable.of(other);
        return this;
    }

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

    public void setOther(JsonNullable<Long> other) {
        this.other = other;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AppleOs appleOs = (AppleOs) o;
        return Objects.equals(this.ios, appleOs.ios) &&
            Objects.equals(this.mac, appleOs.mac) &&
            Objects.equals(this.android, appleOs.android) &&
            Objects.equals(this.windows, appleOs.windows) &&
            Objects.equals(this.tvos, appleOs.tvos) &&
            Objects.equals(this.sonos, appleOs.sonos) &&
            Objects.equals(this.other, appleOs.other);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ios, mac, android, windows, tvos, sonos, other);
    }

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

        sb.append("    ios: ").append(toIndentedString(ios)).append("\n");
        sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
        sb.append("    android: ").append(toIndentedString(android)).append("\n");
        sb.append("    windows: ").append(toIndentedString(windows)).append("\n");
        sb.append("    tvos: ").append(toIndentedString(tvos)).append("\n");
        sb.append("    sonos: ").append(toIndentedString(sonos)).append("\n");
        sb.append("    other: ").append(toIndentedString(other)).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    ");
    }
}

