com.softlayer.api.service.scale.LoadBalancer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
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.network.application.delivery.controller.loadbalancer.VirtualServer;
import com.softlayer.api.service.network.application.delivery.controller.loadbalancer.health.Check;
import com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Method;
import com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Type;
import com.softlayer.api.service.scale.Group;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;
/**
* A scale load balancer is a configuration for a load balancer virtual server that autoscaled members will be automatically configured for.
*
* @see SoftLayer_Scale_LoadBalancer
*/
@ApiType("SoftLayer_Scale_LoadBalancer")
public class LoadBalancer extends Entity {
/**
* The percentage of connections allocated to this virtual server.
*/
@ApiProperty
protected Long allocationPercent;
public Long getAllocationPercent() {
return allocationPercent;
}
public void setAllocationPercent(Long allocationPercent) {
this.allocationPercent = allocationPercent;
}
/**
* The health check for this configuration.
*/
@ApiProperty
protected Check healthCheck;
public Check getHealthCheck() {
return healthCheck;
}
public void setHealthCheck(Check healthCheck) {
this.healthCheck = healthCheck;
}
/**
* The routing method.
*/
@ApiProperty
protected Method routingMethod;
public Method getRoutingMethod() {
return routingMethod;
}
public void setRoutingMethod(Method routingMethod) {
this.routingMethod = routingMethod;
}
/**
* The routing type.
*/
@ApiProperty
protected Type routingType;
public Type getRoutingType() {
return routingType;
}
public void setRoutingType(Type routingType) {
this.routingType = routingType;
}
/**
* The group this load balancer configuration is for.
*/
@ApiProperty
protected Group scaleGroup;
public Group getScaleGroup() {
return scaleGroup;
}
public void setScaleGroup(Group scaleGroup) {
this.scaleGroup = scaleGroup;
}
/**
* The ID of the virtual IP address.
*/
@ApiProperty
protected Long virtualIpAddressId;
public Long getVirtualIpAddressId() {
return virtualIpAddressId;
}
public void setVirtualIpAddressId(Long virtualIpAddressId) {
this.virtualIpAddressId = virtualIpAddressId;
}
/**
* The virtual server for this configuration.
*/
@ApiProperty
protected VirtualServer virtualServer;
public VirtualServer getVirtualServer() {
return virtualServer;
}
public void setVirtualServer(VirtualServer virtualServer) {
this.virtualServer = virtualServer;
}
/**
* The port on the virtual server.
*/
@ApiProperty
protected Long virtualServerPort;
public Long getVirtualServerPort() {
return virtualServerPort;
}
public void setVirtualServerPort(Long virtualServerPort) {
this.virtualServerPort = virtualServerPort;
}
/**
* When this load balancer configuration 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;
}
/**
* The identifier for the health check of this load balancer configuration
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long healthCheckId;
public Long getHealthCheckId() {
return healthCheckId;
}
public void setHealthCheckId(Long healthCheckId) {
healthCheckIdSpecified = true;
this.healthCheckId = healthCheckId;
}
protected boolean healthCheckIdSpecified;
public boolean isHealthCheckIdSpecified() {
return healthCheckIdSpecified;
}
public void unsetHealthCheckId() {
healthCheckId = null;
healthCheckIdSpecified = false;
}
/**
* The load balancer configuration'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;
}
/**
* When this load balancer configuration 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 port for this load balancer configuration.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long port;
public Long getPort() {
return port;
}
public void setPort(Long port) {
portSpecified = true;
this.port = port;
}
protected boolean portSpecified;
public boolean isPortSpecified() {
return portSpecified;
}
public void unsetPort() {
port = null;
portSpecified = false;
}
/**
* The identifier of the group this load balancer configuration applies 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;
}
/**
* The identifier of the virtual server this load balancer configuration uses.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long virtualServerId;
public Long getVirtualServerId() {
return virtualServerId;
}
public void setVirtualServerId(Long virtualServerId) {
virtualServerIdSpecified = true;
this.virtualServerId = virtualServerId;
}
protected boolean virtualServerIdSpecified;
public boolean isVirtualServerIdSpecified() {
return virtualServerIdSpecified;
}
public void unsetVirtualServerId() {
virtualServerId = null;
virtualServerIdSpecified = 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 scale load balancer is a configuration for a load balancer virtual server that autoscaled members will be automatically configured for.
*
* @see SoftLayer_Scale_LoadBalancer
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_LoadBalancer")
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 load balancer for a scale group. Once created, the configuration will be used to configure the load balancers for autoscaled members.
*
* If the given virtual server port exists for the given virtual IP address, it is reused here if all the other values match. Otherwise, the virtual server port will be created.
*
* @see SoftLayer_Scale_LoadBalancer::createObject
*/
@ApiMethod
public LoadBalancer createObject(LoadBalancer templateObject);
/**
* Delete this load balancer configuration. Note, this does not affect existing scaled members. Once deleted however, future scaled members will not be load balanced with this configuration.
*
* @see SoftLayer_Scale_LoadBalancer::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* Edit this load balancer configuration. Note, this does not affect existing scaled members. Once edited however, future scaled members will be load balanced with this configuration.
*
* @see SoftLayer_Scale_LoadBalancer::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(LoadBalancer templateObject);
/**
* @see SoftLayer_Scale_LoadBalancer::getObject
*/
@ApiMethod(instanceRequired = true)
public LoadBalancer getObject();
/**
* The percentage of connections allocated to this virtual server.
*
* @see SoftLayer_Scale_LoadBalancer::getAllocationPercent
*/
@ApiMethod(instanceRequired = true)
public Long getAllocationPercent();
/**
* The health check for this configuration.
*
* @see SoftLayer_Scale_LoadBalancer::getHealthCheck
*/
@ApiMethod(instanceRequired = true)
public Check getHealthCheck();
/**
* The routing method.
*
* @see SoftLayer_Scale_LoadBalancer::getRoutingMethod
*/
@ApiMethod(instanceRequired = true)
public Method getRoutingMethod();
/**
* The routing type.
*
* @see SoftLayer_Scale_LoadBalancer::getRoutingType
*/
@ApiMethod(instanceRequired = true)
public Type getRoutingType();
/**
* The group this load balancer configuration is for.
*
* @see SoftLayer_Scale_LoadBalancer::getScaleGroup
*/
@ApiMethod(instanceRequired = true)
public Group getScaleGroup();
/**
* The ID of the virtual IP address.
*
* @see SoftLayer_Scale_LoadBalancer::getVirtualIpAddressId
*/
@ApiMethod(instanceRequired = true)
public Long getVirtualIpAddressId();
/**
* The virtual server for this configuration.
*
* @see SoftLayer_Scale_LoadBalancer::getVirtualServer
*/
@ApiMethod(instanceRequired = true)
public VirtualServer getVirtualServer();
/**
* The port on the virtual server.
*
* @see SoftLayer_Scale_LoadBalancer::getVirtualServerPort
*/
@ApiMethod(instanceRequired = true)
public Long getVirtualServerPort();
}
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(LoadBalancer templateObject);
public Future> createObject(LoadBalancer templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(LoadBalancer templateObject);
public Future> editObject(LoadBalancer templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAllocationPercent}
*/
public Future getAllocationPercent();
/**
* Async callback version of {@link Service#getAllocationPercent}
*/
public Future> getAllocationPercent(ResponseHandler callback);
/**
* Async version of {@link Service#getHealthCheck}
*/
public Future getHealthCheck();
/**
* Async callback version of {@link Service#getHealthCheck}
*/
public Future> getHealthCheck(ResponseHandler callback);
/**
* Async version of {@link Service#getRoutingMethod}
*/
public Future getRoutingMethod();
/**
* Async callback version of {@link Service#getRoutingMethod}
*/
public Future> getRoutingMethod(ResponseHandler callback);
/**
* Async version of {@link Service#getRoutingType}
*/
public Future getRoutingType();
/**
* Async callback version of {@link Service#getRoutingType}
*/
public Future> getRoutingType(ResponseHandler callback);
/**
* Async version of {@link Service#getScaleGroup}
*/
public Future getScaleGroup();
/**
* Async callback version of {@link Service#getScaleGroup}
*/
public Future> getScaleGroup(ResponseHandler callback);
/**
* Async version of {@link Service#getVirtualIpAddressId}
*/
public Future getVirtualIpAddressId();
/**
* Async callback version of {@link Service#getVirtualIpAddressId}
*/
public Future> getVirtualIpAddressId(ResponseHandler callback);
/**
* Async version of {@link Service#getVirtualServer}
*/
public Future getVirtualServer();
/**
* Async callback version of {@link Service#getVirtualServer}
*/
public Future> getVirtualServer(ResponseHandler callback);
/**
* Async version of {@link Service#getVirtualServerPort}
*/
public Future getVirtualServerPort();
/**
* Async callback version of {@link Service#getVirtualServerPort}
*/
public Future> getVirtualServerPort(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask allocationPercent() {
withLocalProperty("allocationPercent");
return this;
}
public com.softlayer.api.service.network.application.delivery.controller.loadbalancer.health.Check.Mask healthCheck() {
return withSubMask("healthCheck", com.softlayer.api.service.network.application.delivery.controller.loadbalancer.health.Check.Mask.class);
}
public com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Method.Mask routingMethod() {
return withSubMask("routingMethod", com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Method.Mask.class);
}
public com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Type.Mask routingType() {
return withSubMask("routingType", com.softlayer.api.service.network.application.delivery.controller.loadbalancer.routing.Type.Mask.class);
}
public Group.Mask scaleGroup() {
return withSubMask("scaleGroup", Group.Mask.class);
}
public Mask virtualIpAddressId() {
withLocalProperty("virtualIpAddressId");
return this;
}
public com.softlayer.api.service.network.application.delivery.controller.loadbalancer.VirtualServer.Mask virtualServer() {
return withSubMask("virtualServer", com.softlayer.api.service.network.application.delivery.controller.loadbalancer.VirtualServer.Mask.class);
}
public Mask virtualServerPort() {
withLocalProperty("virtualServerPort");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask deleteFlag() {
withLocalProperty("deleteFlag");
return this;
}
public Mask healthCheckId() {
withLocalProperty("healthCheckId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask port() {
withLocalProperty("port");
return this;
}
public Mask scaleGroupId() {
withLocalProperty("scaleGroupId");
return this;
}
public Mask virtualServerId() {
withLocalProperty("virtualServerId");
return this;
}
}
}