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

com.softlayer.api.service.network.loadbalancer.global.Host Maven / Gradle / Ivy

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

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.loadbalancer.global.Account;
import java.math.BigDecimal;
import java.util.concurrent.Future;

/**
 * The global load balancer service has been deprecated and is no longer available. 
 *
 * @see SoftLayer_Network_LoadBalancer_Global_Host
 */
@ApiType("SoftLayer_Network_LoadBalancer_Global_Host")
public class Host extends Entity {

    /**
     * The global load balancer account a host belongs to.
     */
    @ApiProperty
    protected Account loadBalancerAccount;

    public Account getLoadBalancerAccount() {
        return loadBalancerAccount;
    }

    public void setLoadBalancerAccount(Account loadBalancerAccount) {
        this.loadBalancerAccount = loadBalancerAccount;
    }

    /**
     * The IP address of the host that will be returned by the global load balancers in response to a dns request.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String destinationIp;

    public String getDestinationIp() {
        return destinationIp;
    }

    public void setDestinationIp(String destinationIp) {
        destinationIpSpecified = true;
        this.destinationIp = destinationIp;
    }

    protected boolean destinationIpSpecified;

    public boolean isDestinationIpSpecified() {
        return destinationIpSpecified;
    }

    public void unsetDestinationIp() {
        destinationIp = null;
        destinationIpSpecified = false;
    }

    /**
     * The port of the host that will be used for health checks.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long destinationPort;

    public Long getDestinationPort() {
        return destinationPort;
    }

    public void setDestinationPort(Long destinationPort) {
        destinationPortSpecified = true;
        this.destinationPort = destinationPort;
    }

    protected boolean destinationPortSpecified;

    public boolean isDestinationPortSpecified() {
        return destinationPortSpecified;
    }

    public void unsetDestinationPort() {
        destinationPort = null;
        destinationPortSpecified = false;
    }

    /**
     * Whether the host is enabled or not.  The value can be '0' for disabled, or '1' for enabled.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long enabled;

    public Long getEnabled() {
        return enabled;
    }

    public void setEnabled(Long enabled) {
        enabledSpecified = true;
        this.enabled = enabled;
    }

    protected boolean enabledSpecified;

    public boolean isEnabledSpecified() {
        return enabledSpecified;
    }

    public void unsetEnabled() {
        enabled = null;
        enabledSpecified = false;
    }

    /**
     * The health check type of a host.  Valid values include 'none', 'http', and 'tcp'.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String healthCheck;

    public String getHealthCheck() {
        return healthCheck;
    }

    public void setHealthCheck(String healthCheck) {
        healthCheckSpecified = true;
        this.healthCheck = healthCheck;
    }

    protected boolean healthCheckSpecified;

    public boolean isHealthCheckSpecified() {
        return healthCheckSpecified;
    }

    public void unsetHealthCheck() {
        healthCheck = null;
        healthCheckSpecified = false;
    }

    /**
     * The number of times the host was selected by the load balance method.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected BigDecimal hits;

    public BigDecimal getHits() {
        return hits;
    }

    public void setHits(BigDecimal hits) {
        hitsSpecified = true;
        this.hits = hits;
    }

    protected boolean hitsSpecified;

    public boolean isHitsSpecified() {
        return hitsSpecified;
    }

    public void unsetHits() {
        hits = null;
        hitsSpecified = false;
    }

    /**
     * The unique identifier of a global load balancer host.
     */
    @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 order of this host within the load balance pool.  This is only significant if the load balance method is set to failover.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long loadBalanceOrder;

    public Long getLoadBalanceOrder() {
        return loadBalanceOrder;
    }

    public void setLoadBalanceOrder(Long loadBalanceOrder) {
        loadBalanceOrderSpecified = true;
        this.loadBalanceOrder = loadBalanceOrder;
    }

    protected boolean loadBalanceOrderSpecified;

    public boolean isLoadBalanceOrderSpecified() {
        return loadBalanceOrderSpecified;
    }

    public void unsetLoadBalanceOrder() {
        loadBalanceOrder = null;
        loadBalanceOrderSpecified = false;
    }

    /**
     * The location of a host in a datacenter.serverRoom format.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String location;

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        locationSpecified = true;
        this.location = location;
    }

    protected boolean locationSpecified;

    public boolean isLocationSpecified() {
        return locationSpecified;
    }

    public void unsetLocation() {
        location = null;
        locationSpecified = false;
    }

    /**
     * The health status of a host.  The status can be either 'UP', 'DOWN', or null which could mean that the health check type is set to 'none' or an update to the ip, port, or health check type was recently done and the host is waiting for the new status. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        statusSpecified = true;
        this.status = status;
    }

    protected boolean statusSpecified;

    public boolean isStatusSpecified() {
        return statusSpecified;
    }

    public void unsetStatus() {
        status = null;
        statusSpecified = false;
    }

    /**
     * The load balance weight of a host.  The total weight of all hosts in the load balancing pool must not exceed 100.
     */
    @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 global load balancer service has been deprecated and is no longer available. 
*
* Every global load balancer account contains hosts that make up the load balancing pool. The global load balancers select hosts from this pool and return the destination IP in the DNS response. The SoftLayer_Network_LoadBalancer_Global_Host service represent these hosts. * * @see SoftLayer_Network_LoadBalancer_Global_Host */ @com.softlayer.api.annotation.ApiService("SoftLayer_Network_LoadBalancer_Global_Host") public static interface Service extends com.softlayer.api.Service { public ServiceAsync asAsync(); public Mask withNewMask(); public Mask withMask(); public void setMask(Mask mask); /** * The global load balancer service has been deprecated and is no longer available.
*
* Remove a host from the load balancing pool of a global load balancer account. * * @see SoftLayer_Network_LoadBalancer_Global_Host::deleteObject */ @ApiMethod(instanceRequired = true) public Boolean deleteObject(); /** * The global load balancer service has been deprecated and is no longer available. * * @see SoftLayer_Network_LoadBalancer_Global_Host::getObject */ @ApiMethod(instanceRequired = true) public Host getObject(); /** * The global load balancer account a host belongs to. * * @see SoftLayer_Network_LoadBalancer_Global_Host::getLoadBalancerAccount */ @ApiMethod(instanceRequired = true) public Account getLoadBalancerAccount(); } 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#deleteObject} */ public Future deleteObject(); public Future deleteObject(ResponseHandler callback); /** * Async version of {@link Service#getObject} */ public Future getObject(); public Future getObject(ResponseHandler callback); /** * Async version of {@link Service#getLoadBalancerAccount} */ public Future getLoadBalancerAccount(); /** * Async callback version of {@link Service#getLoadBalancerAccount} */ public Future getLoadBalancerAccount(ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.Entity.Mask { public Account.Mask loadBalancerAccount() { return withSubMask("loadBalancerAccount", Account.Mask.class); } public Mask destinationIp() { withLocalProperty("destinationIp"); return this; } public Mask destinationPort() { withLocalProperty("destinationPort"); return this; } public Mask enabled() { withLocalProperty("enabled"); return this; } public Mask healthCheck() { withLocalProperty("healthCheck"); return this; } public Mask hits() { withLocalProperty("hits"); return this; } public Mask id() { withLocalProperty("id"); return this; } public Mask loadBalanceOrder() { withLocalProperty("loadBalanceOrder"); return this; } public Mask location() { withLocalProperty("location"); return this; } public Mask status() { withLocalProperty("status"); return this; } public Mask weight() { withLocalProperty("weight"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy