All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.billing.implementation.ReservationOrderImpl Maven / Gradle / Ivy

// 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.core.management.SystemData;
import com.azure.resourcemanager.billing.fluent.models.ReservationInner;
import com.azure.resourcemanager.billing.fluent.models.ReservationOrderInner;
import com.azure.resourcemanager.billing.models.Reservation;
import com.azure.resourcemanager.billing.models.ReservationBillingPlan;
import com.azure.resourcemanager.billing.models.ReservationExtendedStatusInfo;
import com.azure.resourcemanager.billing.models.ReservationOrder;
import com.azure.resourcemanager.billing.models.ReservationOrderBillingPlanInformation;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public final class ReservationOrderImpl implements ReservationOrder {
    private ReservationOrderInner innerObject;

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

    ReservationOrderImpl(ReservationOrderInner 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 Integer etag() {
        return this.innerModel().etag();
    }

    public Map tags() {
        Map inner = this.innerModel().tags();
        if (inner != null) {
            return Collections.unmodifiableMap(inner);
        } else {
            return Collections.emptyMap();
        }
    }

    public SystemData systemData() {
        return this.innerModel().systemData();
    }

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

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

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

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

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

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

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

    public LocalDate expiryDate() {
        return this.innerModel().expiryDate();
    }

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

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

    public Integer originalQuantity() {
        return this.innerModel().originalQuantity();
    }

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

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

    public ReservationBillingPlan billingPlan() {
        return this.innerModel().billingPlan();
    }

    public ReservationOrderBillingPlanInformation planInformation() {
        return this.innerModel().planInformation();
    }

    public List reservations() {
        List inner = this.innerModel().reservations();
        if (inner != null) {
            return Collections.unmodifiableList(
                inner.stream().map(inner1 -> new ReservationImpl(inner1, this.manager())).collect(Collectors.toList()));
        } else {
            return Collections.emptyList();
        }
    }

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

    public ReservationExtendedStatusInfo extendedStatusInfo() {
        return this.innerModel().extendedStatusInfo();
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy