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

package com.azure.resourcemanager.reservations.models;

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

/** Change directory result for reservation order or reservation. */
@Fluent
public final class ChangeDirectoryResult {
    /*
     * Identifier of the reservation order or reservation
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * Name of the reservation order or reservation
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * True if change directory operation succeeded on this reservation order or reservation
     */
    @JsonProperty(value = "isSucceeded")
    private Boolean isSucceeded;

    /*
     * Error reason if operation failed. Null otherwise
     */
    @JsonProperty(value = "error")
    private String error;

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

    /**
     * Get the id property: Identifier of the reservation order or reservation.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: Identifier of the reservation order or reservation.
     *
     * @param id the id value to set.
     * @return the ChangeDirectoryResult object itself.
     */
    public ChangeDirectoryResult withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the name property: Name of the reservation order or reservation.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Name of the reservation order or reservation.
     *
     * @param name the name value to set.
     * @return the ChangeDirectoryResult object itself.
     */
    public ChangeDirectoryResult withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the isSucceeded property: True if change directory operation succeeded on this reservation order or
     * reservation.
     *
     * @return the isSucceeded value.
     */
    public Boolean isSucceeded() {
        return this.isSucceeded;
    }

    /**
     * Set the isSucceeded property: True if change directory operation succeeded on this reservation order or
     * reservation.
     *
     * @param isSucceeded the isSucceeded value to set.
     * @return the ChangeDirectoryResult object itself.
     */
    public ChangeDirectoryResult withIsSucceeded(Boolean isSucceeded) {
        this.isSucceeded = isSucceeded;
        return this;
    }

    /**
     * Get the error property: Error reason if operation failed. Null otherwise.
     *
     * @return the error value.
     */
    public String error() {
        return this.error;
    }

    /**
     * Set the error property: Error reason if operation failed. Null otherwise.
     *
     * @param error the error value to set.
     * @return the ChangeDirectoryResult object itself.
     */
    public ChangeDirectoryResult withError(String error) {
        this.error = error;
        return this;
    }

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