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

package com.azure.resourcemanager.hybridkubernetes.implementation;

import com.azure.resourcemanager.hybridkubernetes.fluent.models.CredentialResultsInner;
import com.azure.resourcemanager.hybridkubernetes.models.CredentialResult;
import com.azure.resourcemanager.hybridkubernetes.models.CredentialResults;
import com.azure.resourcemanager.hybridkubernetes.models.HybridConnectionConfig;
import java.util.Collections;
import java.util.List;

public final class CredentialResultsImpl implements CredentialResults {
    private CredentialResultsInner innerObject;

    private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;

    CredentialResultsImpl(
        CredentialResultsInner innerObject,
        com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public HybridConnectionConfig hybridConnectionConfig() {
        return this.innerModel().hybridConnectionConfig();
    }

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

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

    private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
        return this.serviceManager;
    }
}
