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

com.softlayer.api.service.scale.member.virtual.Guest Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.scale.member.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.scale.Member;
import java.util.concurrent.Future;

/**
 * A guest member is a scaled guest on a scale group. It is added either automatically or manually based on group settings. It can be removed here, but is usually best removed using one of the scaling features of the group as a whole. 
 *
 * @see SoftLayer_Scale_Member_Virtual_Guest
 */
@ApiType("SoftLayer_Scale_Member_Virtual_Guest")
public class Guest extends Member {

    /**
     * The guest for this member.
     */
    @ApiProperty
    protected com.softlayer.api.service.virtual.Guest virtualGuest;

    public com.softlayer.api.service.virtual.Guest getVirtualGuest() {
        return virtualGuest;
    }

    public void setVirtualGuest(com.softlayer.api.service.virtual.Guest virtualGuest) {
        this.virtualGuest = virtualGuest;
    }

    /**
     * The identifier of the guest for this member.
     */
    @ApiProperty
    protected Long virtualGuestId;

    public Long getVirtualGuestId() {
        return virtualGuestId;
    }

    public void setVirtualGuestId(Long virtualGuestId) {
        this.virtualGuestId = virtualGuestId;
    }

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

    /**
     * A guest member is a scaled guest on a scale group. It is added either automatically or manually based on group settings. It can be removed here, but is usually best removed using one of the scaling features of the group as a whole. 
     *
     * @see SoftLayer_Scale_Member_Virtual_Guest
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Member_Virtual_Guest")
    public static interface Service extends Member.Service {

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

        /**
         * Delete this group member. Note, this can only be done on an active group when it wont cause the group to go below its minimumMemberCount. This is not the recommended way to delete members. Instead, users should invoke scale(-1) on SoftLayer_Scale_Group so it can choose the best guest member to remove. 
         *
         * @see SoftLayer_Scale_Member_Virtual_Guest::deleteObject
         */
        @ApiMethod(value = "deleteObject", instanceRequired = true)
        public Boolean deleteObjectForGuest();

        /**
         * @see SoftLayer_Scale_Member_Virtual_Guest::getObject
         */
        @ApiMethod(value = "getObject", instanceRequired = true)
        public Guest getObjectForGuest();

        /**
         * The guest for this member.
         *
         * @see SoftLayer_Scale_Member_Virtual_Guest::getVirtualGuest
         */
        @ApiMethod(instanceRequired = true)
        public com.softlayer.api.service.virtual.Guest getVirtualGuest();

        /**
         * The identifier of the guest for this member.
         *
         * @see SoftLayer_Scale_Member_Virtual_Guest::getVirtualGuestId
         */
        @ApiMethod(instanceRequired = true)
        public Long getVirtualGuestId();

    }

    public static interface ServiceAsync extends Member.ServiceAsync {

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

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

        public Future deleteObjectForGuest(ResponseHandler callback);

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

        public Future getObjectForGuest(ResponseHandler callback);

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

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

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

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

    }

    public static class Mask extends com.softlayer.api.service.scale.Member.Mask {

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy