com.softlayer.api.service.scale.policy.Action 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.action.Type;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;
/**
* An action to execute when a policy is triggered. Currently only one action can be associated with a policy and it must be created with the policy.
*
* @see SoftLayer_Scale_Policy_Action
*/
@ApiType("SoftLayer_Scale_Policy_Action")
public class Action extends Entity {
/**
* The policy this action is on.
*/
@ApiProperty
protected Policy scalePolicy;
public Policy getScalePolicy() {
return scalePolicy;
}
public void setScalePolicy(Policy scalePolicy) {
this.scalePolicy = scalePolicy;
}
/**
* The type of action.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
/**
* When this action 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;
}
/**
* An action'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;
}
/**
* Then this action 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 action 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 identifier of this action's type.
*/
@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());
}
/**
* An action to execute when a policy is triggered. Currently only one action can be associated with a policy and it must be created with the policy.
*
* @see SoftLayer_Scale_Policy_Action
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Action")
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_Action::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* @see SoftLayer_Scale_Policy_Action::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Action templateObject);
/**
* @see SoftLayer_Scale_Policy_Action::getObject
*/
@ApiMethod(instanceRequired = true)
public Action getObject();
/**
* The policy this action is on.
*
* @see SoftLayer_Scale_Policy_Action::getScalePolicy
*/
@ApiMethod(instanceRequired = true)
public Policy getScalePolicy();
/**
* The type of action.
*
* @see SoftLayer_Scale_Policy_Action::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#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Action templateObject);
public Future> editObject(Action 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.action.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.scale.policy.action.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;
}
}
}