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

package com.azure.resourcemanager.machinelearning.models;

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

/** The last operation on ComputeInstance. */
@Fluent
public final class ComputeInstanceLastOperation {
    /*
     * Name of the last operation.
     */
    @JsonProperty(value = "operationName")
    private OperationName operationName;

    /*
     * Time of the last operation.
     */
    @JsonProperty(value = "operationTime")
    private OffsetDateTime operationTime;

    /*
     * Operation status.
     */
    @JsonProperty(value = "operationStatus")
    private OperationStatus operationStatus;

    /*
     * Trigger of operation.
     */
    @JsonProperty(value = "operationTrigger")
    private OperationTrigger operationTrigger;

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

    /**
     * Get the operationName property: Name of the last operation.
     *
     * @return the operationName value.
     */
    public OperationName operationName() {
        return this.operationName;
    }

    /**
     * Set the operationName property: Name of the last operation.
     *
     * @param operationName the operationName value to set.
     * @return the ComputeInstanceLastOperation object itself.
     */
    public ComputeInstanceLastOperation withOperationName(OperationName operationName) {
        this.operationName = operationName;
        return this;
    }

    /**
     * Get the operationTime property: Time of the last operation.
     *
     * @return the operationTime value.
     */
    public OffsetDateTime operationTime() {
        return this.operationTime;
    }

    /**
     * Set the operationTime property: Time of the last operation.
     *
     * @param operationTime the operationTime value to set.
     * @return the ComputeInstanceLastOperation object itself.
     */
    public ComputeInstanceLastOperation withOperationTime(OffsetDateTime operationTime) {
        this.operationTime = operationTime;
        return this;
    }

    /**
     * Get the operationStatus property: Operation status.
     *
     * @return the operationStatus value.
     */
    public OperationStatus operationStatus() {
        return this.operationStatus;
    }

    /**
     * Set the operationStatus property: Operation status.
     *
     * @param operationStatus the operationStatus value to set.
     * @return the ComputeInstanceLastOperation object itself.
     */
    public ComputeInstanceLastOperation withOperationStatus(OperationStatus operationStatus) {
        this.operationStatus = operationStatus;
        return this;
    }

    /**
     * Get the operationTrigger property: Trigger of operation.
     *
     * @return the operationTrigger value.
     */
    public OperationTrigger operationTrigger() {
        return this.operationTrigger;
    }

    /**
     * Set the operationTrigger property: Trigger of operation.
     *
     * @param operationTrigger the operationTrigger value to set.
     * @return the ComputeInstanceLastOperation object itself.
     */
    public ComputeInstanceLastOperation withOperationTrigger(OperationTrigger operationTrigger) {
        this.operationTrigger = operationTrigger;
        return this;
    }

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