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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstancePowerStateEnum;
import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalProvisioningStatesEnum;
import com.azure.resourcemanager.baremetalinfrastructure.models.HardwareProfile;
import com.azure.resourcemanager.baremetalinfrastructure.models.NetworkProfile;
import com.azure.resourcemanager.baremetalinfrastructure.models.OSProfile;
import com.azure.resourcemanager.baremetalinfrastructure.models.StorageProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties). */
@Fluent
public final class AzureBareMetalInstanceInner extends Resource {
    /*
     * AzureBareMetal instance properties
     */
    @JsonProperty(value = "properties")
    private AzureBareMetalInstanceProperties innerProperties;

    /*
     * The system metadata relating to this resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: AzureBareMetal instance properties.
     *
     * @return the innerProperties value.
     */
    private AzureBareMetalInstanceProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: The system metadata relating to this resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /** {@inheritDoc} */
    @Override
    public AzureBareMetalInstanceInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public AzureBareMetalInstanceInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /**
     * Get the hardwareProfile property: Specifies the hardware settings for the AzureBareMetal instance.
     *
     * @return the hardwareProfile value.
     */
    public HardwareProfile hardwareProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().hardwareProfile();
    }

    /**
     * Set the hardwareProfile property: Specifies the hardware settings for the AzureBareMetal instance.
     *
     * @param hardwareProfile the hardwareProfile value to set.
     * @return the AzureBareMetalInstanceInner object itself.
     */
    public AzureBareMetalInstanceInner withHardwareProfile(HardwareProfile hardwareProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AzureBareMetalInstanceProperties();
        }
        this.innerProperties().withHardwareProfile(hardwareProfile);
        return this;
    }

    /**
     * Get the storageProfile property: Specifies the storage settings for the AzureBareMetal instance disks.
     *
     * @return the storageProfile value.
     */
    public StorageProfile storageProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().storageProfile();
    }

    /**
     * Set the storageProfile property: Specifies the storage settings for the AzureBareMetal instance disks.
     *
     * @param storageProfile the storageProfile value to set.
     * @return the AzureBareMetalInstanceInner object itself.
     */
    public AzureBareMetalInstanceInner withStorageProfile(StorageProfile storageProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AzureBareMetalInstanceProperties();
        }
        this.innerProperties().withStorageProfile(storageProfile);
        return this;
    }

    /**
     * Get the osProfile property: Specifies the operating system settings for the AzureBareMetal instance.
     *
     * @return the osProfile value.
     */
    public OSProfile osProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().osProfile();
    }

    /**
     * Set the osProfile property: Specifies the operating system settings for the AzureBareMetal instance.
     *
     * @param osProfile the osProfile value to set.
     * @return the AzureBareMetalInstanceInner object itself.
     */
    public AzureBareMetalInstanceInner withOsProfile(OSProfile osProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AzureBareMetalInstanceProperties();
        }
        this.innerProperties().withOsProfile(osProfile);
        return this;
    }

    /**
     * Get the networkProfile property: Specifies the network settings for the AzureBareMetal instance.
     *
     * @return the networkProfile value.
     */
    public NetworkProfile networkProfile() {
        return this.innerProperties() == null ? null : this.innerProperties().networkProfile();
    }

    /**
     * Set the networkProfile property: Specifies the network settings for the AzureBareMetal instance.
     *
     * @param networkProfile the networkProfile value to set.
     * @return the AzureBareMetalInstanceInner object itself.
     */
    public AzureBareMetalInstanceInner withNetworkProfile(NetworkProfile networkProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AzureBareMetalInstanceProperties();
        }
        this.innerProperties().withNetworkProfile(networkProfile);
        return this;
    }

    /**
     * Get the azureBareMetalInstanceId property: Specifies the AzureBareMetal instance unique ID.
     *
     * @return the azureBareMetalInstanceId value.
     */
    public String azureBareMetalInstanceId() {
        return this.innerProperties() == null ? null : this.innerProperties().azureBareMetalInstanceId();
    }

    /**
     * Get the powerState property: Resource power state.
     *
     * @return the powerState value.
     */
    public AzureBareMetalInstancePowerStateEnum powerState() {
        return this.innerProperties() == null ? null : this.innerProperties().powerState();
    }

    /**
     * Get the proximityPlacementGroup property: Resource proximity placement group.
     *
     * @return the proximityPlacementGroup value.
     */
    public String proximityPlacementGroup() {
        return this.innerProperties() == null ? null : this.innerProperties().proximityPlacementGroup();
    }

    /**
     * Get the hwRevision property: Hardware revision of an AzureBareMetal instance.
     *
     * @return the hwRevision value.
     */
    public String hwRevision() {
        return this.innerProperties() == null ? null : this.innerProperties().hwRevision();
    }

    /**
     * Get the partnerNodeId property: ARM ID of another AzureBareMetalInstance that will share a network with this
     * AzureBareMetalInstance.
     *
     * @return the partnerNodeId value.
     */
    public String partnerNodeId() {
        return this.innerProperties() == null ? null : this.innerProperties().partnerNodeId();
    }

    /**
     * Set the partnerNodeId property: ARM ID of another AzureBareMetalInstance that will share a network with this
     * AzureBareMetalInstance.
     *
     * @param partnerNodeId the partnerNodeId value to set.
     * @return the AzureBareMetalInstanceInner object itself.
     */
    public AzureBareMetalInstanceInner withPartnerNodeId(String partnerNodeId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AzureBareMetalInstanceProperties();
        }
        this.innerProperties().withPartnerNodeId(partnerNodeId);
        return this;
    }

    /**
     * Get the provisioningState property: State of provisioning of the AzureBareMetalInstance.
     *
     * @return the provisioningState value.
     */
    public AzureBareMetalProvisioningStatesEnum provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

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