// 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.core.management.SystemData;
import com.azure.resourcemanager.mediaservices.models.TransformOutput;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;

/**
 * A Transform encapsulates the rules or instructions for generating desired outputs from input media, such as by
 * transcoding or by extracting insights. After the Transform is created, it can be applied to input media by creating
 * Jobs.
 */
@Fluent
public final class TransformInner extends ProxyResource {
    /*
     * The resource properties.
     */
    @JsonProperty(value = "properties")
    private TransformProperties innerProperties;

    /*
     * The system metadata relating to this resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

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

    /**
     * Get the systemData property: The system metadata relating to this resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the created property: The UTC date and time when the Transform was created, in 'YYYY-MM-DDThh:mm:ssZ' format.
     *
     * @return the created value.
     */
    public OffsetDateTime created() {
        return this.innerProperties() == null ? null : this.innerProperties().created();
    }

    /**
     * Get the description property: An optional verbose description of the Transform.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: An optional verbose description of the Transform.
     *
     * @param description the description value to set.
     * @return the TransformInner object itself.
     */
    public TransformInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new TransformProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the lastModified property: The UTC date and time when the Transform was last updated, in
     * 'YYYY-MM-DDThh:mm:ssZ' format.
     *
     * @return the lastModified value.
     */
    public OffsetDateTime lastModified() {
        return this.innerProperties() == null ? null : this.innerProperties().lastModified();
    }

    /**
     * Get the outputs property: An array of one or more TransformOutputs that the Transform should generate.
     *
     * @return the outputs value.
     */
    public List<TransformOutput> outputs() {
        return this.innerProperties() == null ? null : this.innerProperties().outputs();
    }

    /**
     * Set the outputs property: An array of one or more TransformOutputs that the Transform should generate.
     *
     * @param outputs the outputs value to set.
     * @return the TransformInner object itself.
     */
    public TransformInner withOutputs(List<TransformOutput> outputs) {
        if (this.innerProperties() == null) {
            this.innerProperties = new TransformProperties();
        }
        this.innerProperties().withOutputs(outputs);
        return this;
    }

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