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

com.softlayer.api.service.billing.Currency Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.billing;

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.ExchangeRate;
import com.softlayer.api.service.container.billing.currency.Format;
import java.math.BigDecimal;
import java.util.List;
import java.util.concurrent.Future;

/**
 * @see SoftLayer_Billing_Currency
 */
@ApiType("SoftLayer_Billing_Currency")
public class Currency extends Entity {

    /**
     * The current exchange rate
     */
    @ApiProperty
    protected ExchangeRate currentExchangeRate;

    public ExchangeRate getCurrentExchangeRate() {
        return currentExchangeRate;
    }

    public void setCurrentExchangeRate(ExchangeRate currentExchangeRate) {
        this.currentExchangeRate = currentExchangeRate;
    }

    @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 String keyName;

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        keyNameSpecified = true;
        this.keyName = keyName;
    }

    protected boolean keyNameSpecified;

    public boolean isKeyNameSpecified() {
        return keyNameSpecified;
    }

    public void unsetKeyName() {
        keyName = null;
        keyNameSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        nameSpecified = true;
        this.name = name;
    }

    protected boolean nameSpecified;

    public boolean isNameSpecified() {
        return nameSpecified;
    }

    public void unsetName() {
        name = null;
        nameSpecified = 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
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Billing_Currency")
    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::getAllObjects
         */
        @ApiMethod
        public List getAllObjects();

        /**
         * @see SoftLayer_Billing_Currency::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Currency getObject();

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

        /**
         * The current exchange rate
         *
         * @see SoftLayer_Billing_Currency::getCurrentExchangeRate
         */
        @ApiMethod(instanceRequired = true)
        public ExchangeRate getCurrentExchangeRate();

    }

    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#getAllObjects}
         */
        public Future> getAllObjects();

        public Future getAllObjects(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#getCurrentExchangeRate}
         */
        public Future getCurrentExchangeRate();

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

    }

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

        public com.softlayer.api.service.billing.currency.ExchangeRate.Mask currentExchangeRate() {
            return withSubMask("currentExchangeRate", com.softlayer.api.service.billing.currency.ExchangeRate.Mask.class);
        }

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy