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

package com.azure.resourcemanager.billing.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.billing.models.ValidateSubscriptionTransferEligibilityError;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Result of the transfer eligibility validation. */
@Fluent
public final class ValidateSubscriptionTransferEligibilityResultInner {
    /*
     * Specifies whether the subscription is eligible to be transferred.
     */
    @JsonProperty(value = "isMoveEligible", access = JsonProperty.Access.WRITE_ONLY)
    private Boolean isMoveEligible;

    /*
     * Validation error details.
     */
    @JsonProperty(value = "errorDetails")
    private ValidateSubscriptionTransferEligibilityError errorDetails;

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

    /**
     * Get the isMoveEligible property: Specifies whether the subscription is eligible to be transferred.
     *
     * @return the isMoveEligible value.
     */
    public Boolean isMoveEligible() {
        return this.isMoveEligible;
    }

    /**
     * Get the errorDetails property: Validation error details.
     *
     * @return the errorDetails value.
     */
    public ValidateSubscriptionTransferEligibilityError errorDetails() {
        return this.errorDetails;
    }

    /**
     * Set the errorDetails property: Validation error details.
     *
     * @param errorDetails the errorDetails value to set.
     * @return the ValidateSubscriptionTransferEligibilityResultInner object itself.
     */
    public ValidateSubscriptionTransferEligibilityResultInner withErrorDetails(
        ValidateSubscriptionTransferEligibilityError errorDetails) {
        this.errorDetails = errorDetails;
        return this;
    }

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