// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.mediaservices.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.mediaservices.models.LiveEventTrackEventData;
import com.azure.resourcemanager.mediaservices.models.LiveEventTrackEventType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The live event track event. */
@Fluent
public final class LiveEventTrackEventInner {
    /*
     * The type of the track event.
     */
    @JsonProperty(value = "eventType")
    private LiveEventTrackEventType eventType;

    /*
     * The time event raised.
     */
    @JsonProperty(value = "eventTime")
    private OffsetDateTime eventTime;

    /*
     * Event data.
     */
    @JsonProperty(value = "data")
    private LiveEventTrackEventData data;

    /** Creates an instance of LiveEventTrackEventInner class. */
    public LiveEventTrackEventInner() {
    }

    /**
     * Get the eventType property: The type of the track event.
     *
     * @return the eventType value.
     */
    public LiveEventTrackEventType eventType() {
        return this.eventType;
    }

    /**
     * Set the eventType property: The type of the track event.
     *
     * @param eventType the eventType value to set.
     * @return the LiveEventTrackEventInner object itself.
     */
    public LiveEventTrackEventInner withEventType(LiveEventTrackEventType eventType) {
        this.eventType = eventType;
        return this;
    }

    /**
     * Get the eventTime property: The time event raised.
     *
     * @return the eventTime value.
     */
    public OffsetDateTime eventTime() {
        return this.eventTime;
    }

    /**
     * Set the eventTime property: The time event raised.
     *
     * @param eventTime the eventTime value to set.
     * @return the LiveEventTrackEventInner object itself.
     */
    public LiveEventTrackEventInner withEventTime(OffsetDateTime eventTime) {
        this.eventTime = eventTime;
        return this;
    }

    /**
     * Get the data property: Event data.
     *
     * @return the data value.
     */
    public LiveEventTrackEventData data() {
        return this.data;
    }

    /**
     * Set the data property: Event data.
     *
     * @param data the data value to set.
     * @return the LiveEventTrackEventInner object itself.
     */
    public LiveEventTrackEventInner withData(LiveEventTrackEventData data) {
        this.data = data;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (data() != null) {
            data().validate();
        }
    }
}
