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

package com.azure.resourcemanager.reservations.implementation;

import com.azure.resourcemanager.reservations.fluent.models.CatalogInner;
import com.azure.resourcemanager.reservations.models.Catalog;
import com.azure.resourcemanager.reservations.models.CatalogMsrp;
import com.azure.resourcemanager.reservations.models.ReservationBillingPlan;
import com.azure.resourcemanager.reservations.models.ReservationTerm;
import com.azure.resourcemanager.reservations.models.SkuCapability;
import com.azure.resourcemanager.reservations.models.SkuProperty;
import com.azure.resourcemanager.reservations.models.SkuRestriction;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public final class CatalogImpl implements Catalog {
    private CatalogInner innerObject;

    private final com.azure.resourcemanager.reservations.ReservationsManager serviceManager;

    CatalogImpl(CatalogInner innerObject, com.azure.resourcemanager.reservations.ReservationsManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

    public Map<String, List<ReservationBillingPlan>> billingPlans() {
        Map<String, List<ReservationBillingPlan>> inner = this.innerModel().billingPlans();
        if (inner != null) {
            return Collections.unmodifiableMap(inner);
        } else {
            return Collections.emptyMap();
        }
    }

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

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

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

    public CatalogMsrp msrp() {
        return this.innerModel().msrp();
    }

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

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

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

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

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

    private com.azure.resourcemanager.reservations.ReservationsManager manager() {
        return this.serviceManager;
    }
}
