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

com.softlayer.api.service.billing.currency.ExchangeRate Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.billing.currency;

import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.billing.Currency;
import com.softlayer.api.service.container.billing.currency.Format;
import java.math.BigDecimal;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * @see SoftLayer_Billing_Currency_ExchangeRate
 */
@ApiType("SoftLayer_Billing_Currency_ExchangeRate")
public class ExchangeRate extends Entity {

    @ApiProperty
    protected Currency fundingCurrency;

    public Currency getFundingCurrency() {
        return fundingCurrency;
    }

    public void setFundingCurrency(Currency fundingCurrency) {
        this.fundingCurrency = fundingCurrency;
    }

    @ApiProperty
    protected Currency localCurrency;

    public Currency getLocalCurrency() {
        return localCurrency;
    }

    public void setLocalCurrency(Currency localCurrency) {
        this.localCurrency = localCurrency;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar effectiveDate;

    public GregorianCalendar getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(GregorianCalendar effectiveDate) {
        effectiveDateSpecified = true;
        this.effectiveDate = effectiveDate;
    }

    protected boolean effectiveDateSpecified;

    public boolean isEffectiveDateSpecified() {
        return effectiveDateSpecified;
    }

    public void unsetEffectiveDate() {
        effectiveDate = null;
        effectiveDateSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar expirationDate;

    public GregorianCalendar getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(GregorianCalendar expirationDate) {
        expirationDateSpecified = true;
        this.expirationDate = expirationDate;
    }

    protected boolean expirationDateSpecified;

    public boolean isExpirationDateSpecified() {
        return expirationDateSpecified;
    }

    public void unsetExpirationDate() {
        expirationDate = null;
        expirationDateSpecified = false;
    }

    /**
     * The id of the exchange rate record.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        idSpecified = true;
        this.id = id;
    }

    protected boolean idSpecified;

    public boolean isIdSpecified() {
        return idSpecified;
    }

    public void unsetId() {
        id = null;
        idSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected BigDecimal rate;

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        rateSpecified = true;
        this.rate = rate;
    }

    protected boolean rateSpecified;

    public boolean isRateSpecified() {
        return rateSpecified;
    }

    public void unsetRate() {
        rate = null;
        rateSpecified = false;
    }

    public Service asService(ApiClient client) {
        return service(client, id);
    }

    public static Service service(ApiClient client) {
        return client.createService(Service.class, null);
    }

    public static Service service(ApiClient client, Long id) {
        return client.createService(Service.class, id == null ? null : id.toString());
    }

    /**
     * @see SoftLayer_Billing_Currency_ExchangeRate
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Billing_Currency_ExchangeRate")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getAllCurrencyExchangeRates
         */
        @ApiMethod(instanceRequired = true)
        public List getAllCurrencyExchangeRates(String stringDate);

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getCurrencies
         */
        @ApiMethod
        public List getCurrencies();

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getExchangeRate
         */
        @ApiMethod
        public ExchangeRate getExchangeRate(String to, String from, GregorianCalendar effectiveDate);

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getObject
         */
        @ApiMethod(instanceRequired = true)
        public ExchangeRate getObject();

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getPrice
         */
        @ApiMethod(instanceRequired = true)
        public String getPrice(BigDecimal price, Format formatOptions);

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getFundingCurrency
         */
        @ApiMethod(instanceRequired = true)
        public Currency getFundingCurrency();

        /**
         * @see SoftLayer_Billing_Currency_ExchangeRate::getLocalCurrency
         */
        @ApiMethod(instanceRequired = true)
        public Currency getLocalCurrency();

    }

    public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {

        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Async version of {@link Service#getAllCurrencyExchangeRates}
         */
        public Future> getAllCurrencyExchangeRates(String stringDate);

        public Future getAllCurrencyExchangeRates(String stringDate, ResponseHandler> callback);

        /**
         * Async version of {@link Service#getCurrencies}
         */
        public Future> getCurrencies();

        public Future getCurrencies(ResponseHandler> callback);

        /**
         * Async version of {@link Service#getExchangeRate}
         */
        public Future getExchangeRate(String to, String from, GregorianCalendar effectiveDate);

        public Future getExchangeRate(String to, String from, GregorianCalendar effectiveDate, ResponseHandler callback);

        /**
         * Async version of {@link Service#getObject}
         */
        public Future getObject();

        public Future getObject(ResponseHandler callback);

        /**
         * Async version of {@link Service#getPrice}
         */
        public Future getPrice(BigDecimal price, Format formatOptions);

        public Future getPrice(BigDecimal price, Format formatOptions, ResponseHandler callback);

        /**
         * Async version of {@link Service#getFundingCurrency}
         */
        public Future getFundingCurrency();

        /**
         * Async callback version of {@link Service#getFundingCurrency}
         */
        public Future getFundingCurrency(ResponseHandler callback);

        /**
         * Async version of {@link Service#getLocalCurrency}
         */
        public Future getLocalCurrency();

        /**
         * Async callback version of {@link Service#getLocalCurrency}
         */
        public Future getLocalCurrency(ResponseHandler callback);

    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

        public com.softlayer.api.service.billing.Currency.Mask fundingCurrency() {
            return withSubMask("fundingCurrency", com.softlayer.api.service.billing.Currency.Mask.class);
        }

        public com.softlayer.api.service.billing.Currency.Mask localCurrency() {
            return withSubMask("localCurrency", com.softlayer.api.service.billing.Currency.Mask.class);
        }

        public Mask effectiveDate() {
            withLocalProperty("effectiveDate");
            return this;
        }

        public Mask expirationDate() {
            withLocalProperty("expirationDate");
            return this;
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask rate() {
            withLocalProperty("rate");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy