// 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.core.management.ProxyResource;
import com.azure.resourcemanager.mediaservices.models.ProvisioningState;
import com.azure.resourcemanager.mediaservices.models.TrackBase;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An Asset Track resource. */
@Fluent
public final class AssetTrackInner extends ProxyResource {
    /*
     * The resource properties.
     */
    @JsonProperty(value = "properties")
    private AssetTrackProperties innerProperties;

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

    /**
     * Get the innerProperties property: The resource properties.
     *
     * @return the innerProperties value.
     */
    private AssetTrackProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the track property: Detailed information about a track in the asset.
     *
     * @return the track value.
     */
    public TrackBase track() {
        return this.innerProperties() == null ? null : this.innerProperties().track();
    }

    /**
     * Set the track property: Detailed information about a track in the asset.
     *
     * @param track the track value to set.
     * @return the AssetTrackInner object itself.
     */
    public AssetTrackInner withTrack(TrackBase track) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AssetTrackProperties();
        }
        this.innerProperties().withTrack(track);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the asset track.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

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