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

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

The 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.router.Backend;
import com.softlayer.api.service.virtual.reservedcapacitygroup.Instance;
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 virtual reserved capacity group. 
 *
 * @see SoftLayer_Virtual_ReservedCapacityGroup
 */
@ApiType("SoftLayer_Virtual_ReservedCapacityGroup")
public class ReservedCapacityGroup extends Entity {

    /**
     * The account that the reserved capacity group is implemented on.
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

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

    /**
     * The instances available for guest provisions on this reserved capacity group.
     */
    @ApiProperty
    protected List availableInstances;

    public List getAvailableInstances() {
        if (availableInstances == null) {
            availableInstances = new ArrayList();
        }
        return availableInstances;
    }

    /**
     * The router the reserved capacity group is implemented on.
     */
    @ApiProperty
    protected Backend backendRouter;

    public Backend getBackendRouter() {
        return backendRouter;
    }

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

    /**
     * The guest instances that are members of this reserved capacity group.
     */
    @ApiProperty
    protected List instances;

    public List getInstances() {
        if (instances == null) {
            instances = new ArrayList();
        }
        return instances;
    }

    /**
     * The number of instances that are members of this reserved capacity group.
     */
    @ApiProperty
    protected Long instancesCount;

    public Long getInstancesCount() {
        return instancesCount;
    }

    public void setInstancesCount(Long instancesCount) {
        this.instancesCount = instancesCount;
    }

    /**
     * The instances already occupied by a guest on this reserved capacity group.
     */
    @ApiProperty
    protected List occupiedInstances;

    public List getOccupiedInstances() {
        if (occupiedInstances == null) {
            occupiedInstances = new ArrayList();
        }
        return occupiedInstances;
    }

    /**
     * The unique ID of the account that created the reserved capacity group. 
     */
    @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 reserved capacity group's backend router's associated unique ID. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long backendRouterId;

    public Long getBackendRouterId() {
        return backendRouterId;
    }

    public void setBackendRouterId(Long backendRouterId) {
        backendRouterIdSpecified = true;
        this.backendRouterId = backendRouterId;
    }

    protected boolean backendRouterIdSpecified;

    public boolean isBackendRouterIdSpecified() {
        return backendRouterIdSpecified;
    }

    public void unsetBackendRouterId() {
        backendRouterId = null;
        backendRouterIdSpecified = false;
    }

    /**
     * The date that the reserved capacity group 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 reserved capacity group'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 date that the reserved capacity group 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 reserved capacity group'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 instances available for guest provisions on this reserved capacity group.
     */
    @ApiProperty
    protected Long availableInstanceCount;

    public Long getAvailableInstanceCount() {
        return availableInstanceCount;
    }

    public void setAvailableInstanceCount(Long availableInstanceCount) {
        this.availableInstanceCount = availableInstanceCount;
    }

    /**
     * A count of the guest instances that are members of this reserved capacity group.
     */
    @ApiProperty
    protected Long instanceCount;

    public Long getInstanceCount() {
        return instanceCount;
    }

    public void setInstanceCount(Long instanceCount) {
        this.instanceCount = instanceCount;
    }

    /**
     * A count of the instances already occupied by a guest on this reserved capacity group.
     */
    @ApiProperty
    protected Long occupiedInstanceCount;

    public Long getOccupiedInstanceCount() {
        return occupiedInstanceCount;
    }

    public void setOccupiedInstanceCount(Long occupiedInstanceCount) {
        this.occupiedInstanceCount = occupiedInstanceCount;
    }

    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_ReservedCapacityGroup reserves capacity for a group of guests that have not yet been provisioned. 
     *
     * @see SoftLayer_Virtual_ReservedCapacityGroup
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Virtual_ReservedCapacityGroup")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Update a reserved capacity group. 
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(ReservedCapacityGroup templateObject);

        /**
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getObject
         */
        @ApiMethod(instanceRequired = true)
        public ReservedCapacityGroup getObject();

        /**
         * The account that the reserved capacity group is implemented on.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * The instances available for guest provisions on this reserved capacity group.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getAvailableInstances
         */
        @ApiMethod(instanceRequired = true)
        public List getAvailableInstances();

        /**
         * The router the reserved capacity group is implemented on.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getBackendRouter
         */
        @ApiMethod(instanceRequired = true)
        public Backend getBackendRouter();

        /**
         * The guest instances that are members of this reserved capacity group.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getInstances
         */
        @ApiMethod(instanceRequired = true)
        public List getInstances();

        /**
         * The number of instances that are members of this reserved capacity group.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getInstancesCount
         */
        @ApiMethod(instanceRequired = true)
        public Long getInstancesCount();

        /**
         * The instances already occupied by a guest on this reserved capacity group.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup::getOccupiedInstances
         */
        @ApiMethod(instanceRequired = true)
        public List getOccupiedInstances();

    }

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

        public Future editObject(ReservedCapacityGroup templateObject, 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#getAvailableInstances}
         */
        public Future> getAvailableInstances();

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

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

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

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

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

        /**
         * Async callback version of {@link Service#getOccupiedInstances}
         */
        public Future getOccupiedInstances(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.virtual.reservedcapacitygroup.Instance.Mask availableInstances() {
            return withSubMask("availableInstances", com.softlayer.api.service.virtual.reservedcapacitygroup.Instance.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.virtual.reservedcapacitygroup.Instance.Mask instances() {
            return withSubMask("instances", com.softlayer.api.service.virtual.reservedcapacitygroup.Instance.Mask.class);
        }

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

        public com.softlayer.api.service.virtual.reservedcapacitygroup.Instance.Mask occupiedInstances() {
            return withSubMask("occupiedInstances", com.softlayer.api.service.virtual.reservedcapacitygroup.Instance.Mask.class);
        }

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

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

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy