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

package com.azure.resourcemanager.deploymentmanager.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.exception.ManagementError;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Detailed information of a specific step run. */
@Fluent
public final class StepOperationInfo {
    /*
     * The name of the ARM deployment initiated as part of the step.
     */
    @JsonProperty(value = "deploymentName", access = JsonProperty.Access.WRITE_ONLY)
    private String deploymentName;

    /*
     * Unique identifier to track the request for ARM-based resources.
     */
    @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY)
    private String correlationId;

    /*
     * Start time of the action in UTC.
     */
    @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime startTime;

    /*
     * End time of the action in UTC.
     */
    @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime endTime;

    /*
     * Last time in UTC this operation was updated.
     */
    @JsonProperty(value = "lastUpdatedTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastUpdatedTime;

    /*
     * The errors, if any, for the action.
     */
    @JsonProperty(value = "error")
    private ManagementError error;

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

    /**
     * Get the deploymentName property: The name of the ARM deployment initiated as part of the step.
     *
     * @return the deploymentName value.
     */
    public String deploymentName() {
        return this.deploymentName;
    }

    /**
     * Get the correlationId property: Unique identifier to track the request for ARM-based resources.
     *
     * @return the correlationId value.
     */
    public String correlationId() {
        return this.correlationId;
    }

    /**
     * Get the startTime property: Start time of the action in UTC.
     *
     * @return the startTime value.
     */
    public OffsetDateTime startTime() {
        return this.startTime;
    }

    /**
     * Get the endTime property: End time of the action in UTC.
     *
     * @return the endTime value.
     */
    public OffsetDateTime endTime() {
        return this.endTime;
    }

    /**
     * Get the lastUpdatedTime property: Last time in UTC this operation was updated.
     *
     * @return the lastUpdatedTime value.
     */
    public OffsetDateTime lastUpdatedTime() {
        return this.lastUpdatedTime;
    }

    /**
     * Get the error property: The errors, if any, for the action.
     *
     * @return the error value.
     */
    public ManagementError error() {
        return this.error;
    }

    /**
     * Set the error property: The errors, if any, for the action.
     *
     * @param error the error value to set.
     * @return the StepOperationInfo object itself.
     */
    public StepOperationInfo withError(ManagementError error) {
        this.error = error;
        return this;
    }

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