com.softlayer.api.service.scale.policy.trigger.OneTime 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;
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.scale.policy.Trigger;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;
/**
* A trigger that will only execute once on the given date. If the auto scale group is suspended this will not occur.
*
* @see SoftLayer_Scale_Policy_Trigger_OneTime
*/
@ApiType("SoftLayer_Scale_Policy_Trigger_OneTime")
public class OneTime extends Trigger {
/**
* The date to execute the policy.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar date;
public GregorianCalendar getDate() {
return date;
}
public void setDate(GregorianCalendar date) {
dateSpecified = true;
this.date = date;
}
protected boolean dateSpecified;
public boolean isDateSpecified() {
return dateSpecified;
}
public void unsetDate() {
date = null;
dateSpecified = 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 that will only execute once on the given date. If the auto scale group is suspended this will not occur.
*
* @see SoftLayer_Scale_Policy_Trigger_OneTime
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Trigger_OneTime")
public static interface Service extends Trigger.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* @see SoftLayer_Scale_Policy_Trigger_OneTime::createObject
*/
@ApiMethod
public OneTime createObject(OneTime templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger_OneTime::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public OneTime getObjectForOneTime();
}
public static interface ServiceAsync extends Trigger.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#createObject}
*/
public Future createObject(OneTime templateObject);
public Future> createObject(OneTime templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObjectForOneTime}
*/
public Future getObjectForOneTime();
public Future> getObjectForOneTime(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.scale.policy.Trigger.Mask {
public Mask date() {
withLocalProperty("date");
return this;
}
}
}