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

package com.azure.resourcemanager.containerservicefleet.models;

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

/** The status for an operation or group of operations. */
@Immutable
public final class UpdateStatus {
    /*
     * The time the operation or group was started.
     */
    @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime startTime;

    /*
     * The time the operation or group was completed.
     */
    @JsonProperty(value = "completedTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime completedTime;

    /*
     * The State of the operation or group.
     */
    @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
    private UpdateState state;

    /*
     * The error details when a failure is encountered.
     */
    @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
    private ManagementError error;

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

    /**
     * Get the startTime property: The time the operation or group was started.
     *
     * @return the startTime value.
     */
    public OffsetDateTime startTime() {
        return this.startTime;
    }

    /**
     * Get the completedTime property: The time the operation or group was completed.
     *
     * @return the completedTime value.
     */
    public OffsetDateTime completedTime() {
        return this.completedTime;
    }

    /**
     * Get the state property: The State of the operation or group.
     *
     * @return the state value.
     */
    public UpdateState state() {
        return this.state;
    }

    /**
     * Get the error property: The error details when a failure is encountered.
     *
     * @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() {
    }
}
