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

package com.azure.resourcemanager.automation.implementation;

import com.azure.resourcemanager.automation.fluent.models.KeyListResultInner;
import com.azure.resourcemanager.automation.models.Key;
import com.azure.resourcemanager.automation.models.KeyListResult;
import java.util.Collections;
import java.util.List;

public final class KeyListResultImpl implements KeyListResult {
    private KeyListResultInner innerObject;

    private final com.azure.resourcemanager.automation.AutomationManager serviceManager;

    KeyListResultImpl(
        KeyListResultInner innerObject, com.azure.resourcemanager.automation.AutomationManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

    private com.azure.resourcemanager.automation.AutomationManager manager() {
        return this.serviceManager;
    }
}
