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

package com.azure.resourcemanager.resourcemover.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Defines the move resource status. */
@Fluent
public class MoveResourceStatus {
    /*
     * Defines the MoveResource states.
     */
    @JsonProperty(value = "moveState", access = JsonProperty.Access.WRITE_ONLY)
    private MoveState moveState;

    /*
     * Defines the job status.
     */
    @JsonProperty(value = "jobStatus")
    private JobStatus jobStatus;

    /*
     * An error response from the azure resource mover service.
     */
    @JsonProperty(value = "errors")
    private MoveResourceError errors;

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

    /**
     * Get the moveState property: Defines the MoveResource states.
     *
     * @return the moveState value.
     */
    public MoveState moveState() {
        return this.moveState;
    }

    /**
     * Get the jobStatus property: Defines the job status.
     *
     * @return the jobStatus value.
     */
    public JobStatus jobStatus() {
        return this.jobStatus;
    }

    /**
     * Set the jobStatus property: Defines the job status.
     *
     * @param jobStatus the jobStatus value to set.
     * @return the MoveResourceStatus object itself.
     */
    public MoveResourceStatus withJobStatus(JobStatus jobStatus) {
        this.jobStatus = jobStatus;
        return this;
    }

    /**
     * Get the errors property: An error response from the azure resource mover service.
     *
     * @return the errors value.
     */
    public MoveResourceError errors() {
        return this.errors;
    }

    /**
     * Set the errors property: An error response from the azure resource mover service.
     *
     * @param errors the errors value to set.
     * @return the MoveResourceStatus object itself.
     */
    public MoveResourceStatus withErrors(MoveResourceError errors) {
        this.errors = errors;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (jobStatus() != null) {
            jobStatus().validate();
        }
        if (errors() != null) {
            errors().validate();
        }
    }
}
