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

com.softlayer.api.service.network.gateway.Member Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.network.gateway;

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.Hardware;
import com.softlayer.api.service.network.Gateway;
import com.softlayer.api.service.network.gateway.member.Attribute;
import java.util.List;
import java.util.concurrent.Future;

/**
 * A network gateway member is a device that serves as a gateway. Once the hardware becomes a member of the gateway, only a reclaim can remove it. A reclaim on the last member of the gateway triggers a reclaim of the entire gateway. 
 *
 * @see SoftLayer_Network_Gateway_Member
 */
@ApiType("SoftLayer_Network_Gateway_Member")
public class Member extends Entity {

    /**
     * The attributes for this member.
     */
    @ApiProperty
    protected Attribute attributes;

    public Attribute getAttributes() {
        return attributes;
    }

    public void setAttributes(Attribute attributes) {
        this.attributes = attributes;
    }

    /**
     * The device for this member.
     */
    @ApiProperty
    protected Hardware hardware;

    public Hardware getHardware() {
        return hardware;
    }

    public void setHardware(Hardware hardware) {
        this.hardware = hardware;
    }

    /**
     * The gateway this member belongs to.
     */
    @ApiProperty
    protected Gateway networkGateway;

    public Gateway getNetworkGateway() {
        return networkGateway;
    }

    public void setNetworkGateway(Gateway networkGateway) {
        this.networkGateway = networkGateway;
    }

    /**
     * The internal identifier of the hardware for this member. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long hardwareId;

    public Long getHardwareId() {
        return hardwareId;
    }

    public void setHardwareId(Long hardwareId) {
        hardwareIdSpecified = true;
        this.hardwareId = hardwareId;
    }

    protected boolean hardwareIdSpecified;

    public boolean isHardwareIdSpecified() {
        return hardwareIdSpecified;
    }

    public void unsetHardwareId() {
        hardwareId = null;
        hardwareIdSpecified = false;
    }

    /**
     * A gateway 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 internal identifier of the gateway this member belongs to. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long networkGatewayId;

    public Long getNetworkGatewayId() {
        return networkGatewayId;
    }

    public void setNetworkGatewayId(Long networkGatewayId) {
        networkGatewayIdSpecified = true;
        this.networkGatewayId = networkGatewayId;
    }

    protected boolean networkGatewayIdSpecified;

    public boolean isNetworkGatewayIdSpecified() {
        return networkGatewayIdSpecified;
    }

    public void unsetNetworkGatewayId() {
        networkGatewayId = null;
        networkGatewayIdSpecified = false;
    }

    /**
     * The priority for this gateway member. This is set internally and cannot be provided on create. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long priority;

    public Long getPriority() {
        return priority;
    }

    public void setPriority(Long priority) {
        prioritySpecified = true;
        this.priority = priority;
    }

    protected boolean prioritySpecified;

    public boolean isPrioritySpecified() {
        return prioritySpecified;
    }

    public void unsetPriority() {
        priority = null;
        prioritySpecified = 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());
    }

    /**
     * A network gateway member is a device that serves as a gateway. Once the hardware becomes a member of the gateway, only a reclaim can remove it. A reclaim on the last member of the gateway triggers a reclaim of the entire gateway. 
     *
     * @see SoftLayer_Network_Gateway_Member
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Network_Gateway_Member")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Create a new hardware member on the gateway. This also asynchronously sets up the network for this member. Progress of this process can be monitored via the gateway status. All members created with this object must have no VLANs attached. 
         *
         * @see SoftLayer_Network_Gateway_Member::createObject
         */
        @ApiMethod
        public Member createObject(Member templateObject);

        /**
         * Create multiple new hardware members on the gateway. This also asynchronously sets up the network for the members. Progress of this process can be monitored via the gateway status. All members created with this object must have no VLANs attached. 
         *
         * @see SoftLayer_Network_Gateway_Member::createObjects
         */
        @ApiMethod
        public List createObjects(List templateObjects);

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

        /**
         * The attributes for this member.
         *
         * @see SoftLayer_Network_Gateway_Member::getAttributes
         */
        @ApiMethod(instanceRequired = true)
        public Attribute getAttributes();

        /**
         * The device for this member.
         *
         * @see SoftLayer_Network_Gateway_Member::getHardware
         */
        @ApiMethod(instanceRequired = true)
        public Hardware getHardware();

        /**
         * The gateway this member belongs to.
         *
         * @see SoftLayer_Network_Gateway_Member::getNetworkGateway
         */
        @ApiMethod(instanceRequired = true)
        public Gateway getNetworkGateway();

    }

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

        public Future createObject(Member templateObject, ResponseHandler callback);

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

        public Future createObjects(List templateObjects, ResponseHandler> callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

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

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

    }

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

        public com.softlayer.api.service.network.gateway.member.Attribute.Mask attributes() {
            return withSubMask("attributes", com.softlayer.api.service.network.gateway.member.Attribute.Mask.class);
        }

        public com.softlayer.api.service.Hardware.Mask hardware() {
            return withSubMask("hardware", com.softlayer.api.service.Hardware.Mask.class);
        }

        public com.softlayer.api.service.network.Gateway.Mask networkGateway() {
            return withSubMask("networkGateway", com.softlayer.api.service.network.Gateway.Mask.class);
        }

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy