// 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.util.logging.ClientLogger;
import com.azure.resourcemanager.vmwarecloudsimple.models.OnboardingStatus;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of dedicated cloud service. */
@Fluent
public final class DedicatedCloudServiceProperties {
    /*
     * gateway Subnet for the account. It will collect the subnet address and always treat it as /28
     */
    @JsonProperty(value = "gatewaySubnet", required = true)
    private String gatewaySubnet;

    /*
     * indicates whether account onboarded or not in a given region
     */
    @JsonProperty(value = "isAccountOnboarded", access = JsonProperty.Access.WRITE_ONLY)
    private OnboardingStatus isAccountOnboarded;

    /*
     * total nodes purchased
     */
    @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY)
    private Integer nodes;

    /*
     * link to a service management web portal
     */
    @JsonProperty(value = "serviceURL", access = JsonProperty.Access.WRITE_ONLY)
    private String serviceUrl;

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

    /**
     * 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.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 DedicatedCloudServiceProperties object itself.
     */
    public DedicatedCloudServiceProperties withGatewaySubnet(String gatewaySubnet) {
        this.gatewaySubnet = 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.isAccountOnboarded;
    }

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

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (gatewaySubnet() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property gatewaySubnet in model DedicatedCloudServiceProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(DedicatedCloudServiceProperties.class);
}
