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

package com.azure.resourcemanager.billing.implementation;

import com.azure.resourcemanager.billing.fluent.models.AgreementInner;
import com.azure.resourcemanager.billing.models.AcceptanceMode;
import com.azure.resourcemanager.billing.models.Agreement;
import com.azure.resourcemanager.billing.models.BillingProfileInfo;
import com.azure.resourcemanager.billing.models.Category;
import com.azure.resourcemanager.billing.models.Participants;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;

public final class AgreementImpl implements Agreement {
    private AgreementInner innerObject;

    private final com.azure.resourcemanager.billing.BillingManager serviceManager;

    AgreementImpl(AgreementInner innerObject, com.azure.resourcemanager.billing.BillingManager 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 String agreementLink() {
        return this.innerModel().agreementLink();
    }

    public Category category() {
        return this.innerModel().category();
    }

    public AcceptanceMode acceptanceMode() {
        return this.innerModel().acceptanceMode();
    }

    public BillingProfileInfo billingProfileInfo() {
        return this.innerModel().billingProfileInfo();
    }

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

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

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

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

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

    private com.azure.resourcemanager.billing.BillingManager manager() {
        return this.serviceManager;
    }
}
