// 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.fasterxml.jackson.annotation.JsonProperty;

/**
 * BareMetalMachineReplaceParameters represents the body of the request to physically swap a bare metal machine for
 * another.
 */
@Fluent
public final class BareMetalMachineReplaceParameters {
    /*
     * AdministrativeCredentials represents the admin credentials for the device requiring password-based
     * authentication.
     *
     * The credentials of the baseboard management controller on this bare metal machine.
     */
    @JsonProperty(value = "bmcCredentials")
    private AdministrativeCredentials bmcCredentials;

    /*
     * The MAC address of the BMC device.
     */
    @JsonProperty(value = "bmcMacAddress")
    private String bmcMacAddress;

    /*
     * The MAC address of a NIC connected to the PXE network.
     */
    @JsonProperty(value = "bootMacAddress")
    private String bootMacAddress;

    /*
     * The OS-level hostname assigned to this machine.
     */
    @JsonProperty(value = "machineName")
    private String machineName;

    /*
     * The serial number of the bare metal machine.
     */
    @JsonProperty(value = "serialNumber")
    private String serialNumber;

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

    /**
     * Get the bmcCredentials property: AdministrativeCredentials represents the admin credentials for the device
     * requiring password-based authentication.
     *
     * <p>The credentials of the baseboard management controller on this bare metal machine.
     *
     * @return the bmcCredentials value.
     */
    public AdministrativeCredentials bmcCredentials() {
        return this.bmcCredentials;
    }

    /**
     * Set the bmcCredentials property: AdministrativeCredentials represents the admin credentials for the device
     * requiring password-based authentication.
     *
     * <p>The credentials of the baseboard management controller on this bare metal machine.
     *
     * @param bmcCredentials the bmcCredentials value to set.
     * @return the BareMetalMachineReplaceParameters object itself.
     */
    public BareMetalMachineReplaceParameters withBmcCredentials(AdministrativeCredentials bmcCredentials) {
        this.bmcCredentials = bmcCredentials;
        return this;
    }

    /**
     * Get the bmcMacAddress property: The MAC address of the BMC device.
     *
     * @return the bmcMacAddress value.
     */
    public String bmcMacAddress() {
        return this.bmcMacAddress;
    }

    /**
     * Set the bmcMacAddress property: The MAC address of the BMC device.
     *
     * @param bmcMacAddress the bmcMacAddress value to set.
     * @return the BareMetalMachineReplaceParameters object itself.
     */
    public BareMetalMachineReplaceParameters withBmcMacAddress(String bmcMacAddress) {
        this.bmcMacAddress = bmcMacAddress;
        return this;
    }

    /**
     * Get the bootMacAddress property: The MAC address of a NIC connected to the PXE network.
     *
     * @return the bootMacAddress value.
     */
    public String bootMacAddress() {
        return this.bootMacAddress;
    }

    /**
     * Set the bootMacAddress property: The MAC address of a NIC connected to the PXE network.
     *
     * @param bootMacAddress the bootMacAddress value to set.
     * @return the BareMetalMachineReplaceParameters object itself.
     */
    public BareMetalMachineReplaceParameters withBootMacAddress(String bootMacAddress) {
        this.bootMacAddress = bootMacAddress;
        return this;
    }

    /**
     * Get the machineName property: The OS-level hostname assigned to this machine.
     *
     * @return the machineName value.
     */
    public String machineName() {
        return this.machineName;
    }

    /**
     * Set the machineName property: The OS-level hostname assigned to this machine.
     *
     * @param machineName the machineName value to set.
     * @return the BareMetalMachineReplaceParameters object itself.
     */
    public BareMetalMachineReplaceParameters withMachineName(String machineName) {
        this.machineName = machineName;
        return this;
    }

    /**
     * Get the serialNumber property: The serial number of the bare metal machine.
     *
     * @return the serialNumber value.
     */
    public String serialNumber() {
        return this.serialNumber;
    }

    /**
     * Set the serialNumber property: The serial number of the bare metal machine.
     *
     * @param serialNumber the serialNumber value to set.
     * @return the BareMetalMachineReplaceParameters object itself.
     */
    public BareMetalMachineReplaceParameters withSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
        return this;
    }

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