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

package com.azure.resourcemanager.edgeorder.implementation;

import com.azure.core.management.SystemData;
import com.azure.resourcemanager.edgeorder.fluent.models.OrderResourceInner;
import com.azure.resourcemanager.edgeorder.models.OrderResource;
import com.azure.resourcemanager.edgeorder.models.StageDetails;
import java.util.Collections;
import java.util.List;

public final class OrderResourceImpl implements OrderResource {
    private OrderResourceInner innerObject;

    private final com.azure.resourcemanager.edgeorder.EdgeOrderManager serviceManager;

    OrderResourceImpl(
        OrderResourceInner innerObject, com.azure.resourcemanager.edgeorder.EdgeOrderManager 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 List<String> orderItemIds() {
        List<String> inner = this.innerModel().orderItemIds();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public StageDetails currentStage() {
        return this.innerModel().currentStage();
    }

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

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

    private com.azure.resourcemanager.edgeorder.EdgeOrderManager manager() {
        return this.serviceManager;
    }
}
