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

com.softlayer.api.service.scale.Asset Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.scale;

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.scale.Group;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;

/**
 * The base asset of a scale group. Assets are fixed, non-volatile units of a scale group. They are pinned to the group and will not be automatically added or removed. Their primary purpose is to provide information for the policies to use to determine when to scale members. 
 *
 * @see SoftLayer_Scale_Asset
 */
@ApiType("SoftLayer_Scale_Asset")
public class Asset extends Entity {

    /**
     * The group this asset belongs to.
     */
    @ApiProperty
    protected Group scaleGroup;

    public Group getScaleGroup() {
        return scaleGroup;
    }

    public void setScaleGroup(Group scaleGroup) {
        this.scaleGroup = scaleGroup;
    }

    /**
     * When this asset 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;
    }

    /**
     * When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Boolean deleteFlag;

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        deleteFlagSpecified = true;
        this.deleteFlag = deleteFlag;
    }

    protected boolean deleteFlagSpecified;

    public boolean isDeleteFlagSpecified() {
        return deleteFlagSpecified;
    }

    public void unsetDeleteFlag() {
        deleteFlag = null;
        deleteFlagSpecified = false;
    }

    /**
     * An asset's internal identifier.
     */
    @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 identifier of the group this asset belongs to.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long scaleGroupId;

    public Long getScaleGroupId() {
        return scaleGroupId;
    }

    public void setScaleGroupId(Long scaleGroupId) {
        scaleGroupIdSpecified = true;
        this.scaleGroupId = scaleGroupId;
    }

    protected boolean scaleGroupIdSpecified;

    public boolean isScaleGroupIdSpecified() {
        return scaleGroupIdSpecified;
    }

    public void unsetScaleGroupId() {
        scaleGroupId = null;
        scaleGroupIdSpecified = 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());
    }

    /**
     * The base asset of a scale group. Assets are fixed, non-volatile units of a scale group. They are pinned to the group and will not be automatically added or removed. Their primary purpose is to provide information for the policies to use to determine when to scale members. 
     *
     * @see SoftLayer_Scale_Asset
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Asset")
    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_Scale_Asset::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * @see SoftLayer_Scale_Asset::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Asset getObject();

        /**
         * The group this asset belongs to.
         *
         * @see SoftLayer_Scale_Asset::getScaleGroup
         */
        @ApiMethod(instanceRequired = true)
        public Group getScaleGroup();

    }

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

        public Future getObject(ResponseHandler callback);

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

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

    }

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

        public Group.Mask scaleGroup() {
            return withSubMask("scaleGroup", Group.Mask.class);
        }

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy