com.softlayer.api.service.scale.policy.trigger.ResourceUse 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 com.softlayer.api.service.scale.policy.trigger.resourceuse.Watch;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* A trigger that will only execute only when all guests on the group (both static and member) satisfy certain resource watches.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse
*/
@ApiType("SoftLayer_Scale_Policy_Trigger_ResourceUse")
public class ResourceUse extends Trigger {
/**
* The resource watches for this trigger.
*/
@ApiProperty
protected List watches;
public List getWatches() {
if (watches == null) {
watches = new ArrayList();
}
return watches;
}
/**
* A count of the resource watches for this trigger.
*/
@ApiProperty
protected Long watchCount;
public Long getWatchCount() {
return watchCount;
}
public void setWatchCount(Long watchCount) {
this.watchCount = watchCount;
}
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 only when all guests on the group (both static and member) satisfy certain resource watches.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Scale_Policy_Trigger_ResourceUse")
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_ResourceUse::createObject
*/
@ApiMethod
public ResourceUse createObject(ResourceUse templateObject);
/**
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public ResourceUse getObjectForResourceUse();
/**
* The resource watches for this trigger.
*
* @see SoftLayer_Scale_Policy_Trigger_ResourceUse::getWatches
*/
@ApiMethod(instanceRequired = true)
public List getWatches();
}
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(ResourceUse templateObject);
public Future> createObject(ResourceUse templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObjectForResourceUse}
*/
public Future getObjectForResourceUse();
public Future> getObjectForResourceUse(ResponseHandler callback);
/**
* Async version of {@link Service#getWatches}
*/
public Future> getWatches();
/**
* Async callback version of {@link Service#getWatches}
*/
public Future> getWatches(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.scale.policy.Trigger.Mask {
public com.softlayer.api.service.scale.policy.trigger.resourceuse.Watch.Mask watches() {
return withSubMask("watches", com.softlayer.api.service.scale.policy.trigger.resourceuse.Watch.Mask.class);
}
public Mask watchCount() {
withLocalProperty("watchCount");
return this;
}
}
}