com.softlayer.api.service.network.lbaas.Member 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.lbaas;
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.lbaas.LoadBalancer;
import com.softlayer.api.service.network.lbaas.LoadBalancerServerInstanceInfo;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Network_LBaaS_Member represents the backend member for a load balancer. It can be either a virtual server or a bare metal machine.
*
* @see SoftLayer_Network_LBaaS_Member
*/
@ApiType("SoftLayer_Network_LBaaS_Member")
public class Member extends Entity {
/**
* The IP address of a load balancer member.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String address;
public String getAddress() {
return address;
}
public void setAddress(String address) {
addressSpecified = true;
this.address = address;
}
protected boolean addressSpecified;
public boolean isAddressSpecified() {
return addressSpecified;
}
public void unsetAddress() {
address = null;
addressSpecified = false;
}
/**
* Specifies when a load balancers
*/
@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;
}
@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;
}
/**
* Specifies when a load balancers
*/
@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 provisioning status of a load balancer member.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String provisioningStatus;
public String getProvisioningStatus() {
return provisioningStatus;
}
public void setProvisioningStatus(String provisioningStatus) {
provisioningStatusSpecified = true;
this.provisioningStatus = provisioningStatus;
}
protected boolean provisioningStatusSpecified;
public boolean isProvisioningStatusSpecified() {
return provisioningStatusSpecified;
}
public void unsetProvisioningStatus() {
provisioningStatus = null;
provisioningStatusSpecified = false;
}
/**
* The UUID of a load balancer member.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String uuid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
uuidSpecified = true;
this.uuid = uuid;
}
protected boolean uuidSpecified;
public boolean isUuidSpecified() {
return uuidSpecified;
}
public void unsetUuid() {
uuid = null;
uuidSpecified = false;
}
/**
* The weight of a load balancer member.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long weight;
public Long getWeight() {
return weight;
}
public void setWeight(Long weight) {
weightSpecified = true;
this.weight = weight;
}
protected boolean weightSpecified;
public boolean isWeightSpecified() {
return weightSpecified;
}
public void unsetWeight() {
weight = null;
weightSpecified = 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 SoftLayer_Network_LBaaS_Member service allows consumers to manage (backend) members for a given load balancer. A load balancer may have one or more backend pools. Adding a backend member to the load balancer will add that member to all the backend pools. Similarly, deleting a backend member from the load balancer will remove that member from all associated backend pools. Weight of the backend member is a value between 1 and 256 but only applicable when the load balancing method configured is "Weighted Round Robin".
*
* @see SoftLayer_Network_LBaaS_Member
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_LBaaS_Member")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Add server instances as members to load balancer and return it with listeners, pools and members populated
*
* @see SoftLayer_Network_LBaaS_Member::addLoadBalancerMembers
*/
@ApiMethod
public LoadBalancer addLoadBalancerMembers(String loadBalancerUuid, List serverInstances);
/**
* Delete given members from load balancer and return load balancer object with listeners, pools and members populated
*
* @see SoftLayer_Network_LBaaS_Member::deleteLoadBalancerMembers
*/
@ApiMethod
public LoadBalancer deleteLoadBalancerMembers(String loadBalancerUuid, List memberUuids);
/**
* @see SoftLayer_Network_LBaaS_Member::getObject
*/
@ApiMethod(instanceRequired = true)
public Member getObject();
/**
* Update members weight and return load balancer object with listeners, pools and members populated
*
* @see SoftLayer_Network_LBaaS_Member::updateLoadBalancerMembers
*/
@ApiMethod
public LoadBalancer updateLoadBalancerMembers(String loadBalancerUuid, List members);
}
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#addLoadBalancerMembers}
*/
public Future addLoadBalancerMembers(String loadBalancerUuid, List serverInstances);
public Future> addLoadBalancerMembers(String loadBalancerUuid, List serverInstances, ResponseHandler callback);
/**
* Async version of {@link Service#deleteLoadBalancerMembers}
*/
public Future deleteLoadBalancerMembers(String loadBalancerUuid, List memberUuids);
public Future> deleteLoadBalancerMembers(String loadBalancerUuid, List memberUuids, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#updateLoadBalancerMembers}
*/
public Future updateLoadBalancerMembers(String loadBalancerUuid, List members);
public Future> updateLoadBalancerMembers(String loadBalancerUuid, List members, ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask address() {
withLocalProperty("address");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask provisioningStatus() {
withLocalProperty("provisioningStatus");
return this;
}
public Mask uuid() {
withLocalProperty("uuid");
return this;
}
public Mask weight() {
withLocalProperty("weight");
return this;
}
}
}