// 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.models;

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

/** Describes the latest status of running an image template. */
@Fluent
public final class ImageTemplateLastRunStatus {
    /*
     * Start time of the last run (UTC)
     */
    @JsonProperty(value = "startTime")
    private OffsetDateTime startTime;

    /*
     * End time of the last run (UTC)
     */
    @JsonProperty(value = "endTime")
    private OffsetDateTime endTime;

    /*
     * State of the last run
     */
    @JsonProperty(value = "runState")
    private RunState runState;

    /*
     * Sub-state of the last run
     */
    @JsonProperty(value = "runSubState")
    private RunSubState runSubState;

    /*
     * Verbose information about the last run state
     */
    @JsonProperty(value = "message")
    private String message;

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

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

    /**
     * Set the startTime property: Start time of the last run (UTC).
     *
     * @param startTime the startTime value to set.
     * @return the ImageTemplateLastRunStatus object itself.
     */
    public ImageTemplateLastRunStatus withStartTime(OffsetDateTime startTime) {
        this.startTime = startTime;
        return this;
    }

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

    /**
     * Set the endTime property: End time of the last run (UTC).
     *
     * @param endTime the endTime value to set.
     * @return the ImageTemplateLastRunStatus object itself.
     */
    public ImageTemplateLastRunStatus withEndTime(OffsetDateTime endTime) {
        this.endTime = endTime;
        return this;
    }

    /**
     * Get the runState property: State of the last run.
     *
     * @return the runState value.
     */
    public RunState runState() {
        return this.runState;
    }

    /**
     * Set the runState property: State of the last run.
     *
     * @param runState the runState value to set.
     * @return the ImageTemplateLastRunStatus object itself.
     */
    public ImageTemplateLastRunStatus withRunState(RunState runState) {
        this.runState = runState;
        return this;
    }

    /**
     * Get the runSubState property: Sub-state of the last run.
     *
     * @return the runSubState value.
     */
    public RunSubState runSubState() {
        return this.runSubState;
    }

    /**
     * Set the runSubState property: Sub-state of the last run.
     *
     * @param runSubState the runSubState value to set.
     * @return the ImageTemplateLastRunStatus object itself.
     */
    public ImageTemplateLastRunStatus withRunSubState(RunSubState runSubState) {
        this.runSubState = runSubState;
        return this;
    }

    /**
     * Get the message property: Verbose information about the last run state.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: Verbose information about the last run state.
     *
     * @param message the message value to set.
     * @return the ImageTemplateLastRunStatus object itself.
     */
    public ImageTemplateLastRunStatus withMessage(String message) {
        this.message = message;
        return this;
    }

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