com.softlayer.api.service.scale.policy.trigger.Repeating 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.concurrent.Future;
/**
* A trigger that will execute every so often.
*
* @see SoftLayer_Scale_Policy_Trigger_Repeating
*/
@ApiType("SoftLayer_Scale_Policy_Trigger_Repeating")
public class Repeating extends Trigger {
/**
* The cron-formatted schedule. This is run in the UTC timezone.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String schedule;
public String getSchedule() {
return schedule;
}
public void setSchedule(String schedule) {
scheduleSpecified = true;
this.schedule = schedule;
}
protected boolean scheduleSpecified;
public boolean isScheduleSpecified() {
return scheduleSpecified;
}
public void unsetSchedule() {
schedule = null;
scheduleSpecified = 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 execute every so often.
*
* @see SoftLayer_Scale_Policy_Trigger_Repeating
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Trigger_Repeating")
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_Repeating::createObject
*/
@ApiMethod
public Repeating createObject(Repeating templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger_Repeating::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public Repeating getObjectForRepeating();
/**
* @see SoftLayer_Scale_Policy_Trigger_Repeating::validateCronExpression
*/
@ApiMethod(instanceRequired = true)
public Void validateCronExpression(String expression);
}
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(Repeating templateObject);
public Future> createObject(Repeating templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObjectForRepeating}
*/
public Future getObjectForRepeating();
public Future> getObjectForRepeating(ResponseHandler callback);
/**
* Async version of {@link Service#validateCronExpression}
*/
public Future validateCronExpression(String expression);
public Future> validateCronExpression(String expression, ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.scale.policy.Trigger.Mask {
public Mask schedule() {
withLocalProperty("schedule");
return this;
}
}
}