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

package com.azure.resourcemanager.cosmosdbforpostgresql.implementation;

import com.azure.core.management.SystemData;
import com.azure.resourcemanager.cosmosdbforpostgresql.fluent.models.ConfigurationInner;
import com.azure.resourcemanager.cosmosdbforpostgresql.models.Configuration;
import com.azure.resourcemanager.cosmosdbforpostgresql.models.ConfigurationDataType;
import com.azure.resourcemanager.cosmosdbforpostgresql.models.ProvisioningState;
import com.azure.resourcemanager.cosmosdbforpostgresql.models.ServerRoleGroupConfiguration;
import java.util.Collections;
import java.util.List;

public final class ConfigurationImpl implements Configuration {
    private ConfigurationInner innerObject;

    private final com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager;

    ConfigurationImpl(
        ConfigurationInner innerObject,
        com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

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

    public SystemData systemData() {
        return this.innerModel().systemData();
    }

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

    public ConfigurationDataType dataType() {
        return this.innerModel().dataType();
    }

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

    public Boolean requiresRestart() {
        return this.innerModel().requiresRestart();
    }

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

    public ProvisioningState provisioningState() {
        return this.innerModel().provisioningState();
    }

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

    private com.azure.resourcemanager.cosmosdbforpostgresql.CosmosDBForPostgreSqlManager manager() {
        return this.serviceManager;
    }
}
