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

package com.azure.resourcemanager.kubernetesconfiguration.implementation;

import com.azure.core.management.SystemData;
import com.azure.core.management.exception.ManagementError;
import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner;
import com.azure.resourcemanager.kubernetesconfiguration.models.Extension;
import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionPropertiesAksAssignedIdentity;
import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionStatus;
import com.azure.resourcemanager.kubernetesconfiguration.models.Identity;
import com.azure.resourcemanager.kubernetesconfiguration.models.Plan;
import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState;
import com.azure.resourcemanager.kubernetesconfiguration.models.Scope;
import java.util.Collections;
import java.util.List;
import java.util.Map;

public final class ExtensionImpl implements Extension {
    private ExtensionInner innerObject;

    private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager;

    ExtensionImpl(
        ExtensionInner innerObject,
        com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager 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 Identity identity() {
        return this.innerModel().identity();
    }

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

    public Plan plan() {
        return this.innerModel().plan();
    }

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

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

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

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

    public Scope scope() {
        return this.innerModel().scope();
    }

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

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

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

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

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

    public ManagementError errorInfo() {
        return this.innerModel().errorInfo();
    }

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

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

    public ExtensionPropertiesAksAssignedIdentity aksAssignedIdentity() {
        return this.innerModel().aksAssignedIdentity();
    }

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

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

    private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() {
        return this.serviceManager;
    }
}
