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

com.softlayer.api.service.virtual.DedicatedHost Maven / Gradle / Ivy

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

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.Hardware;
import com.softlayer.api.service.Location;
import com.softlayer.api.service.container.virtual.dedicatedhost.AllocationStatus;
import com.softlayer.api.service.hardware.router.Backend;
import com.softlayer.api.service.virtual.Guest;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * This data type presents the structure for a dedicated host. The data type contains relational properties to distinguish a dedicated host and associate an account to it. 
 *
 * @see SoftLayer_Virtual_DedicatedHost
 */
@ApiType("SoftLayer_Virtual_DedicatedHost")
public class DedicatedHost extends Entity {

    /**
     * The account that the dedicated host belongs to.
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

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

    /**
     * The container that represents allocations on the dedicated host.
     */
    @ApiProperty
    protected AllocationStatus allocationStatus;

    public AllocationStatus getAllocationStatus() {
        return allocationStatus;
    }

    public void setAllocationStatus(AllocationStatus allocationStatus) {
        this.allocationStatus = allocationStatus;
    }

    /**
     * The backend router behind dedicated host's pool of resources.
     */
    @ApiProperty
    protected Backend backendRouter;

    public Backend getBackendRouter() {
        return backendRouter;
    }

    public void setBackendRouter(Backend backendRouter) {
        this.backendRouter = backendRouter;
    }

    /**
     * The billing item for the dedicated host.
     */
    @ApiProperty
    protected com.softlayer.api.service.billing.item.virtual.DedicatedHost billingItem;

    public com.softlayer.api.service.billing.item.virtual.DedicatedHost getBillingItem() {
        return billingItem;
    }

    public void setBillingItem(com.softlayer.api.service.billing.item.virtual.DedicatedHost billingItem) {
        this.billingItem = billingItem;
    }

    /**
     * The datacenter that the dedicated host resides in.
     */
    @ApiProperty
    protected Location datacenter;

    public Location getDatacenter() {
        return datacenter;
    }

    public void setDatacenter(Location datacenter) {
        this.datacenter = datacenter;
    }

    /**
     * The guests associated with the dedicated host.
     */
    @ApiProperty
    protected List guests;

    public List getGuests() {
        if (guests == null) {
            guests = new ArrayList();
        }
        return guests;
    }

    /**
     * The dedicated host's associated account id. 
     */
    @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;
    }

    /**
     * The capacity that the dedicated host's CPU allocation is restricted to. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long cpuCount;

    public Long getCpuCount() {
        return cpuCount;
    }

    public void setCpuCount(Long cpuCount) {
        cpuCountSpecified = true;
        this.cpuCount = cpuCount;
    }

    protected boolean cpuCountSpecified;

    public boolean isCpuCountSpecified() {
        return cpuCountSpecified;
    }

    public void unsetCpuCount() {
        cpuCount = null;
        cpuCountSpecified = false;
    }

    /**
     * The date that the dedicated host was created. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar createDate;

    public GregorianCalendar getCreateDate() {
        return createDate;
    }

    public void setCreateDate(GregorianCalendar createDate) {
        createDateSpecified = true;
        this.createDate = createDate;
    }

    protected boolean createDateSpecified;

    public boolean isCreateDateSpecified() {
        return createDateSpecified;
    }

    public void unsetCreateDate() {
        createDate = null;
        createDateSpecified = false;
    }

    /**
     * The capacity that the dedicated host's disk allocation is restricted to. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long diskCapacity;

    public Long getDiskCapacity() {
        return diskCapacity;
    }

    public void setDiskCapacity(Long diskCapacity) {
        diskCapacitySpecified = true;
        this.diskCapacity = diskCapacity;
    }

    protected boolean diskCapacitySpecified;

    public boolean isDiskCapacitySpecified() {
        return diskCapacitySpecified;
    }

    public void unsetDiskCapacity() {
        diskCapacity = null;
        diskCapacitySpecified = false;
    }

    /**
     * The dedicated host's associated unique id. 
     */
    @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;
    }

    /**
     * The capacity that the dedicated host's memory allocation is restricted to. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long memoryCapacity;

    public Long getMemoryCapacity() {
        return memoryCapacity;
    }

    public void setMemoryCapacity(Long memoryCapacity) {
        memoryCapacitySpecified = true;
        this.memoryCapacity = memoryCapacity;
    }

    protected boolean memoryCapacitySpecified;

    public boolean isMemoryCapacitySpecified() {
        return memoryCapacitySpecified;
    }

    public void unsetMemoryCapacity() {
        memoryCapacity = null;
        memoryCapacitySpecified = false;
    }

    /**
     * The date that the dedicated host was last modified. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar modifyDate;

    public GregorianCalendar getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(GregorianCalendar modifyDate) {
        modifyDateSpecified = true;
        this.modifyDate = modifyDate;
    }

    protected boolean modifyDateSpecified;

    public boolean isModifyDateSpecified() {
        return modifyDateSpecified;
    }

    public void unsetModifyDate() {
        modifyDate = null;
        modifyDateSpecified = false;
    }

    /**
     * The dedicated host's name. 
     */
    @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;
    }

    /**
     * A count of the guests associated with the dedicated host.
     */
    @ApiProperty
    protected Long guestCount;

    public Long getGuestCount() {
        return guestCount;
    }

    public void setGuestCount(Long guestCount) {
        this.guestCount = guestCount;
    }

    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());
    }

    /**
     * SoftLayer_Virtual_DedicatedHost models a single tenant virtual host dedicated to a specific account. 
     *
     * @see SoftLayer_Virtual_DedicatedHost
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Virtual_DedicatedHost")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * This method will cancel a dedicated host immediately. 
         *
         * @see SoftLayer_Virtual_DedicatedHost::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * Edit a dedicated host's properties. 
         *
         * @see SoftLayer_Virtual_DedicatedHost::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(DedicatedHost templateObject);

        /**
         * This method will get the available backend routers to order a dedicated host. 
         *
         * @see SoftLayer_Virtual_DedicatedHost::getAvailableRouters
         */
        @ApiMethod
        public List getAvailableRouters(DedicatedHost dedicatedHost);

        /**
         * @see SoftLayer_Virtual_DedicatedHost::getObject
         */
        @ApiMethod(instanceRequired = true)
        public DedicatedHost getObject();

        /**
         * The account that the dedicated host belongs to.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * The container that represents allocations on the dedicated host.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getAllocationStatus
         */
        @ApiMethod(instanceRequired = true)
        public AllocationStatus getAllocationStatus();

        /**
         * The backend router behind dedicated host's pool of resources.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getBackendRouter
         */
        @ApiMethod(instanceRequired = true)
        public Backend getBackendRouter();

        /**
         * The billing item for the dedicated host.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getBillingItem
         */
        @ApiMethod(instanceRequired = true)
        public com.softlayer.api.service.billing.item.virtual.DedicatedHost getBillingItem();

        /**
         * The datacenter that the dedicated host resides in.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getDatacenter
         */
        @ApiMethod(instanceRequired = true)
        public Location getDatacenter();

        /**
         * The guests associated with the dedicated host.
         *
         * @see SoftLayer_Virtual_DedicatedHost::getGuests
         */
        @ApiMethod(instanceRequired = true)
        public List getGuests();

    }

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

        public Future deleteObject(ResponseHandler callback);

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

        public Future editObject(DedicatedHost templateObject, ResponseHandler callback);

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

        public Future getAvailableRouters(DedicatedHost dedicatedHost, 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#getAllocationStatus}
         */
        public Future getAllocationStatus();

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

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

        /**
         * Async callback version of {@link Service#getBackendRouter}
         */
        public Future getBackendRouter(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#getDatacenter}
         */
        public Future getDatacenter();

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

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

        /**
         * Async callback version of {@link Service#getGuests}
         */
        public Future getGuests(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.container.virtual.dedicatedhost.AllocationStatus.Mask allocationStatus() {
            return withSubMask("allocationStatus", com.softlayer.api.service.container.virtual.dedicatedhost.AllocationStatus.Mask.class);
        }

        public com.softlayer.api.service.hardware.router.Backend.Mask backendRouter() {
            return withSubMask("backendRouter", com.softlayer.api.service.hardware.router.Backend.Mask.class);
        }

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

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

        public Guest.Mask guests() {
            return withSubMask("guests", Guest.Mask.class);
        }

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

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

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy