// 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.OnboardingStatus;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

/** Dedicated cloud service model. */
@Fluent
public final class DedicatedCloudServiceInner extends Resource {
    /*
     * The properties of Dedicated Node Service
     */
    @JsonProperty(value = "properties")
    private DedicatedCloudServiceProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of Dedicated Node Service.
     *
     * @return the innerProperties value.
     */
    private DedicatedCloudServiceProperties innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Get the gatewaySubnet property: gateway Subnet for the account. It will collect the subnet address and always
     * treat it as /28.
     *
     * @return the gatewaySubnet value.
     */
    public String gatewaySubnet() {
        return this.innerProperties() == null ? null : this.innerProperties().gatewaySubnet();
    }

    /**
     * Set the gatewaySubnet property: gateway Subnet for the account. It will collect the subnet address and always
     * treat it as /28.
     *
     * @param gatewaySubnet the gatewaySubnet value to set.
     * @return the DedicatedCloudServiceInner object itself.
     */
    public DedicatedCloudServiceInner withGatewaySubnet(String gatewaySubnet) {
        if (this.innerProperties() == null) {
            this.innerProperties = new DedicatedCloudServiceProperties();
        }
        this.innerProperties().withGatewaySubnet(gatewaySubnet);
        return this;
    }

    /**
     * Get the isAccountOnboarded property: indicates whether account onboarded or not in a given region.
     *
     * @return the isAccountOnboarded value.
     */
    public OnboardingStatus isAccountOnboarded() {
        return this.innerProperties() == null ? null : this.innerProperties().isAccountOnboarded();
    }

    /**
     * Get the nodes property: total nodes purchased.
     *
     * @return the nodes value.
     */
    public Integer nodes() {
        return this.innerProperties() == null ? null : this.innerProperties().nodes();
    }

    /**
     * Get the serviceUrl property: link to a service management web portal.
     *
     * @return the serviceUrl value.
     */
    public String serviceUrl() {
        return this.innerProperties() == null ? null : this.innerProperties().serviceUrl();
    }

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