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

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.util.Objects;

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

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

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

    @JsonProperty("engagement")
    private JsonNullable<AmazonEngagement> engagement = JsonNullable.undefined();

    @JsonProperty("operating_system")
    private JsonNullable<AmazonOperatingSystem> operatingSystem = JsonNullable.undefined();

    @JsonProperty("referral_source_type")
    private JsonNullable<AmazonReferralSourceType> referralSourceType = JsonNullable.undefined();

    @JsonProperty("selection_source_type")
    private JsonNullable<AmazonSelectionSourceType> selectionSourceType = JsonNullable.undefined();

    @JsonProperty("subscription_type")
    private JsonNullable<AmazonSubscriptionType> subscriptionType = JsonNullable.undefined();

    public AmazonStreamsInfo 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 AmazonStreamsInfo deviceType(AmazonDeviceType deviceType) {
        this.deviceType = JsonNullable.of(deviceType);
        return this;
    }

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

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

    public AmazonStreamsInfo engagement(AmazonEngagement engagement) {
        this.engagement = JsonNullable.of(engagement);
        return this;
    }

    /**
     * Get engagement
     *
     * @return engagement
     */
    public JsonNullable<AmazonEngagement> getEngagement() {
        return engagement;
    }

    public void setEngagement(JsonNullable<AmazonEngagement> engagement) {
        this.engagement = engagement;
    }

    public AmazonStreamsInfo operatingSystem(AmazonOperatingSystem operatingSystem) {
        this.operatingSystem = JsonNullable.of(operatingSystem);
        return this;
    }

    /**
     * Get operatingSystem
     *
     * @return operatingSystem
     */
    public JsonNullable<AmazonOperatingSystem> getOperatingSystem() {
        return operatingSystem;
    }

    public void setOperatingSystem(JsonNullable<AmazonOperatingSystem> operatingSystem) {
        this.operatingSystem = operatingSystem;
    }

    public AmazonStreamsInfo referralSourceType(AmazonReferralSourceType referralSourceType) {
        this.referralSourceType = JsonNullable.of(referralSourceType);
        return this;
    }

    /**
     * Get referralSourceType
     *
     * @return referralSourceType
     */
    public JsonNullable<AmazonReferralSourceType> getReferralSourceType() {
        return referralSourceType;
    }

    public void setReferralSourceType(JsonNullable<AmazonReferralSourceType> referralSourceType) {
        this.referralSourceType = referralSourceType;
    }

    public AmazonStreamsInfo selectionSourceType(AmazonSelectionSourceType selectionSourceType) {
        this.selectionSourceType = JsonNullable.of(selectionSourceType);
        return this;
    }

    /**
     * Get selectionSourceType
     *
     * @return selectionSourceType
     */
    public JsonNullable<AmazonSelectionSourceType> getSelectionSourceType() {
        return selectionSourceType;
    }

    public void setSelectionSourceType(JsonNullable<AmazonSelectionSourceType> selectionSourceType) {
        this.selectionSourceType = selectionSourceType;
    }

    public AmazonStreamsInfo subscriptionType(AmazonSubscriptionType subscriptionType) {
        this.subscriptionType = JsonNullable.of(subscriptionType);
        return this;
    }

    /**
     * Get subscriptionType
     *
     * @return subscriptionType
     */
    public JsonNullable<AmazonSubscriptionType> getSubscriptionType() {
        return subscriptionType;
    }

    public void setSubscriptionType(JsonNullable<AmazonSubscriptionType> subscriptionType) {
        this.subscriptionType = subscriptionType;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AmazonStreamsInfo amazonStreamsInfo = (AmazonStreamsInfo) o;
        return Objects.equals(this.nonRoyaltyStreams, amazonStreamsInfo.nonRoyaltyStreams) &&
            Objects.equals(this.deviceType, amazonStreamsInfo.deviceType) &&
            Objects.equals(this.engagement, amazonStreamsInfo.engagement) &&
            Objects.equals(this.operatingSystem, amazonStreamsInfo.operatingSystem) &&
            Objects.equals(this.referralSourceType, amazonStreamsInfo.referralSourceType) &&
            Objects.equals(this.selectionSourceType, amazonStreamsInfo.selectionSourceType) &&
            Objects.equals(this.subscriptionType, amazonStreamsInfo.subscriptionType);
    }

    @Override
    public int hashCode() {
        return Objects
            .hash(nonRoyaltyStreams, deviceType, engagement, operatingSystem, referralSourceType, selectionSourceType,
                subscriptionType);
    }

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

        sb.append("    nonRoyaltyStreams: ").append(toIndentedString(nonRoyaltyStreams)).append("\n");
        sb.append("    deviceType: ").append(toIndentedString(deviceType)).append("\n");
        sb.append("    engagement: ").append(toIndentedString(engagement)).append("\n");
        sb.append("    operatingSystem: ").append(toIndentedString(operatingSystem)).append("\n");
        sb.append("    referralSourceType: ").append(toIndentedString(referralSourceType)).append("\n");
        sb.append("    selectionSourceType: ").append(toIndentedString(selectionSourceType)).append("\n");
        sb.append("    subscriptionType: ").append(toIndentedString(subscriptionType)).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    ");
    }
}

