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

package com.azure.resourcemanager.orbital.implementation;

import com.azure.resourcemanager.orbital.fluent.models.OperationResultInner;
import com.azure.resourcemanager.orbital.models.OperationResult;
import com.azure.resourcemanager.orbital.models.OperationResultErrorProperties;
import com.azure.resourcemanager.orbital.models.Status;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class OperationResultImpl implements OperationResult {
    private OperationResultInner innerObject;

    private final com.azure.resourcemanager.orbital.OrbitalManager serviceManager;

    OperationResultImpl(
        OperationResultInner innerObject, com.azure.resourcemanager.orbital.OrbitalManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

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

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

    public Status status() {
        return this.innerModel().status();
    }

    public OffsetDateTime startTime() {
        return this.innerModel().startTime();
    }

    public OffsetDateTime endTime() {
        return this.innerModel().endTime();
    }

    public Double percentComplete() {
        return this.innerModel().percentComplete();
    }

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

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

    public Object properties() {
        return this.innerModel().properties();
    }

    public OperationResultErrorProperties error() {
        return this.innerModel().error();
    }

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

    private com.azure.resourcemanager.orbital.OrbitalManager manager() {
        return this.serviceManager;
    }
}
