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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.imagebuilder.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Represents an output that was created by running an image template. */
@Fluent
public final class RunOutputInner extends ProxyResource {
    /*
     * The properties of the run output
     */
    @JsonProperty(value = "properties")
    private RunOutputProperties innerProperties;

    /*
     * Azure Resource Manager metadata containing createdBy and modifiedBy information.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: The properties of the run output.
     *
     * @return the innerProperties value.
     */
    private RunOutputProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the artifactId property: The resource id of the artifact.
     *
     * @return the artifactId value.
     */
    public String artifactId() {
        return this.innerProperties() == null ? null : this.innerProperties().artifactId();
    }

    /**
     * Set the artifactId property: The resource id of the artifact.
     *
     * @param artifactId the artifactId value to set.
     * @return the RunOutputInner object itself.
     */
    public RunOutputInner withArtifactId(String artifactId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RunOutputProperties();
        }
        this.innerProperties().withArtifactId(artifactId);
        return this;
    }

    /**
     * Get the artifactUri property: The location URI of the artifact.
     *
     * @return the artifactUri value.
     */
    public String artifactUri() {
        return this.innerProperties() == null ? null : this.innerProperties().artifactUri();
    }

    /**
     * Set the artifactUri property: The location URI of the artifact.
     *
     * @param artifactUri the artifactUri value to set.
     * @return the RunOutputInner object itself.
     */
    public RunOutputInner withArtifactUri(String artifactUri) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RunOutputProperties();
        }
        this.innerProperties().withArtifactUri(artifactUri);
        return this;
    }

    /**
     * Get the provisioningState property: Provisioning state of the resource.
     *
     * @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();
        }
    }
}
