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

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

There is a newer version: 0.3.4
Show 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 member of a scale group. Members are the volatile scaling units of a scale group. This cannot be used by itself, one of the more specific member types and services must be used. 
 *
 * @see SoftLayer_Scale_Member
 */
@ApiType("SoftLayer_Scale_Member")
public class Member extends Entity {

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

    public Group getScaleGroup() {
        return scaleGroup;
    }

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

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

    /**
     * A member'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 member 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 member of a scale group. Members are the volatile scaling units of a scale group. This cannot be used by itself, one of the more specific member types and services must be used. 
     *
     * @see SoftLayer_Scale_Member
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Member")
    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_Member::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * @see SoftLayer_Scale_Member::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Member getObject();

        /**
         * The group this member belongs to.
         *
         * @see SoftLayer_Scale_Member::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 id() {
            withLocalProperty("id");
            return this;
        }

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy