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

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

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Virtual network subnet usage data. */
@Immutable
public final class VirtualNetworkSubnetUsageResultInner {
    /*
     * The delegatedSubnetsUsage property.
     */
    @JsonProperty(value = "delegatedSubnetsUsage", access = JsonProperty.Access.WRITE_ONLY)
    private List<DelegatedSubnetUsage> delegatedSubnetsUsage;

    /*
     * location of the delegated subnet usage
     */
    @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
    private String location;

    /*
     * subscriptionId of the delegated subnet usage
     */
    @JsonProperty(value = "subscriptionId", access = JsonProperty.Access.WRITE_ONLY)
    private String subscriptionId;

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

    /**
     * Get the delegatedSubnetsUsage property: The delegatedSubnetsUsage property.
     *
     * @return the delegatedSubnetsUsage value.
     */
    public List<DelegatedSubnetUsage> delegatedSubnetsUsage() {
        return this.delegatedSubnetsUsage;
    }

    /**
     * Get the location property: location of the delegated subnet usage.
     *
     * @return the location value.
     */
    public String location() {
        return this.location;
    }

    /**
     * Get the subscriptionId property: subscriptionId of the delegated subnet usage.
     *
     * @return the subscriptionId value.
     */
    public String subscriptionId() {
        return this.subscriptionId;
    }

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