// 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.implementation;

import com.azure.resourcemanager.postgresqlflexibleserver.fluent.models.VirtualNetworkSubnetUsageResultInner;
import com.azure.resourcemanager.postgresqlflexibleserver.models.DelegatedSubnetUsage;
import com.azure.resourcemanager.postgresqlflexibleserver.models.VirtualNetworkSubnetUsageResult;
import java.util.Collections;
import java.util.List;

public final class VirtualNetworkSubnetUsageResultImpl implements VirtualNetworkSubnetUsageResult {
    private VirtualNetworkSubnetUsageResultInner innerObject;

    private final com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager;

    VirtualNetworkSubnetUsageResultImpl(
        VirtualNetworkSubnetUsageResultInner innerObject,
        com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public List<DelegatedSubnetUsage> delegatedSubnetsUsage() {
        List<DelegatedSubnetUsage> inner = this.innerModel().delegatedSubnetsUsage();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public String location() {
        return this.innerModel().location();
    }

    public String subscriptionId() {
        return this.innerModel().subscriptionId();
    }

    public VirtualNetworkSubnetUsageResultInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.postgresqlflexibleserver.PostgreSqlManager manager() {
        return this.serviceManager;
    }
}
