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

import com.fasterxml.jackson.annotation.JsonProperty;

import org.openapitools.jackson.nullable.JsonNullable;

import java.math.BigDecimal;
import java.util.Objects;

public class AdMetricsVideo {

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

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

    @JsonProperty("video_watched_100")
    private JsonNullable<BigDecimal> videoWatched100 = JsonNullable.undefined();

    @JsonProperty("video_watched_25")
    private JsonNullable<BigDecimal> videoWatched25 = JsonNullable.undefined();

    @JsonProperty("video_watched_50")
    private JsonNullable<BigDecimal> videoWatched50 = JsonNullable.undefined();

    @JsonProperty("video_watched_75")
    private JsonNullable<BigDecimal> videoWatched75 = JsonNullable.undefined();

    @JsonProperty("tiktok_video_watched_2_s")
    private JsonNullable<BigDecimal> videoWatched2s = JsonNullable.undefined();

    @JsonProperty("tiktok_video_watched_6_s")
    private JsonNullable<BigDecimal> videoWatched6s = JsonNullable.undefined();

    @JsonProperty("tiktok_video_play_actions")
    private JsonNullable<BigDecimal> videoPlayActions = JsonNullable.undefined();

    @JsonProperty("video_completion_rate")
    private JsonNullable<BigDecimal> videoCompletionRate = JsonNullable.undefined();

    @JsonProperty("video_through_rate")
    private JsonNullable<BigDecimal> videoThroughRate = JsonNullable.undefined();

    public AdMetricsVideo thruplays(Long thruplays) {
        this.thruplays = JsonNullable.of(thruplays);
        return this;
    }


    public JsonNullable<Long> getThruplays() {
        return thruplays;
    }

    public void setThruplays(JsonNullable<Long> thruplays) {
        this.thruplays = thruplays;
    }

    public AdMetricsVideo videoViews(Long videoViews) {
        this.videoViews = JsonNullable.of(videoViews);
        return this;
    }


    public JsonNullable<Long> getVideoViews() {
        return videoViews;
    }

    public void setVideoViews(JsonNullable<Long> videoViews) {
        this.videoViews = videoViews;
    }

    public AdMetricsVideo videoWatched100(BigDecimal videoWatched100) {
        this.videoWatched100 = JsonNullable.of(videoWatched100);
        return this;
    }


    public JsonNullable<BigDecimal> getVideoWatched100() {
        return videoWatched100;
    }

    public void setVideoWatched100(JsonNullable<BigDecimal> videoWatched100) {
        this.videoWatched100 = videoWatched100;
    }

    public AdMetricsVideo videoWatched25(BigDecimal videoWatched25) {
        this.videoWatched25 = JsonNullable.of(videoWatched25);
        return this;
    }


    public JsonNullable<BigDecimal> getVideoWatched25() {
        return videoWatched25;
    }

    public void setVideoWatched25(JsonNullable<BigDecimal> videoWatched25) {
        this.videoWatched25 = videoWatched25;
    }

    public AdMetricsVideo videoWatched50(BigDecimal videoWatched50) {
        this.videoWatched50 = JsonNullable.of(videoWatched50);
        return this;
    }


    public JsonNullable<BigDecimal> getVideoWatched50() {
        return videoWatched50;
    }

    public void setVideoWatched50(JsonNullable<BigDecimal> videoWatched50) {
        this.videoWatched50 = videoWatched50;
    }

    public AdMetricsVideo videoWatched75(BigDecimal videoWatched75) {
        this.videoWatched75 = JsonNullable.of(videoWatched75);
        return this;
    }


    public JsonNullable<BigDecimal> getVideoWatched75() {
        return videoWatched75;
    }

    public void setVideoWatched75(JsonNullable<BigDecimal> videoWatched75) {
        this.videoWatched75 = videoWatched75;
    }

    public AdMetricsVideo videoWatched2s(BigDecimal videoWatched2s) {
        this.videoWatched2s = JsonNullable.of(videoWatched2s);
        return this;
    }

    public JsonNullable<BigDecimal> getVideoWatched2s() {
        return videoWatched2s;
    }

    public void setVideoWatched2s(JsonNullable<BigDecimal> videoWatched2s) {
        this.videoWatched2s = videoWatched2s;
    }

    public AdMetricsVideo videoWatched6s(BigDecimal videoWatched6s) {
        this.videoWatched6s = JsonNullable.of(videoWatched6s);
        return this;
    }

    public JsonNullable<BigDecimal> getVideoWatched6s() {
        return videoWatched6s;
    }

    public void setVideoWatched6s(JsonNullable<BigDecimal> videoWatched6s) {
        this.videoWatched6s = videoWatched6s;
    }

    public AdMetricsVideo videoPlayActions(BigDecimal videoPlayActions) {
        this.videoPlayActions = JsonNullable.of(videoPlayActions);
        return this;
    }

    public JsonNullable<BigDecimal> getVideoPlayActions() {
        return videoPlayActions;
    }

    public void setVideoPlayActions(JsonNullable<BigDecimal> videoPlayActions) {
        this.videoPlayActions = videoPlayActions;
    }

    public AdMetricsVideo videoCompletionRate(BigDecimal vcr) {
        this.videoCompletionRate = JsonNullable.of(vcr);
        return this;
    }

    public JsonNullable<BigDecimal> getVideoCompletionRate() {
        return videoCompletionRate;
    }

    public void setVideoCompletionRate(JsonNullable<BigDecimal> videoCompletionRate) {
        this.videoCompletionRate = videoCompletionRate;
    }

    public AdMetricsVideo videoThroughRate(BigDecimal vtr) {
        this.videoThroughRate = JsonNullable.of(vtr);
        return this;
    }

    public JsonNullable<BigDecimal> getVideoThroughRate() {
        return videoThroughRate;
    }

    public void setVideoThroughRate(JsonNullable<BigDecimal> videoThroughRate) {
        this.videoThroughRate = videoThroughRate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AdMetricsVideo adMetricsVideo = (AdMetricsVideo) o;
        return Objects.equals(this.thruplays, adMetricsVideo.thruplays) &&
            Objects.equals(this.videoViews, adMetricsVideo.videoViews) &&
            Objects.equals(this.videoWatched100, adMetricsVideo.videoWatched100) &&
            Objects.equals(this.videoWatched25, adMetricsVideo.videoWatched25) &&
            Objects.equals(this.videoWatched50, adMetricsVideo.videoWatched50) &&
            Objects.equals(this.videoWatched75, adMetricsVideo.videoWatched75) &&
            Objects.equals(this.videoCompletionRate, adMetricsVideo.videoCompletionRate) &&
            Objects.equals(this.videoThroughRate, adMetricsVideo.videoThroughRate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(thruplays, videoViews, videoWatched100, videoWatched25, videoWatched50, videoWatched75,
            videoCompletionRate, videoThroughRate);
    }

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

        sb.append("    thruplays: ").append(toIndentedString(thruplays)).append("\n");
        sb.append("    videoViews: ").append(toIndentedString(videoViews)).append("\n");
        sb.append("    videoWatched100: ").append(toIndentedString(videoWatched100)).append("\n");
        sb.append("    videoWatched25: ").append(toIndentedString(videoWatched25)).append("\n");
        sb.append("    videoWatched50: ").append(toIndentedString(videoWatched50)).append("\n");
        sb.append("    videoWatched75: ").append(toIndentedString(videoWatched75)).append("\n");
        sb.append("    videoCompletionRate: ").append(toIndentedString(videoCompletionRate)).append("\n");
        sb.append("    videoThroughRate: ").append(toIndentedString(videoThroughRate)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}

