com.softlayer.api.service.network.loadbalancer.VirtualIpAddress 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
package com.softlayer.api.service.network.loadbalancer;
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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.billing.Item;
import com.softlayer.api.service.network.loadbalancer.LoadBalancerService;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Network_LoadBalancer_VirtualIpAddress data type contains all the information relating to a specific load balancer assigned to a customer account.
*
* Information retained on the object itself is the virtual IP address, load balancing method, and any notes that are related to the load balancer. There is also an array of SoftLayer_Network_LoadBalancer_Service objects, which represent the load balancer services, explained more fully in the SoftLayer_Network_LoadBalancer_Service documentation.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress
*/
@ApiType("SoftLayer_Network_LoadBalancer_VirtualIpAddress")
public class VirtualIpAddress extends Entity {
/**
* The account that owns this load balancer.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The current billing item for the Load Balancer.
*/
@ApiProperty
protected Item billingItem;
public Item getBillingItem() {
return billingItem;
}
public void setBillingItem(Item billingItem) {
this.billingItem = billingItem;
}
/**
* If false, this VIP and associated services may be edited via the portal or the API. If true, you must configure this VIP manually on the device.
*/
@ApiProperty
protected Long customerManagedFlag;
public Long getCustomerManagedFlag() {
return customerManagedFlag;
}
public void setCustomerManagedFlag(Long customerManagedFlag) {
this.customerManagedFlag = customerManagedFlag;
}
/**
* A flag indicating that the load balancer is a managed resource.
*/
@ApiProperty
protected Boolean managedResourceFlag;
public Boolean getManagedResourceFlag() {
return managedResourceFlag;
}
public void setManagedResourceFlag(Boolean managedResourceFlag) {
this.managedResourceFlag = managedResourceFlag;
}
/**
* the services on this load balancer.
*/
@ApiProperty
protected List services;
public List getServices() {
if (services == null) {
services = new ArrayList();
}
return services;
}
/**
* Connection limit on this VIP. Can be upgraded through the upgradeConnectionLimit() function
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long connectionLimit;
public Long getConnectionLimit() {
return connectionLimit;
}
public void setConnectionLimit(Long connectionLimit) {
connectionLimitSpecified = true;
this.connectionLimit = connectionLimit;
}
protected boolean connectionLimitSpecified;
public boolean isConnectionLimitSpecified() {
return connectionLimitSpecified;
}
public void unsetConnectionLimit() {
connectionLimit = null;
connectionLimitSpecified = false;
}
/**
* Unique ID for this object, used for the getObject method, and must be set if you are editing this object.
*/
@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 load balancing method that determines which server is used "next" by the load balancer. The method is stored in an abbreviated form, represented in parentheses after the full name. Methods include: Round Robin (Value "rr"): Each server is used sequentially in a circular queue Shortest Response (Value "sr"): The server with the lowest ping at the last health check gets the next request Least Connections (Value "lc"): The server with the least current connections is given the next request Persistent IP - Round Robin (Value "pi"): The same server will be returned to a request during a users session. Servers are chosen through round robin. Persistent IP - Shortest Response (Value "pi-sr"): The same server will be returned to a request during a users session. Servers are chosen through shortest response. Persistent IP - Least Connections (Value "pi-lc"): The same server will be returned to a request during a users session. Servers are chosen through least connections. Insert Cookie - Round Robin (Value "ic"): Inserts a cookie into the HTTP stream that will tie that client to a particular balanced server. Servers are chosen through round robin. Insert Cookie - Shortest Response (Value "ic-sr"): Inserts a cookie into the HTTP stream that will tie that client to a particular balanced server. Servers are chosen through shortest response. Insert Cookie - Least Connections (Value "ic-lc"): Inserts a cookie into the HTTP stream that will tie that client to a particular balanced server. Servers are chosen through least connections.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String loadBalancingMethod;
public String getLoadBalancingMethod() {
return loadBalancingMethod;
}
public void setLoadBalancingMethod(String loadBalancingMethod) {
loadBalancingMethodSpecified = true;
this.loadBalancingMethod = loadBalancingMethod;
}
protected boolean loadBalancingMethodSpecified;
public boolean isLoadBalancingMethodSpecified() {
return loadBalancingMethodSpecified;
}
public void unsetLoadBalancingMethod() {
loadBalancingMethod = null;
loadBalancingMethodSpecified = false;
}
/**
* A human readable version of loadBalancingMethod, intended mainly for API users.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String loadBalancingMethodFullName;
public String getLoadBalancingMethodFullName() {
return loadBalancingMethodFullName;
}
public void setLoadBalancingMethodFullName(String loadBalancingMethodFullName) {
loadBalancingMethodFullNameSpecified = true;
this.loadBalancingMethodFullName = loadBalancingMethodFullName;
}
protected boolean loadBalancingMethodFullNameSpecified;
public boolean isLoadBalancingMethodFullNameSpecified() {
return loadBalancingMethodFullNameSpecified;
}
public void unsetLoadBalancingMethodFullName() {
loadBalancingMethodFullName = null;
loadBalancingMethodFullNameSpecified = false;
}
/**
* Date this load balancer 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 name of the load balancer instance
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String name;
public String getName() {
return name;
}
public void setName(String name) {
nameSpecified = true;
this.name = name;
}
protected boolean nameSpecified;
public boolean isNameSpecified() {
return nameSpecified;
}
public void unsetName() {
name = null;
nameSpecified = false;
}
/**
* User-created notes on this load balancer.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String notes;
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
notesSpecified = true;
this.notes = notes;
}
protected boolean notesSpecified;
public boolean isNotesSpecified() {
return notesSpecified;
}
public void unsetNotes() {
notes = null;
notesSpecified = false;
}
/**
* The unique identifier of the Security Certificate to be utilized when SSL support is enabled.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long securityCertificateId;
public Long getSecurityCertificateId() {
return securityCertificateId;
}
public void setSecurityCertificateId(Long securityCertificateId) {
securityCertificateIdSpecified = true;
this.securityCertificateId = securityCertificateId;
}
protected boolean securityCertificateIdSpecified;
public boolean isSecurityCertificateIdSpecified() {
return securityCertificateIdSpecified;
}
public void unsetSecurityCertificateId() {
securityCertificateId = null;
securityCertificateIdSpecified = false;
}
/**
* This is the port for incoming traffic.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long sourcePort;
public Long getSourcePort() {
return sourcePort;
}
public void setSourcePort(Long sourcePort) {
sourcePortSpecified = true;
this.sourcePort = sourcePort;
}
protected boolean sourcePortSpecified;
public boolean isSourcePortSpecified() {
return sourcePortSpecified;
}
public void unsetSourcePort() {
sourcePort = null;
sourcePortSpecified = false;
}
/**
* The connection type of this VIP. Valid values are HTTP, FTP, TCP, UDP, and DNS.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String type;
public String getType() {
return type;
}
public void setType(String type) {
typeSpecified = true;
this.type = type;
}
protected boolean typeSpecified;
public boolean isTypeSpecified() {
return typeSpecified;
}
public void unsetType() {
type = null;
typeSpecified = false;
}
/**
* The virtual, public-facing IP address for your load balancer. This is the address of all incoming traffic
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String virtualIpAddress;
public String getVirtualIpAddress() {
return virtualIpAddress;
}
public void setVirtualIpAddress(String virtualIpAddress) {
virtualIpAddressSpecified = true;
this.virtualIpAddress = virtualIpAddress;
}
protected boolean virtualIpAddressSpecified;
public boolean isVirtualIpAddressSpecified() {
return virtualIpAddressSpecified;
}
public void unsetVirtualIpAddress() {
virtualIpAddress = null;
virtualIpAddressSpecified = false;
}
/**
* A count of the services on this load balancer.
*/
@ApiProperty
protected Long serviceCount;
public Long getServiceCount() {
return serviceCount;
}
public void setServiceCount(Long serviceCount) {
this.serviceCount = serviceCount;
}
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());
}
/**
* Each SoftLayer customer that has purchased a load balancer will have one defined in the SoftLayer_Network_LoadBalancer_VirtualIpAddress service. Load balancers have a virtual IP address and a number of SoftLayer_Network_LoadBalancer_Service objects associated with them. The SoftLayer_Network_LoadBalancer_VirtualIpAddress object is the only way for a customer to make changes to their load balancer service.
*
* Load balancers can be upgraded by using the upgradeConnectionLimit function, but this will upgrade your billing accordingly. Downgrades are currently not supported, please open a ticket to accomplish a downgrade.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_LoadBalancer_VirtualIpAddress")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Disable a Virtual IP Address, removing it from load balancer rotation and denying all connections to that IP address.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::disable
*/
@ApiMethod(instanceRequired = true)
public Boolean disable();
/**
* Like any other API object, the load balancers can have their exposed properties edited by passing in a modified version of the object. The load balancer object also can modify its services in this way. Simply request the load balancer object you wish to edit, then modify the objects in the services array and pass the modified object to this function. WARNING: Services cannot be deleted in this manner, you must call deleteObject() on the service to physically remove them from the load balancer.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(VirtualIpAddress templateObject);
/**
* Enable a disabled Virtual IP Address, allowing connections back to the IP address.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::enable
*/
@ApiMethod(instanceRequired = true)
public Boolean enable();
/**
* getObject retrieves the SoftLayer_Network_LoadBalancer_VirtualIpAddress object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Network_LoadBalancer_VirtualIpAddress service. You can only retrieve Load Balancers assigned to your account.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getObject
*/
@ApiMethod(instanceRequired = true)
public VirtualIpAddress getObject();
/**
* Quickly remove all active external connections to a Virtual IP Address.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::kickAllConnections
*/
@ApiMethod(instanceRequired = true)
public Boolean kickAllConnections();
/**
* Upgrades the connection limit on the VirtualIp and changes the billing item on your account to reflect the change. This function will only upgrade you to the next "level" of service. The next level follows this pattern Current Level => Next Level 50 100 100 200 200 500 500 1000 1000 1200 1200 1500 1500 2000 2000 2500 2500 3000
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::upgradeConnectionLimit
*/
@ApiMethod(instanceRequired = true)
public Boolean upgradeConnectionLimit();
/**
* The account that owns this load balancer.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The current billing item for the Load Balancer.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getBillingItem
*/
@ApiMethod(instanceRequired = true)
public Item getBillingItem();
/**
* If false, this VIP and associated services may be edited via the portal or the API. If true, you must configure this VIP manually on the device.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getCustomerManagedFlag
*/
@ApiMethod(instanceRequired = true)
public Long getCustomerManagedFlag();
/**
* A flag indicating that the load balancer is a managed resource.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getManagedResourceFlag
*/
@ApiMethod(instanceRequired = true)
public Boolean getManagedResourceFlag();
/**
* the services on this load balancer.
*
* @see SoftLayer_Network_LoadBalancer_VirtualIpAddress::getServices
*/
@ApiMethod(instanceRequired = true)
public List getServices();
}
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#disable}
*/
public Future disable();
public Future> disable(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(VirtualIpAddress templateObject);
public Future> editObject(VirtualIpAddress templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#enable}
*/
public Future enable();
public Future> enable(ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#kickAllConnections}
*/
public Future kickAllConnections();
public Future> kickAllConnections(ResponseHandler callback);
/**
* Async version of {@link Service#upgradeConnectionLimit}
*/
public Future upgradeConnectionLimit();
public Future> upgradeConnectionLimit(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getBillingItem}
*/
public Future- getBillingItem();
/**
* Async callback version of {@link Service#getBillingItem}
*/
public Future> getBillingItem(ResponseHandler
- callback);
/**
* Async version of {@link Service#getCustomerManagedFlag}
*/
public Future
getCustomerManagedFlag();
/**
* Async callback version of {@link Service#getCustomerManagedFlag}
*/
public Future> getCustomerManagedFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getManagedResourceFlag}
*/
public Future getManagedResourceFlag();
/**
* Async callback version of {@link Service#getManagedResourceFlag}
*/
public Future> getManagedResourceFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getServices}
*/
public Future> getServices();
/**
* Async callback version of {@link Service#getServices}
*/
public Future> getServices(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.billing.Item.Mask billingItem() {
return withSubMask("billingItem", com.softlayer.api.service.billing.Item.Mask.class);
}
public Mask customerManagedFlag() {
withLocalProperty("customerManagedFlag");
return this;
}
public Mask managedResourceFlag() {
withLocalProperty("managedResourceFlag");
return this;
}
public LoadBalancerService.Mask services() {
return withSubMask("services", LoadBalancerService.Mask.class);
}
public Mask connectionLimit() {
withLocalProperty("connectionLimit");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask loadBalancingMethod() {
withLocalProperty("loadBalancingMethod");
return this;
}
public Mask loadBalancingMethodFullName() {
withLocalProperty("loadBalancingMethodFullName");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
public Mask securityCertificateId() {
withLocalProperty("securityCertificateId");
return this;
}
public Mask sourcePort() {
withLocalProperty("sourcePort");
return this;
}
public Mask type() {
withLocalProperty("type");
return this;
}
public Mask virtualIpAddress() {
withLocalProperty("virtualIpAddress");
return this;
}
public Mask serviceCount() {
withLocalProperty("serviceCount");
return this;
}
}
}