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

package tsptest.armstreamstyleserialization.implementation;

import java.util.Collections;
import java.util.List;
import tsptest.armstreamstyleserialization.fluent.models.ListResultSummary2Inner;
import tsptest.armstreamstyleserialization.models.ListResultSummary2;
import tsptest.armstreamstyleserialization.models.Result;

public final class ListResultSummary2Impl implements ListResultSummary2 {
    private ListResultSummary2Inner innerObject;

    private final tsptest.armstreamstyleserialization.ArmResourceProviderManager serviceManager;

    ListResultSummary2Impl(ListResultSummary2Inner innerObject,
        tsptest.armstreamstyleserialization.ArmResourceProviderManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

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

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

    private tsptest.armstreamstyleserialization.ArmResourceProviderManager manager() {
        return this.serviceManager;
    }
}
