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

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.util.Objects;

/**
 * Detailed info about Apple streams: requires include&#x3D;all to be included
 */
public class AppleStreamsInfo {

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

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

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

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

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

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

    @JsonProperty("source")
    private JsonNullable<AppleSource> source = JsonNullable.undefined();

    @JsonProperty("container_type")
    private JsonNullable<AppleContainerType> containerType = JsonNullable.undefined();

    @JsonProperty("container_sub_type")
    private JsonNullable<AppleContainerSubType> containerSubType = JsonNullable.undefined();

    @JsonProperty("device_type")
    private JsonNullable<AppleDeviceType> deviceType = JsonNullable.undefined();

    @JsonProperty("os")
    private JsonNullable<AppleOs> os = JsonNullable.undefined();

    @JsonProperty("user_type")
    private JsonNullable<AppleUserType> userType = JsonNullable.undefined();

    @JsonProperty("listener_engagement")
    private JsonNullable<AppleListenerEngagement> listenerEngagement = JsonNullable.undefined();

    public AppleStreamsInfo offlinePlay(Long offlinePlay) {
        this.offlinePlay = JsonNullable.of(offlinePlay);
        return this;
    }

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

    public void setOfflinePlay(JsonNullable<Long> offlinePlay) {
        this.offlinePlay = offlinePlay;
    }

    public AppleStreamsInfo completionPlay(Long completionPlay) {
        this.completionPlay = JsonNullable.of(completionPlay);
        return this;
    }

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

    public void setCompletionPlay(JsonNullable<Long> completionPlay) {
        this.completionPlay = completionPlay;
    }

    public AppleStreamsInfo skips(Long skips) {
        this.skips = JsonNullable.of(skips);
        return this;
    }

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

    public void setSkips(JsonNullable<Long> skips) {
        this.skips = skips;
    }

    public AppleStreamsInfo streams(Long streams) {
        this.streams = JsonNullable.of(streams);
        return this;
    }

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

    public void setStreams(JsonNullable<Long> streams) {
        this.streams = streams;
    }

    public AppleStreamsInfo nonRoyaltyStreams(Long nonRoyaltyStreams) {
        this.nonRoyaltyStreams = JsonNullable.of(nonRoyaltyStreams);
        return this;
    }

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

    public void setNonRoyaltyStreams(JsonNullable<Long> nonRoyaltyStreams) {
        this.nonRoyaltyStreams = nonRoyaltyStreams;
    }

    public AppleStreamsInfo listeners(Long listeners) {
        this.listeners = JsonNullable.of(listeners);
        return this;
    }

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

    public void setListeners(JsonNullable<Long> listeners) {
        this.listeners = listeners;
    }

    public AppleStreamsInfo source(AppleSource source) {
        this.source = JsonNullable.of(source);
        return this;
    }

    /**
     * Get source
     *
     * @return source
     */
    public JsonNullable<AppleSource> getSource() {
        return source;
    }

    public void setSource(JsonNullable<AppleSource> source) {
        this.source = source;
    }

    public AppleStreamsInfo containerType(AppleContainerType containerType) {
        this.containerType = JsonNullable.of(containerType);
        return this;
    }

    /**
     * Get containerType
     *
     * @return containerType
     */
    public JsonNullable<AppleContainerType> getContainerType() {
        return containerType;
    }

    public void setContainerType(JsonNullable<AppleContainerType> containerType) {
        this.containerType = containerType;
    }

    public AppleStreamsInfo containerSubType(AppleContainerSubType containerSubType) {
        this.containerSubType = JsonNullable.of(containerSubType);
        return this;
    }

    /**
     * Get containerSubType
     *
     * @return containerSubType
     */
    public JsonNullable<AppleContainerSubType> getContainerSubType() {
        return containerSubType;
    }

    public void setContainerSubType(JsonNullable<AppleContainerSubType> containerSubType) {
        this.containerSubType = containerSubType;
    }

    public AppleStreamsInfo deviceType(AppleDeviceType deviceType) {
        this.deviceType = JsonNullable.of(deviceType);
        return this;
    }

    /**
     * Get deviceType
     *
     * @return deviceType
     */
    public JsonNullable<AppleDeviceType> getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(JsonNullable<AppleDeviceType> deviceType) {
        this.deviceType = deviceType;
    }

    public AppleStreamsInfo os(AppleOs os) {
        this.os = JsonNullable.of(os);
        return this;
    }

    /**
     * Get os
     *
     * @return os
     */
    public JsonNullable<AppleOs> getOs() {
        return os;
    }

    public void setOs(JsonNullable<AppleOs> os) {
        this.os = os;
    }

    public AppleStreamsInfo userType(AppleUserType userType) {
        this.userType = JsonNullable.of(userType);
        return this;
    }

    /**
     * Get userType
     *
     * @return userType
     */
    public JsonNullable<AppleUserType> getUserType() {
        return userType;
    }

    public void setUserType(JsonNullable<AppleUserType> userType) {
        this.userType = userType;
    }

    public AppleStreamsInfo listenerEngagement(AppleListenerEngagement listenerEngagement) {
        this.listenerEngagement = JsonNullable.of(listenerEngagement);
        return this;
    }

    /**
     * Get listenerEngagement
     *
     * @return listenerEngagement
     */
    public JsonNullable<AppleListenerEngagement> getListenerEngagement() {
        return listenerEngagement;
    }

    public void setListenerEngagement(JsonNullable<AppleListenerEngagement> listenerEngagement) {
        this.listenerEngagement = listenerEngagement;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AppleStreamsInfo appleStreamsInfo = (AppleStreamsInfo) o;
        return Objects.equals(this.offlinePlay, appleStreamsInfo.offlinePlay) &&
            Objects.equals(this.completionPlay, appleStreamsInfo.completionPlay) &&
            Objects.equals(this.skips, appleStreamsInfo.skips) &&
            Objects.equals(this.streams, appleStreamsInfo.streams) &&
            Objects.equals(this.nonRoyaltyStreams, appleStreamsInfo.nonRoyaltyStreams) &&
            Objects.equals(this.listeners, appleStreamsInfo.listeners) &&
            Objects.equals(this.source, appleStreamsInfo.source) &&
            Objects.equals(this.containerType, appleStreamsInfo.containerType) &&
            Objects.equals(this.containerSubType, appleStreamsInfo.containerSubType) &&
            Objects.equals(this.deviceType, appleStreamsInfo.deviceType) &&
            Objects.equals(this.os, appleStreamsInfo.os) &&
            Objects.equals(this.userType, appleStreamsInfo.userType) &&
            Objects.equals(this.listenerEngagement, appleStreamsInfo.listenerEngagement);
    }

    @Override
    public int hashCode() {
        return Objects
            .hash(offlinePlay, completionPlay, skips, streams, nonRoyaltyStreams, listeners, source, containerType,
                containerSubType, deviceType, os, userType, listenerEngagement);
    }

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

        sb.append("    offlinePlay: ").append(toIndentedString(offlinePlay)).append("\n");
        sb.append("    completionPlay: ").append(toIndentedString(completionPlay)).append("\n");
        sb.append("    skips: ").append(toIndentedString(skips)).append("\n");
        sb.append("    streams: ").append(toIndentedString(streams)).append("\n");
        sb.append("    nonRoyaltyStreams: ").append(toIndentedString(nonRoyaltyStreams)).append("\n");
        sb.append("    listeners: ").append(toIndentedString(listeners)).append("\n");
        sb.append("    source: ").append(toIndentedString(source)).append("\n");
        sb.append("    containerType: ").append(toIndentedString(containerType)).append("\n");
        sb.append("    containerSubType: ").append(toIndentedString(containerSubType)).append("\n");
        sb.append("    deviceType: ").append(toIndentedString(deviceType)).append("\n");
        sb.append("    os: ").append(toIndentedString(os)).append("\n");
        sb.append("    userType: ").append(toIndentedString(userType)).append("\n");
        sb.append("    listenerEngagement: ").append(toIndentedString(listenerEngagement)).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    ");
    }
}

