com.softlayer.api.service.scale.policy.trigger.resourceuse.Watch 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
The newest version!
package com.softlayer.api.service.scale.policy.trigger.resourceuse;
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.scale.policy.trigger.ResourceUse;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* This is a specific watch for a resource use policy trigger.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch
*/
@ApiType("SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch")
public class Watch extends Entity {
/**
* The trigger this watch is on.
*/
@ApiProperty
protected ResourceUse scalePolicyTrigger;
public ResourceUse getScalePolicyTrigger() {
return scalePolicyTrigger;
}
public void setScalePolicyTrigger(ResourceUse scalePolicyTrigger) {
this.scalePolicyTrigger = scalePolicyTrigger;
}
/**
* The algorithm to use when aggregating and comparing. Currently, the only value that is accepted is EWMA (Exponential Weighted Moving Average). EWMA is the default value if no value is given.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String algorithm;
public String getAlgorithm() {
return algorithm;
}
public void setAlgorithm(String algorithm) {
algorithmSpecified = true;
this.algorithm = algorithm;
}
protected boolean algorithmSpecified;
public boolean isAlgorithmSpecified() {
return algorithmSpecified;
}
public void unsetAlgorithm() {
algorithm = null;
algorithmSpecified = false;
}
/**
* When this watch was created.
*/
@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;
}
/**
* When set and true any edit that happens on this object, be it calling edit on this directly or setting as a child while editing a parent object, will end up being a deletion.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Boolean deleteFlag;
public Boolean getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Boolean deleteFlag) {
deleteFlagSpecified = true;
this.deleteFlag = deleteFlag;
}
protected boolean deleteFlagSpecified;
public boolean isDeleteFlagSpecified() {
return deleteFlagSpecified;
}
public void unsetDeleteFlag() {
deleteFlag = null;
deleteFlagSpecified = false;
}
/**
* A watch'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;
}
/**
* The metric to watch. Possible values:
*
*
* * host.cpu.percent - On a scale of 0 to 100, the percent CPU a guest is using.
* * host.network.backend.in and host.network.frontend.in - The network bytes-per-second incoming on the interface
* of either the frontend or backend network.
* * host.network.backend.out and host.network.frontend.out - The network bytes-per-second incoming on the interface
* of either the frontend or backend network.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String metric;
public String getMetric() {
return metric;
}
public void setMetric(String metric) {
metricSpecified = true;
this.metric = metric;
}
protected boolean metricSpecified;
public boolean isMetricSpecified() {
return metricSpecified;
}
public void unsetMetric() {
metric = null;
metricSpecified = false;
}
/**
* When this watch 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 operator to use for comparison. The only two valid values are ">" and "<".
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String operator;
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
operatorSpecified = true;
this.operator = operator;
}
protected boolean operatorSpecified;
public boolean isOperatorSpecified() {
return operatorSpecified;
}
public void unsetOperator() {
operator = null;
operatorSpecified = false;
}
/**
* The number of seconds the values are aggregated for when compared to value. If values are not retrieved steadily and consecutively for the length of this period, nothing is compared.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long period;
public Long getPeriod() {
return period;
}
public void setPeriod(Long period) {
periodSpecified = true;
this.period = period;
}
protected boolean periodSpecified;
public boolean isPeriodSpecified() {
return periodSpecified;
}
public void unsetPeriod() {
period = null;
periodSpecified = false;
}
/**
* The trigger this watch is on.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long scalePolicyTriggerId;
public Long getScalePolicyTriggerId() {
return scalePolicyTriggerId;
}
public void setScalePolicyTriggerId(Long scalePolicyTriggerId) {
scalePolicyTriggerIdSpecified = true;
this.scalePolicyTriggerId = scalePolicyTriggerId;
}
protected boolean scalePolicyTriggerIdSpecified;
public boolean isScalePolicyTriggerIdSpecified() {
return scalePolicyTriggerIdSpecified;
}
public void unsetScalePolicyTriggerId() {
scalePolicyTriggerId = null;
scalePolicyTriggerIdSpecified = false;
}
/**
* The value to compare against. Although the value is a string, validation will be done on the value for restrictions (such as numeric-only) based on the metric.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String value;
public String getValue() {
return value;
}
public void setValue(String value) {
valueSpecified = true;
this.value = value;
}
protected boolean valueSpecified;
public boolean isValueSpecified() {
return valueSpecified;
}
public void unsetValue() {
value = null;
valueSpecified = 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());
}
/**
* This is a specific watch for a resource use policy trigger.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::createObject
*/
@ApiMethod
public Watch createObject(Watch templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Watch templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::getAllPossibleAlgorithms
*/
@ApiMethod(instanceRequired = true)
public List getAllPossibleAlgorithms();
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::getAllPossibleMetrics
*/
@ApiMethod(instanceRequired = true)
public List getAllPossibleMetrics();
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::getAllPossibleOperators
*/
@ApiMethod(instanceRequired = true)
public List getAllPossibleOperators();
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::getObject
*/
@ApiMethod(instanceRequired = true)
public Watch getObject();
/**
* The trigger this watch is on.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse_Watch::getScalePolicyTrigger
*/
@ApiMethod(instanceRequired = true)
public ResourceUse getScalePolicyTrigger();
}
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#createObject}
*/
public Future createObject(Watch templateObject);
public Future> createObject(Watch templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Watch templateObject);
public Future> editObject(Watch templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getAllPossibleAlgorithms}
*/
public Future> getAllPossibleAlgorithms();
public Future> getAllPossibleAlgorithms(ResponseHandler> callback);
/**
* Async version of {@link Service#getAllPossibleMetrics}
*/
public Future> getAllPossibleMetrics();
public Future> getAllPossibleMetrics(ResponseHandler> callback);
/**
* Async version of {@link Service#getAllPossibleOperators}
*/
public Future> getAllPossibleOperators();
public Future> getAllPossibleOperators(ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getScalePolicyTrigger}
*/
public Future getScalePolicyTrigger();
/**
* Async callback version of {@link Service#getScalePolicyTrigger}
*/
public Future> getScalePolicyTrigger(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.scale.policy.trigger.ResourceUse.Mask scalePolicyTrigger() {
return withSubMask("scalePolicyTrigger", com.softlayer.api.service.scale.policy.trigger.ResourceUse.Mask.class);
}
public Mask algorithm() {
withLocalProperty("algorithm");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask deleteFlag() {
withLocalProperty("deleteFlag");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask metric() {
withLocalProperty("metric");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask operator() {
withLocalProperty("operator");
return this;
}
public Mask period() {
withLocalProperty("period");
return this;
}
public Mask scalePolicyTriggerId() {
withLocalProperty("scalePolicyTriggerId");
return this;
}
public Mask value() {
withLocalProperty("value");
return this;
}
}
}