com.softlayer.api.service.metric.tracking.Object 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.metric.tracking;
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.container.Graph;
import com.softlayer.api.service.container.bandwidth.GraphOutputs;
import com.softlayer.api.service.container.metric.data.Type;
import com.softlayer.api.service.container.metric.tracking.object.Details;
import com.softlayer.api.service.container.metric.tracking.object.Summary;
import com.softlayer.api.service.metric.tracking.object.Data;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* Metric tracking objects provides a common interface to all metrics provided by SoftLayer. These metrics range from network component traffic for a server to aggregated Bandwidth Pooling traffic and more. Every object within SoftLayer's range of objects that has data that can be tracked over time has an associated tracking object. Use the [[SoftLayer_Metric_Tracking_Object]] service to retrieve raw and graph data from a tracking object.
*
* @see SoftLayer_Metric_Tracking_Object
*/
@ApiType("SoftLayer_Metric_Tracking_Object")
public class Object extends Entity {
/**
* The type of data that a tracking object polls.
*/
@ApiProperty
protected com.softlayer.api.service.metric.tracking.object.Type type;
public com.softlayer.api.service.metric.tracking.object.Type getType() {
return type;
}
public void setType(com.softlayer.api.service.metric.tracking.object.Type type) {
this.type = type;
}
/**
* The data recorded by a tracking object.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected List data;
public List getData() {
if (data == null) {
data = new ArrayList();
}
return data;
}
protected boolean dataSpecified;
public boolean isDataSpecified() {
return dataSpecified;
}
public void unsetData() {
data = null;
dataSpecified = false;
}
/**
* A tracking object'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;
}
/**
* Tracking object label
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String label;
public String getLabel() {
return label;
}
public void setLabel(String label) {
labelSpecified = true;
this.label = label;
}
protected boolean labelSpecified;
public boolean isLabelSpecified() {
return labelSpecified;
}
public void unsetLabel() {
label = null;
labelSpecified = false;
}
/**
* The identifier of the existing resource this object is attempting to track.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long resourceTableId;
public Long getResourceTableId() {
return resourceTableId;
}
public void setResourceTableId(Long resourceTableId) {
resourceTableIdSpecified = true;
this.resourceTableId = resourceTableId;
}
protected boolean resourceTableIdSpecified;
public boolean isResourceTableIdSpecified() {
return resourceTableIdSpecified;
}
public void unsetResourceTableId() {
resourceTableId = null;
resourceTableIdSpecified = false;
}
/**
* The date this tracker began tracking this particular resource.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar startDate;
public GregorianCalendar getStartDate() {
return startDate;
}
public void setStartDate(GregorianCalendar startDate) {
startDateSpecified = true;
this.startDate = startDate;
}
protected boolean startDateSpecified;
public boolean isStartDateSpecified() {
return startDateSpecified;
}
public void unsetStartDate() {
startDate = null;
startDateSpecified = 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());
}
/**
* Metric tracking objects provides a common interface to all metrics provided by SoftLayer. These metrics range from network component traffic for a server to aggregated Bandwidth Pooling traffic and more. Every object within SoftLayer's range of objects that has data that can be tracked over time has an associated tracking object.
*
* The SoftLayer_Metric_Tracking_Object service contains methods that allow users to retrieve data from these tracking objects in raw and graph form.
*
* @see SoftLayer_Metric_Tracking_Object
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Metric_Tracking_Object")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* [DEPRECATED] Retrieve a PNG image of the last 24 hours of bandwidth usage of one of SoftLayer's network backbones.
*
* @see SoftLayer_Metric_Tracking_Object::getBackboneBandwidthGraph
*/
@ApiMethod(instanceRequired = true)
public GraphOutputs getBackboneBandwidthGraph(String graphTitle);
/**
* Retrieve a collection of raw bandwidth data from an individual public or private network tracking object. Raw data is ideal if you with to employ your own traffic storage and graphing systems.
*
* @see SoftLayer_Metric_Tracking_Object::getBandwidthData
*/
@ApiMethod(instanceRequired = true)
public List getBandwidthData(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String type, Long rollupSeconds);
/**
* Retrieve a PNG image of a bandwidth graph representing the bandwidth usage over time recorded by SofTLayer's bandwidth pollers.
*
* @see SoftLayer_Metric_Tracking_Object::getBandwidthGraph
*/
@ApiMethod(instanceRequired = true)
public GraphOutputs getBandwidthGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String graphType, Long fontSize, Long graphWidth, Long graphHeight, Boolean doNotShowTimeZone);
/**
* Retrieve the total amount of bandwidth recorded by a tracking object within the given date range. This method will only work on SoftLayer_Metric_Tracking_Object for SoftLayer_Hardware objects, and SoftLayer_Virtual_Guest objects.
*
* @see SoftLayer_Metric_Tracking_Object::getBandwidthTotal
*/
@ApiMethod(instanceRequired = true)
public Long getBandwidthTotal(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String direction, String type);
/**
* Returns a graph container instance that is populated with metric data for the tracking object.
*
* @see SoftLayer_Metric_Tracking_Object::getCustomGraphData
*/
@ApiMethod(instanceRequired = true)
public Graph getCustomGraphData(Graph graphContainer);
/**
* Retrieve a collection of detailed metric data over a date range. Ideal if you want to employ your own graphing systems. Note not all metrics support this method. Those that do not return null.
*
* @see SoftLayer_Metric_Tracking_Object::getDetailsForDateRange
*/
@ApiMethod(instanceRequired = true)
public List getDetailsForDateRange(GregorianCalendar startDate, GregorianCalendar endDate, List graphType);
/**
* Retrieve a PNG image of a metric in graph form.
*
* @see SoftLayer_Metric_Tracking_Object::getGraph
*/
@ApiMethod(instanceRequired = true)
public GraphOutputs getGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, List graphType);
/**
* Returns a collection of metric data types that can be retrieved for a metric tracking object.
*
* @see SoftLayer_Metric_Tracking_Object::getMetricDataTypes
*/
@ApiMethod(instanceRequired = true)
public List getMetricDataTypes();
/**
* getObject retrieves the SoftLayer_Metric_Tracking_Object object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Metric_Tracking_Object service. You can only tracking objects that are associated with your SoftLayer account or services.
*
* @see SoftLayer_Metric_Tracking_Object::getObject
*/
@ApiMethod(instanceRequired = true)
public Object getObject();
/**
* Retrieve a metric summary. Ideal if you want to employ your own graphing systems. Note not all metric types contain a summary. These return null.
*
* @see SoftLayer_Metric_Tracking_Object::getSummary
*/
@ApiMethod(instanceRequired = true)
public Summary getSummary(String graphType);
/**
* Returns summarized metric data for the date range, metric type and summary period provided.
*
* @see SoftLayer_Metric_Tracking_Object::getSummaryData
*/
@ApiMethod(instanceRequired = true)
public List getSummaryData(GregorianCalendar startDateTime, GregorianCalendar endDateTime, List validTypes, Long summaryPeriod);
/**
* The type of data that a tracking object polls.
*
* @see SoftLayer_Metric_Tracking_Object::getType
*/
@ApiMethod(instanceRequired = true)
public com.softlayer.api.service.metric.tracking.object.Type getType();
}
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#getBackboneBandwidthGraph}
*/
public Future getBackboneBandwidthGraph(String graphTitle);
public Future> getBackboneBandwidthGraph(String graphTitle, ResponseHandler callback);
/**
* Async version of {@link Service#getBandwidthData}
*/
public Future> getBandwidthData(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String type, Long rollupSeconds);
public Future> getBandwidthData(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String type, Long rollupSeconds, ResponseHandler> callback);
/**
* Async version of {@link Service#getBandwidthGraph}
*/
public Future getBandwidthGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String graphType, Long fontSize, Long graphWidth, Long graphHeight, Boolean doNotShowTimeZone);
public Future> getBandwidthGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String graphType, Long fontSize, Long graphWidth, Long graphHeight, Boolean doNotShowTimeZone, ResponseHandler callback);
/**
* Async version of {@link Service#getBandwidthTotal}
*/
public Future getBandwidthTotal(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String direction, String type);
public Future> getBandwidthTotal(GregorianCalendar startDateTime, GregorianCalendar endDateTime, String direction, String type, ResponseHandler callback);
/**
* Async version of {@link Service#getCustomGraphData}
*/
public Future getCustomGraphData(Graph graphContainer);
public Future> getCustomGraphData(Graph graphContainer, ResponseHandler callback);
/**
* Async version of {@link Service#getDetailsForDateRange}
*/
public Future> getDetailsForDateRange(GregorianCalendar startDate, GregorianCalendar endDate, List graphType);
public Future> getDetailsForDateRange(GregorianCalendar startDate, GregorianCalendar endDate, List graphType, ResponseHandler> callback);
/**
* Async version of {@link Service#getGraph}
*/
public Future getGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, List graphType);
public Future> getGraph(GregorianCalendar startDateTime, GregorianCalendar endDateTime, List graphType, ResponseHandler callback);
/**
* Async version of {@link Service#getMetricDataTypes}
*/
public Future> getMetricDataTypes();
public Future> getMetricDataTypes(ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future