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

com.softlayer.api.service.virtual.reservedcapacitygroup.Instance Maven / Gradle / Ivy

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

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.Item;
import com.softlayer.api.service.virtual.Guest;
import com.softlayer.api.service.virtual.ReservedCapacityGroup;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;

/**
 * This data type presents the structure for a virtual reserved capacity group instance. 
 *
 * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance
 */
@ApiType("SoftLayer_Virtual_ReservedCapacityGroup_Instance")
public class Instance extends Entity {

    /**
     * Flag to indecate whether or not the reserved instance is available or not.
     */
    @ApiProperty
    protected Boolean availableFlag;

    public Boolean getAvailableFlag() {
        return availableFlag;
    }

    public void setAvailableFlag(Boolean availableFlag) {
        this.availableFlag = availableFlag;
    }

    /**
     * The billing item for the reserved capacity group instance.
     */
    @ApiProperty
    protected Item billingItem;

    public Item getBillingItem() {
        return billingItem;
    }

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

    /**
     * The virtual guest associated with this reserved capacity group instance.
     */
    @ApiProperty
    protected Guest guest;

    public Guest getGuest() {
        return guest;
    }

    public void setGuest(Guest guest) {
        this.guest = guest;
    }

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

    public ReservedCapacityGroup getReservedCapacityGroup() {
        return reservedCapacityGroup;
    }

    public void setReservedCapacityGroup(ReservedCapacityGroup reservedCapacityGroup) {
        this.reservedCapacityGroup = reservedCapacityGroup;
    }

    /**
     * The date that the reserved capacity group instance 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 virtual guest ID associated with this reserved capacity group instance. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long guestId;

    public Long getGuestId() {
        return guestId;
    }

    public void setGuestId(Long guestId) {
        guestIdSpecified = true;
        this.guestId = guestId;
    }

    protected boolean guestIdSpecified;

    public boolean isGuestIdSpecified() {
        return guestIdSpecified;
    }

    public void unsetGuestId() {
        guestId = null;
        guestIdSpecified = false;
    }

    /**
     * The reserved capacity group instance'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 instance 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 ID of the reserved capacity group this instance is associated with. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long reservedCapacityGroupId;

    public Long getReservedCapacityGroupId() {
        return reservedCapacityGroupId;
    }

    public void setReservedCapacityGroupId(Long reservedCapacityGroupId) {
        reservedCapacityGroupIdSpecified = true;
        this.reservedCapacityGroupId = reservedCapacityGroupId;
    }

    protected boolean reservedCapacityGroupIdSpecified;

    public boolean isReservedCapacityGroupIdSpecified() {
        return reservedCapacityGroupIdSpecified;
    }

    public void unsetReservedCapacityGroupId() {
        reservedCapacityGroupId = null;
        reservedCapacityGroupIdSpecified = 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());
    }

    /**
     * SoftLayer_Virtual_ReservedCapacityGroup_Instance reserves capacity for a single instance of a reserved capacity group. 
     *
     * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Virtual_ReservedCapacityGroup_Instance")
    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_Virtual_ReservedCapacityGroup_Instance::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Instance getObject();

        /**
         * Flag to indecate whether or not the reserved instance is available or not.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance::getAvailableFlag
         */
        @ApiMethod(instanceRequired = true)
        public Boolean getAvailableFlag();

        /**
         * The billing item for the reserved capacity group instance.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance::getBillingItem
         */
        @ApiMethod(instanceRequired = true)
        public Item getBillingItem();

        /**
         * The virtual guest associated with this reserved capacity group instance.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance::getGuest
         */
        @ApiMethod(instanceRequired = true)
        public Guest getGuest();

        /**
         * The reserved instances that are members of this reserved capacity group.
         *
         * @see SoftLayer_Virtual_ReservedCapacityGroup_Instance::getReservedCapacityGroup
         */
        @ApiMethod(instanceRequired = true)
        public ReservedCapacityGroup getReservedCapacityGroup();

    }

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

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

    }

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

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

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

        public com.softlayer.api.service.virtual.Guest.Mask guest() {
            return withSubMask("guest", com.softlayer.api.service.virtual.Guest.Mask.class);
        }

        public com.softlayer.api.service.virtual.ReservedCapacityGroup.Mask reservedCapacityGroup() {
            return withSubMask("reservedCapacityGroup", com.softlayer.api.service.virtual.ReservedCapacityGroup.Mask.class);
        }

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy