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

com.softlayer.api.service.software.AccountLicense Maven / Gradle / Ivy

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

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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.billing.Item;
import com.softlayer.api.service.software.Description;
import java.util.List;
import java.util.concurrent.Future;

/**
 * SoftLayer_Software_AccountLicense is a class that represents software licenses that are tied only to a customer's account and not to any particular hardware, IP address, etc. 
 *
 * @see SoftLayer_Software_AccountLicense
 */
@ApiType("SoftLayer_Software_AccountLicense")
public class AccountLicense extends Entity {

    /**
     * The customer account this Account License belongs to.
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    /**
     * The billing item for a software account license.
     */
    @ApiProperty
    protected Item billingItem;

    public Item getBillingItem() {
        return billingItem;
    }

    public void setBillingItem(Item billingItem) {
        this.billingItem = billingItem;
    }

    /**
     * The SoftLayer_Software_Description that this account license is for.
     */
    @ApiProperty
    protected Description softwareDescription;

    public Description getSoftwareDescription() {
        return softwareDescription;
    }

    public void setSoftwareDescription(Description softwareDescription) {
        this.softwareDescription = softwareDescription;
    }

    /**
     * The ID of the SoftLayer Account to which this Account License belongs to.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long accountId;

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        accountIdSpecified = true;
        this.accountId = accountId;
    }

    protected boolean accountIdSpecified;

    public boolean isAccountIdSpecified() {
        return accountIdSpecified;
    }

    public void unsetAccountId() {
        accountId = null;
        accountIdSpecified = false;
    }

    /**
     * Some Account Licenses have capacity information such as CPU specified in the units key. This provides the numerical representation of the capacity of the units. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String capacity;

    public String getCapacity() {
        return capacity;
    }

    public void setCapacity(String capacity) {
        capacitySpecified = true;
        this.capacity = capacity;
    }

    protected boolean capacitySpecified;

    public boolean isCapacitySpecified() {
        return capacitySpecified;
    }

    public void unsetCapacity() {
        capacity = null;
        capacitySpecified = false;
    }

    /**
     * The License Key for this specific Account License.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String key;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        keySpecified = true;
        this.key = key;
    }

    protected boolean keySpecified;

    public boolean isKeySpecified() {
        return keySpecified;
    }

    public void unsetKey() {
        key = null;
        keySpecified = false;
    }

    /**
     * The unit of measurement that an account license has the capacity of.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String units;

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        unitsSpecified = true;
        this.units = units;
    }

    protected boolean unitsSpecified;

    public boolean isUnitsSpecified() {
        return unitsSpecified;
    }

    public void unsetUnits() {
        units = null;
        unitsSpecified = false;
    }

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

    /**
     * SoftLayer_Software_AccountLicense is the application class that handles a special type of Software License.  Most software licenses are licensed to a specific hardware ID or IP address, this is tied to an account. 
     *
     * @see SoftLayer_Software_AccountLicense
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Software_AccountLicense")
    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_Software_AccountLicense::getAllObjects
         */
        @ApiMethod
        public List getAllObjects();

        /**
         * @see SoftLayer_Software_AccountLicense::getObject
         */
        @ApiMethod(instanceRequired = true)
        public AccountLicense getObject();

        /**
         * The customer account this Account License belongs to.
         *
         * @see SoftLayer_Software_AccountLicense::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * The billing item for a software account license.
         *
         * @see SoftLayer_Software_AccountLicense::getBillingItem
         */
        @ApiMethod(instanceRequired = true)
        public Item getBillingItem();

        /**
         * The SoftLayer_Software_Description that this account license is for.
         *
         * @see SoftLayer_Software_AccountLicense::getSoftwareDescription
         */
        @ApiMethod(instanceRequired = true)
        public Description getSoftwareDescription();

    }

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

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

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

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

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

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

    }

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

        public com.softlayer.api.service.Account.Mask account() {
            return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
        }

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

        public Description.Mask softwareDescription() {
            return withSubMask("softwareDescription", Description.Mask.class);
        }

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy