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

package com.azure.resourcemanager.networkcloud.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * BareMetalMachineValidateHardwareParameters represents the body of the request to validate the physical hardware of a
 * bare metal machine.
 */
@Fluent
public final class BareMetalMachineValidateHardwareParameters {
    /*
     * The category of hardware validation to perform.
     */
    @JsonProperty(value = "validationCategory", required = true)
    private BareMetalMachineHardwareValidationCategory validationCategory;

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

    /**
     * Get the validationCategory property: The category of hardware validation to perform.
     *
     * @return the validationCategory value.
     */
    public BareMetalMachineHardwareValidationCategory validationCategory() {
        return this.validationCategory;
    }

    /**
     * Set the validationCategory property: The category of hardware validation to perform.
     *
     * @param validationCategory the validationCategory value to set.
     * @return the BareMetalMachineValidateHardwareParameters object itself.
     */
    public BareMetalMachineValidateHardwareParameters withValidationCategory(
        BareMetalMachineHardwareValidationCategory validationCategory) {
        this.validationCategory = validationCategory;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (validationCategory() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property validationCategory in model"
                            + " BareMetalMachineValidateHardwareParameters"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(BareMetalMachineValidateHardwareParameters.class);
}
