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

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.util.Objects;

/**
 * AppleSource
 */
public class AppleSource {

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

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

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

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

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

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

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

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

    public AppleSource library(Long library) {
        this.library = JsonNullable.of(library);
        return this;
    }

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

    public void setLibrary(JsonNullable<Long> library) {
        this.library = library;
    }

    public AppleSource search(Long search) {
        this.search = JsonNullable.of(search);
        return this;
    }

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

    public void setSearch(JsonNullable<Long> search) {
        this.search = search;
    }

    public AppleSource discovery(Long discovery) {
        this.discovery = JsonNullable.of(discovery);
        return this;
    }

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

    public void setDiscovery(JsonNullable<Long> discovery) {
        this.discovery = discovery;
    }

    public AppleSource musicKit(Long musicKit) {
        this.musicKit = JsonNullable.of(musicKit);
        return this;
    }

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

    public void setMusicKit(JsonNullable<Long> musicKit) {
        this.musicKit = musicKit;
    }

    public AppleSource external(Long external) {
        this.external = JsonNullable.of(external);
        return this;
    }

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

    public void setExternal(JsonNullable<Long> external) {
        this.external = external;
    }

    public AppleSource nowPlaying(Long nowPlaying) {
        this.nowPlaying = JsonNullable.of(nowPlaying);
        return this;
    }

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

    public void setNowPlaying(JsonNullable<Long> nowPlaying) {
        this.nowPlaying = nowPlaying;
    }

    public AppleSource voice(Long voice) {
        this.voice = JsonNullable.of(voice);
        return this;
    }

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

    public void setVoice(JsonNullable<Long> voice) {
        this.voice = voice;
    }

    public AppleSource 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;
        }
        AppleSource appleSource = (AppleSource) o;
        return Objects.equals(this.library, appleSource.library) &&
            Objects.equals(this.search, appleSource.search) &&
            Objects.equals(this.discovery, appleSource.discovery) &&
            Objects.equals(this.musicKit, appleSource.musicKit) &&
            Objects.equals(this.external, appleSource.external) &&
            Objects.equals(this.nowPlaying, appleSource.nowPlaying) &&
            Objects.equals(this.voice, appleSource.voice) &&
            Objects.equals(this.other, appleSource.other);
    }

    @Override
    public int hashCode() {
        return Objects.hash(library, search, discovery, musicKit, external, nowPlaying, voice, other);
    }

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

        sb.append("    library: ").append(toIndentedString(library)).append("\n");
        sb.append("    search: ").append(toIndentedString(search)).append("\n");
        sb.append("    discovery: ").append(toIndentedString(discovery)).append("\n");
        sb.append("    musicKit: ").append(toIndentedString(musicKit)).append("\n");
        sb.append("    external: ").append(toIndentedString(external)).append("\n");
        sb.append("    nowPlaying: ").append(toIndentedString(nowPlaying)).append("\n");
        sb.append("    voice: ").append(toIndentedString(voice)).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    ");
    }
}

