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

com.softlayer.api.service.network.Backbone Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.network;

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.Location;
import com.softlayer.api.service.network.Component;
import java.util.List;
import java.util.concurrent.Future;

/**
 * A SoftLayer_Network_Backbone represents a single backbone connection from SoftLayer to the public Internet, from the Internet to the SoftLayer private network, or a link that connects the private networks between SoftLayer's datacenters. The SoftLayer_Network_Backbone data type is a collection of data associated with one of those connections. 
 *
 * @see SoftLayer_Network_Backbone
 */
@ApiType("SoftLayer_Network_Backbone")
public class Backbone extends Entity {

    /**
     * A backbone's status.
     */
    @ApiProperty
    protected String health;

    public String getHealth() {
        return health;
    }

    public void setHealth(String health) {
        this.health = health;
    }

    /**
     * Which of the SoftLayer datacenters a backbone is connected to.
     */
    @ApiProperty
    protected Location location;

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    /**
     * A backbone's primary network component.
     */
    @ApiProperty
    protected Component networkComponent;

    public Component getNetworkComponent() {
        return networkComponent;
    }

    public void setNetworkComponent(Component networkComponent) {
        this.networkComponent = networkComponent;
    }

    /**
     * The numeric portion of the bandwidth capacity of a SoftLayer backbone. For instance, if a backbone is rated at "1 GigE" capacity then the capacity property of the backbone is 1. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long capacity;

    public Long getCapacity() {
        return capacity;
    }

    public void setCapacity(Long capacity) {
        capacitySpecified = true;
        this.capacity = capacity;
    }

    protected boolean capacitySpecified;

    public boolean isCapacitySpecified() {
        return capacitySpecified;
    }

    public void unsetCapacity() {
        capacity = null;
        capacitySpecified = false;
    }

    /**
     * The unit portion of the bandwidth capacity of a SoftLayer backbone. For instance, if a backbone is rated at "10 G" capacity then the capacityUnits property of the backbone is "G". 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String capacityUnits;

    public String getCapacityUnits() {
        return capacityUnits;
    }

    public void setCapacityUnits(String capacityUnits) {
        capacityUnitsSpecified = true;
        this.capacityUnits = capacityUnits;
    }

    protected boolean capacityUnitsSpecified;

    public boolean isCapacityUnitsSpecified() {
        return capacityUnitsSpecified;
    }

    public void unsetCapacityUnits() {
        capacityUnits = null;
        capacityUnitsSpecified = false;
    }

    /**
     * A backbone'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;
    }

    /**
     * A backbone's name. This is usually the name of the backbone's network provider followed by a number in case SoftLayer uses more than one backbone from a provider. Backbone provider numbers start with the number one and increment from there. 
     */
    @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;
    }

    /**
     * The internal identifier of the network component that backbone is connected to. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long networkComponentId;

    public Long getNetworkComponentId() {
        return networkComponentId;
    }

    public void setNetworkComponentId(Long networkComponentId) {
        networkComponentIdSpecified = true;
        this.networkComponentId = networkComponentId;
    }

    protected boolean networkComponentIdSpecified;

    public boolean isNetworkComponentIdSpecified() {
        return networkComponentIdSpecified;
    }

    public void unsetNetworkComponentId() {
        networkComponentId = null;
        networkComponentIdSpecified = false;
    }

    /**
     * Whether a SoftLayer backbone connects to the public Internet, to the private network, or connecting the private networks of SoftLayer's datacenters. Type is either the string "public", "private", or "private-interconnect". 
     */
    @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;
    }

    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 SoftLayer_Network_Backbone represents a single backbone connection from SoftLayer to the public Internet, from the Internet to the SoftLayer private network, or a link that connects the private networks between SoftLayer's datacenters. The SoftLayer_Network_Backbone service is unique in that it is not referenced by any of the other SoftLayer API services. 
     *
     * @see SoftLayer_Network_Backbone
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Network_Backbone")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Retrieve a list of all SoftLayer backbone connections. Use this method if you need all backbones or don't know the id number of a specific backbone. 
         *
         * @see SoftLayer_Network_Backbone::getAllBackbones
         */
        @ApiMethod
        public List getAllBackbones();

        /**
         * Retrieve a list of all SoftLayer backbone connections for a location name. 
         *
         * @see SoftLayer_Network_Backbone::getBackbonesForLocationName
         */
        @ApiMethod
        public List getBackbonesForLocationName(String locationName);

        /**
         * Retrieve a graph of a SoftLayer backbone's last 24 hours of activity. getGraphImage returns a PNG image measuring 827 pixels by 293 pixels.
         *
         * @see SoftLayer_Network_Backbone::getGraphImage
         */
        @ApiMethod(instanceRequired = true)
        public byte[] getGraphImage();

        /**
         * Retrieve an individual SoftLayer_Network_Backbone record. Use the getAllBackbones() method to retrieve a list of all SoftLayer network backbones.
         *
         * @see SoftLayer_Network_Backbone::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Backbone getObject();

        /**
         * A backbone's status.
         *
         * @see SoftLayer_Network_Backbone::getHealth
         */
        @ApiMethod(instanceRequired = true)
        public String getHealth();

        /**
         * Which of the SoftLayer datacenters a backbone is connected to.
         *
         * @see SoftLayer_Network_Backbone::getLocation
         */
        @ApiMethod(instanceRequired = true)
        public Location getLocation();

        /**
         * A backbone's primary network component.
         *
         * @see SoftLayer_Network_Backbone::getNetworkComponent
         */
        @ApiMethod(instanceRequired = true)
        public Component getNetworkComponent();

    }

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

        public Future getAllBackbones(ResponseHandler> callback);

        /**
         * Async version of {@link Service#getBackbonesForLocationName}
         */
        public Future> getBackbonesForLocationName(String locationName);

        public Future getBackbonesForLocationName(String locationName, ResponseHandler> callback);

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

        public Future getGraphImage(ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

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

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

    }

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

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

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

        public Component.Mask networkComponent() {
            return withSubMask("networkComponent", Component.Mask.class);
        }

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy