// 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.Immutable;
import com.azure.core.management.exception.ManagementError;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Detailed runtime information of the rollout. */
@Immutable
public final class RolloutOperationInfo {
    /*
     * The ordinal count of the number of retry attempts on a rollout. 0 if no retries of the rollout have been
     * performed. If the rollout is updated with a PUT, this count is reset to 0.
     */
    @JsonProperty(value = "retryAttempt", access = JsonProperty.Access.WRITE_ONLY)
    private Integer retryAttempt;

    /*
     * True, if all steps that succeeded on the previous run/attempt were chosen to be skipped in this retry attempt.
     * False, otherwise.
     */
    @JsonProperty(value = "skipSucceededOnRetry", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean skipSucceededOnRetry;

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

    /*
     * The start time of the rollout in UTC. This property will not be set if the rollout has not completed yet.
     */
    @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime endTime;

    /*
     * The detailed error information for any failure.
     */
    @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
    private ManagementError error;

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

    /**
     * Get the retryAttempt property: The ordinal count of the number of retry attempts on a rollout. 0 if no retries of
     * the rollout have been performed. If the rollout is updated with a PUT, this count is reset to 0.
     *
     * @return the retryAttempt value.
     */
    public Integer retryAttempt() {
        return this.retryAttempt;
    }

    /**
     * Get the skipSucceededOnRetry property: True, if all steps that succeeded on the previous run/attempt were chosen
     * to be skipped in this retry attempt. False, otherwise.
     *
     * @return the skipSucceededOnRetry value.
     */
    public Boolean skipSucceededOnRetry() {
        return this.skipSucceededOnRetry;
    }

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

    /**
     * Get the endTime property: The start time of the rollout in UTC. This property will not be set if the rollout has
     * not completed yet.
     *
     * @return the endTime value.
     */
    public OffsetDateTime endTime() {
        return this.endTime;
    }

    /**
     * Get the error property: The detailed error information for any failure.
     *
     * @return the error value.
     */
    public ManagementError error() {
        return this.error;
    }

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