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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.hanaonazure.models.HanaInstancePowerStateEnum;
import com.azure.resourcemanager.hanaonazure.models.HanaProvisioningStatesEnum;
import com.azure.resourcemanager.hanaonazure.models.HardwareProfile;
import com.azure.resourcemanager.hanaonazure.models.NetworkProfile;
import com.azure.resourcemanager.hanaonazure.models.OSProfile;
import com.azure.resourcemanager.hanaonazure.models.StorageProfile;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

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

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

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

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

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

    /**
     * Get the hardwareProfile property: Specifies the hardware settings for the HANA 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 HANA instance.
     *
     * @param hardwareProfile the hardwareProfile value to set.
     * @return the HanaInstanceInner object itself.
     */
    public HanaInstanceInner withHardwareProfile(HardwareProfile hardwareProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HanaInstanceProperties();
        }
        this.innerProperties().withHardwareProfile(hardwareProfile);
        return this;
    }

    /**
     * Get the storageProfile property: Specifies the storage settings for the HANA 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 HANA instance disks.
     *
     * @param storageProfile the storageProfile value to set.
     * @return the HanaInstanceInner object itself.
     */
    public HanaInstanceInner withStorageProfile(StorageProfile storageProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HanaInstanceProperties();
        }
        this.innerProperties().withStorageProfile(storageProfile);
        return this;
    }

    /**
     * Get the osProfile property: Specifies the operating system settings for the HANA 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 HANA instance.
     *
     * @param osProfile the osProfile value to set.
     * @return the HanaInstanceInner object itself.
     */
    public HanaInstanceInner withOsProfile(OSProfile osProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HanaInstanceProperties();
        }
        this.innerProperties().withOsProfile(osProfile);
        return this;
    }

    /**
     * Get the networkProfile property: Specifies the network settings for the HANA 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 HANA instance.
     *
     * @param networkProfile the networkProfile value to set.
     * @return the HanaInstanceInner object itself.
     */
    public HanaInstanceInner withNetworkProfile(NetworkProfile networkProfile) {
        if (this.innerProperties() == null) {
            this.innerProperties = new HanaInstanceProperties();
        }
        this.innerProperties().withNetworkProfile(networkProfile);
        return this;
    }

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

    /**
     * Get the powerState property: Resource power state.
     *
     * @return the powerState value.
     */
    public HanaInstancePowerStateEnum 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 a HANA instance.
     *
     * @return the hwRevision value.
     */
    public String hwRevision() {
        return this.innerProperties() == null ? null : this.innerProperties().hwRevision();
    }

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

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

    /**
     * Get the provisioningState property: State of provisioning of the HanaInstance.
     *
     * @return the provisioningState value.
     */
    public HanaProvisioningStatesEnum 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();
        }
    }
}
