// 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.fasterxml.jackson.annotation.JsonProperty;

/** Resource pool model. */
@Fluent
public final class ResourcePoolInner {
    /*
     * resource pool id (privateCloudId:vsphereId)
     */
    @JsonProperty(value = "id", required = true)
    private String id;

    /*
     * Azure region
     */
    @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
    private String location;

    /*
     * {ResourcePoolName}
     */
    @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
    private String name;

    /*
     * The Private Cloud Id
     */
    @JsonProperty(value = "privateCloudId", access = JsonProperty.Access.WRITE_ONLY)
    private String privateCloudId;

    /*
     * Resource pool properties
     */
    @JsonProperty(value = "properties")
    private ResourcePoolProperties innerProperties;

    /*
     * {resourceProviderNamespace}/{resourceType}
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private String type;

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

    /**
     * Get the id property: resource pool id (privateCloudId:vsphereId).
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: resource pool id (privateCloudId:vsphereId).
     *
     * @param id the id value to set.
     * @return the ResourcePoolInner object itself.
     */
    public ResourcePoolInner withId(String id) {
        this.id = id;
        return this;
    }

    /**
     * Get the location property: Azure region.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Get the name property: {ResourcePoolName}.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

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

    /**
     * Get the innerProperties property: Resource pool properties.
     *
     * @return the innerProperties value.
     */
    private ResourcePoolProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the type property: {resourceProviderNamespace}/{resourceType}.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /**
     * Get the fullName property: Hierarchical resource pool name.
     *
     * @return the fullName value.
     */
    public String fullName() {
        return this.innerProperties() == null ? null : this.innerProperties().fullName();
    }

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

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