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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.resourcemanager.vmwarecloudsimple.models.NodeStatus;
import com.azure.resourcemanager.vmwarecloudsimple.models.Sku;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.Map;
import java.util.UUID;

/** Dedicated cloud node model. */
@Fluent
public final class DedicatedCloudNodeInner extends Resource {
    /*
     * Dedicated Cloud Nodes properties
     */
    @JsonProperty(value = "properties")
    private DedicatedCloudNodeProperties innerProperties;

    /*
     * Dedicated Cloud Nodes SKU
     */
    @JsonProperty(value = "sku")
    private Sku sku;

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

    /**
     * Get the innerProperties property: Dedicated Cloud Nodes properties.
     *
     * @return the innerProperties value.
     */
    private DedicatedCloudNodeProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the sku property: Dedicated Cloud Nodes SKU.
     *
     * @return the sku value.
     */
    public Sku sku() {
        return this.sku;
    }

    /**
     * Set the sku property: Dedicated Cloud Nodes SKU.
     *
     * @param sku the sku value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withSku(Sku sku) {
        this.sku = sku;
        return this;
    }

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

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

    /**
     * Get the availabilityZoneId property: Availability Zone id, e.g. "az1".
     *
     * @return the availabilityZoneId value.
     */
    public String availabilityZoneId() {
        return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneId();
    }

    /**
     * Set the availabilityZoneId property: Availability Zone id, e.g. "az1".
     *
     * @param availabilityZoneId the availabilityZoneId value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withAvailabilityZoneId(String availabilityZoneId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withAvailabilityZoneId(availabilityZoneId);
        return this;
    }

    /**
     * Get the availabilityZoneName property: Availability Zone name, e.g. "Availability Zone 1".
     *
     * @return the availabilityZoneName value.
     */
    public String availabilityZoneName() {
        return this.innerProperties() == null ? null : this.innerProperties().availabilityZoneName();
    }

    /**
     * Get the cloudRackName property: VMWare Cloud Rack Name.
     *
     * @return the cloudRackName value.
     */
    public String cloudRackName() {
        return this.innerProperties() == null ? null : this.innerProperties().cloudRackName();
    }

    /**
     * Get the created property: date time the resource was created.
     *
     * @return the created value.
     */
    public OffsetDateTime created() {
        return this.innerProperties() == null ? null : this.innerProperties().created();
    }

    /**
     * Get the nodesCount property: count of nodes to create.
     *
     * @return the nodesCount value.
     */
    public Integer nodesCount() {
        return this.innerProperties() == null ? null : this.innerProperties().nodesCount();
    }

    /**
     * Set the nodesCount property: count of nodes to create.
     *
     * @param nodesCount the nodesCount value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withNodesCount(Integer nodesCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withNodesCount(nodesCount);
        return this;
    }

    /**
     * Get the placementGroupId property: Placement Group id, e.g. "n1".
     *
     * @return the placementGroupId value.
     */
    public String placementGroupId() {
        return this.innerProperties() == null ? null : this.innerProperties().placementGroupId();
    }

    /**
     * Set the placementGroupId property: Placement Group id, e.g. "n1".
     *
     * @param placementGroupId the placementGroupId value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withPlacementGroupId(String placementGroupId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withPlacementGroupId(placementGroupId);
        return this;
    }

    /**
     * Get the placementGroupName property: Placement Name, e.g. "Placement Group 1".
     *
     * @return the placementGroupName value.
     */
    public String placementGroupName() {
        return this.innerProperties() == null ? null : this.innerProperties().placementGroupName();
    }

    /**
     * Get the privateCloudId property: Private Cloud Id.
     *
     * @return the privateCloudId value.
     */
    public String privateCloudId() {
        return this.innerProperties() == null ? null : this.innerProperties().privateCloudId();
    }

    /**
     * Get the privateCloudName property: Resource Pool Name.
     *
     * @return the privateCloudName value.
     */
    public String privateCloudName() {
        return this.innerProperties() == null ? null : this.innerProperties().privateCloudName();
    }

    /**
     * Get the provisioningState property: The provisioning status of the resource.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the purchaseId property: purchase id.
     *
     * @return the purchaseId value.
     */
    public UUID purchaseId() {
        return this.innerProperties() == null ? null : this.innerProperties().purchaseId();
    }

    /**
     * Set the purchaseId property: purchase id.
     *
     * @param purchaseId the purchaseId value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withPurchaseId(UUID purchaseId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withPurchaseId(purchaseId);
        return this;
    }

    /**
     * Get the status property: Node status, indicates is private cloud set up on this node or not.
     *
     * @return the status value.
     */
    public NodeStatus status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the vmwareClusterName property: VMWare Cluster Name.
     *
     * @return the vmwareClusterName value.
     */
    public String vmwareClusterName() {
        return this.innerProperties() == null ? null : this.innerProperties().vmwareClusterName();
    }

    /**
     * Get the id property: SKU's id.
     *
     * @return the id value.
     */
    public String idPropertiesId() {
        return this.innerProperties() == null ? null : this.innerProperties().id();
    }

    /**
     * Set the id property: SKU's id.
     *
     * @param id the id value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withIdPropertiesId(String id) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withId(id);
        return this;
    }

    /**
     * Get the name property: SKU's name.
     *
     * @return the name value.
     */
    public String namePropertiesName() {
        return this.innerProperties() == null ? null : this.innerProperties().name();
    }

    /**
     * Set the name property: SKU's name.
     *
     * @param name the name value to set.
     * @return the DedicatedCloudNodeInner object itself.
     */
    public DedicatedCloudNodeInner withNamePropertiesName(String name) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudNodeProperties();
        }
        this.innerProperties().withName(name);
        return this;
    }

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