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

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import org.openapitools.jackson.nullable.JsonNullable;

import java.time.LocalDate;
import java.util.Objects;


/**
 * YouTubeDimensions
 */
@JsonPropertyOrder(alphabetic = true)
public class YouTubeDimensions {

    @JsonProperty("date")
    private JsonNullable<LocalDate> date = JsonNullable.undefined();

    @JsonProperty("channel_id")
    private JsonNullable<String> channelId = JsonNullable.undefined();

    @JsonProperty("content_type")
    private JsonNullable<YoutubeContentType> contentType = JsonNullable.undefined();

    @JsonProperty("country_code")
    private JsonNullable<String> countryCode = JsonNullable.undefined();

    @JsonProperty("dsp_video_id")
    private JsonNullable<String> dspVideoId = JsonNullable.undefined();

    @JsonProperty("isrc")
    private JsonNullable<String> isrc = JsonNullable.undefined();

    @JsonProperty("video_id")
    private String videoId;

    @JsonProperty("project_number")
    private JsonNullable<String> projectNumber = JsonNullable.undefined();

    @JsonProperty("product_family_id")
    private JsonNullable<String> productFamilyId = JsonNullable.undefined();

    public YouTubeDimensions date(LocalDate date) {
        this.date = JsonNullable.of(date);
        return this;
    }

    /**
     * [ISO 8601 date](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) in format `YYYY-MM-DD`
     *
     * @return date
     */
    public JsonNullable<LocalDate> getDate() {
        return date;
    }

    public void setDate(JsonNullable<LocalDate> date) {
        this.date = date;
    }

    /**
     * Get dsp
     *
     * @return dsp
     */
    public JsonNullable<VideoDspSlug> getDsp() {
        return JsonNullable.of(VideoDspSlug.YOUTUBE);
    }

    public YouTubeDimensions channelId(String channelId) {
        this.channelId = JsonNullable.of(channelId);
        return this;
    }

    /**
     * The ID for a YouTube channel. In the YouTube Data API, this is the value of a `channel` resource's id property.
     *
     * @return channelId
     */
    public JsonNullable<String> getChannelId() {
        return channelId;
    }

    public void setChannelId(JsonNullable<String> channelId) {
        this.channelId = channelId;
    }

    public YouTubeDimensions contentType(YoutubeContentType contentType) {
        this.contentType = JsonNullable.of(contentType);
        return this;
    }

    /**
     * Get contentType
     *
     * @return contentType
     */
    public JsonNullable<YoutubeContentType> getContentType() {
        return contentType;
    }

    public void setContentType(JsonNullable<YoutubeContentType> contentType) {
        this.contentType = contentType;
    }

    public YouTubeDimensions countryCode(String countryCode) {
        this.countryCode = JsonNullable.of(countryCode);
        return this;
    }

    /**
     * Typically a lower-case two letter code for the country
     *
     * @return countryCode
     */
    public JsonNullable<String> getCountryCode() {
        return countryCode;
    }

    public void setCountryCode(JsonNullable<String> countryCode) {
        this.countryCode = countryCode;
    }

    public YouTubeDimensions dspVideoId(String dspVideoId) {
        this.dspVideoId = JsonNullable.of(dspVideoId);
        return this;
    }

    /**
     * The ID of a YouTube video. In the YouTube Data API, this is the value of a `video` resource's id property.
     *
     * @return dspVideoId
     */
    public JsonNullable<String> getDspVideoId() {
        return dspVideoId;
    }

    public void setDspVideoId(JsonNullable<String> dspVideoId) {
        this.dspVideoId = dspVideoId;
    }

    public YouTubeDimensions isrc(String isrc) {
        this.isrc = JsonNullable.of(isrc);
        return this;
    }

    /**
     * The International Standard Recording Code (ISRC) for a song.
     *
     * @return isrc
     */
    public JsonNullable<String> getIsrc() {
        return isrc;
    }

    public void setIsrc(JsonNullable<String> isrc) {
        this.isrc = isrc;
    }

    public YouTubeDimensions videoId(String videoId) {
        this.videoId = videoId;
        return this;
    }

    /**
     * Primary key identifier for a Video
     *
     * @return videoId
     */
    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public YouTubeDimensions projectNumber(String projectNumber) {
        this.projectNumber = JsonNullable.of(projectNumber);
        return this;
    }

    public JsonNullable<String> getProjectNumber() {
        return projectNumber;
    }

    public void setProjectNumber(JsonNullable<String> projectNumber) {
        this.projectNumber = projectNumber;
    }
    public JsonNullable<String> getProductFamilyId() {
        return productFamilyId;
    }

    public YouTubeDimensions productFamilyId(String productFamilyId) {
        this.productFamilyId = JsonNullable.of(productFamilyId);
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        YouTubeDimensions youTubeDimensions = (YouTubeDimensions) o;
        return Objects.equals(this.date, youTubeDimensions.date) &&
            Objects.equals(this.channelId, youTubeDimensions.channelId) &&
            Objects.equals(this.contentType, youTubeDimensions.contentType) &&
            Objects.equals(this.countryCode, youTubeDimensions.countryCode) &&
            Objects.equals(this.dspVideoId, youTubeDimensions.dspVideoId) &&
            Objects.equals(this.isrc, youTubeDimensions.isrc) &&
            Objects.equals(this.videoId, youTubeDimensions.videoId) &&
            Objects.equals(this.productFamilyId, youTubeDimensions.productFamilyId) &&
            Objects.equals(this.projectNumber, youTubeDimensions.projectNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(date, channelId, contentType, countryCode, dspVideoId, isrc, videoId,
            productFamilyId, projectNumber);
    }

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

        sb.append("    date: ").append(toIndentedString(date)).append("\n");
        sb.append("    channelId: ").append(toIndentedString(channelId)).append("\n");
        sb.append("    contentType: ").append(toIndentedString(contentType)).append("\n");
        sb.append("    countryCode: ").append(toIndentedString(countryCode)).append("\n");
        sb.append("    dspVideoId: ").append(toIndentedString(dspVideoId)).append("\n");
        sb.append("    isrc: ").append(toIndentedString(isrc)).append("\n");
        sb.append("    videoId: ").append(toIndentedString(videoId)).append("\n");
        sb.append("    projectNumber: ").append(toIndentedString(projectNumber)).append("\n");
        sb.append("    productFamilyId: ").append(toIndentedString(productFamilyId)).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    ");
    }
}

