com.softlayer.api.service.scale.policy.Trigger 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;
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;
import com.softlayer.api.service.scale.policy.trigger.Type;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;
/**
* A trigger to determine when a policy's actions should be fired.
*
* @see SoftLayer_Scale_Policy_Trigger
*/
@ApiType("SoftLayer_Scale_Policy_Trigger")
public class Trigger extends Entity {
/**
* The policy this trigger is on.
*/
@ApiProperty
protected Policy scalePolicy;
public Policy getScalePolicy() {
return scalePolicy;
}
public void setScalePolicy(Policy scalePolicy) {
this.scalePolicy = scalePolicy;
}
/**
* The type of trigger.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
/**
* When this trigger 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 trigger'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;
}
/**
* When this trigger 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 policy this trigger is on.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long scalePolicyId;
public Long getScalePolicyId() {
return scalePolicyId;
}
public void setScalePolicyId(Long scalePolicyId) {
scalePolicyIdSpecified = true;
this.scalePolicyId = scalePolicyId;
}
protected boolean scalePolicyIdSpecified;
public boolean isScalePolicyIdSpecified() {
return scalePolicyIdSpecified;
}
public void unsetScalePolicyId() {
scalePolicyId = null;
scalePolicyIdSpecified = false;
}
/**
* The type of trigger this is.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long typeId;
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
typeIdSpecified = true;
this.typeId = typeId;
}
protected boolean typeIdSpecified;
public boolean isTypeIdSpecified() {
return typeIdSpecified;
}
public void unsetTypeId() {
typeId = null;
typeIdSpecified = 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 trigger to determine when a policy's actions should be fired.
*
* @see SoftLayer_Scale_Policy_Trigger
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Trigger")
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::createObject
*/
@ApiMethod
public Trigger createObject(Trigger templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* @see SoftLayer_Scale_Policy_Trigger::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Trigger templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger::getObject
*/
@ApiMethod(instanceRequired = true)
public Trigger getObject();
/**
* The policy this trigger is on.
*
* @see SoftLayer_Scale_Policy_Trigger::getScalePolicy
*/
@ApiMethod(instanceRequired = true)
public Policy getScalePolicy();
/**
* The type of trigger.
*
* @see SoftLayer_Scale_Policy_Trigger::getType
*/
@ApiMethod(instanceRequired = true)
public 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#createObject}
*/
public Future createObject(Trigger templateObject);
public Future> createObject(Trigger 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(Trigger templateObject);
public Future> editObject(Trigger templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getScalePolicy}
*/
public Future getScalePolicy();
/**
* Async callback version of {@link Service#getScalePolicy}
*/
public Future> getScalePolicy(ResponseHandler callback);
/**
* Async version of {@link Service#getType}
*/
public Future getType();
/**
* Async callback version of {@link Service#getType}
*/
public Future> getType(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.scale.Policy.Mask scalePolicy() {
return withSubMask("scalePolicy", com.softlayer.api.service.scale.Policy.Mask.class);
}
public com.softlayer.api.service.scale.policy.trigger.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.scale.policy.trigger.Type.Mask.class);
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask deleteFlag() {
withLocalProperty("deleteFlag");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask scalePolicyId() {
withLocalProperty("scalePolicyId");
return this;
}
public Mask typeId() {
withLocalProperty("typeId");
return this;
}
}
}