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

package com.azure.resourcemanager.quota.implementation;

import com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner;
import com.azure.resourcemanager.quota.models.QuotaRequestDetails;
import com.azure.resourcemanager.quota.models.QuotaRequestState;
import com.azure.resourcemanager.quota.models.ServiceErrorDetail;
import com.azure.resourcemanager.quota.models.SubRequest;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class QuotaRequestDetailsImpl implements QuotaRequestDetails {
    private QuotaRequestDetailsInner innerObject;

    private final com.azure.resourcemanager.quota.QuotaManager serviceManager;

    QuotaRequestDetailsImpl(
        QuotaRequestDetailsInner innerObject, com.azure.resourcemanager.quota.QuotaManager 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 QuotaRequestState provisioningState() {
        return this.innerModel().provisioningState();
    }

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

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

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

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

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

    private com.azure.resourcemanager.quota.QuotaManager manager() {
        return this.serviceManager;
    }
}
