com.softlayer.api.service.provisioning.Hook 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
package com.softlayer.api.service.provisioning;
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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.provisioning.hook.Type;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;
/**
* The SoftLayer_Provisioning_Hook contains all the information needed to add a hook into a server/Virtual provision and os reload.
*
* @see SoftLayer_Provisioning_Hook
*/
@ApiType("SoftLayer_Provisioning_Hook")
public class Hook extends Entity {
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
@ApiProperty
protected Type hookType;
public Type getHookType() {
return hookType;
}
public void setHookType(Type hookType) {
this.hookType = hookType;
}
/**
* The ID of the account the script belongs to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long accountId;
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
accountIdSpecified = true;
this.accountId = accountId;
}
protected boolean accountIdSpecified;
public boolean isAccountIdSpecified() {
return accountIdSpecified;
}
public void unsetAccountId() {
accountId = null;
accountIdSpecified = false;
}
@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;
}
@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;
}
@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 name of the hook.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String name;
public String getName() {
return name;
}
public void setName(String name) {
nameSpecified = true;
this.name = name;
}
protected boolean nameSpecified;
public boolean isNameSpecified() {
return nameSpecified;
}
public void unsetName() {
name = null;
nameSpecified = false;
}
/**
* The ID of the type of hook the script is identified as. Currently only CUSTOMER_PROVIDED_HOOK has been implemented.
*/
@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;
}
/**
* The endpoint that the script will be downloaded from (USERNAME AND PASSWORD SHOULD BE INCLUDED HERE). If the endpoint is HTTP, the script will only be downloaded. If the endpoint is HTTPS, the script will be downloaded and executed.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String uri;
public String getUri() {
return uri;
}
public void setUri(String uri) {
uriSpecified = true;
this.uri = uri;
}
protected boolean uriSpecified;
public boolean isUriSpecified() {
return uriSpecified;
}
public void unsetUri() {
uri = null;
uriSpecified = 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());
}
/**
* @see SoftLayer_Provisioning_Hook
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Provisioning_Hook")
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_Provisioning_Hook::createObject
*/
@ApiMethod
public Hook createObject(Hook templateObject);
/**
* @see SoftLayer_Provisioning_Hook::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* @see SoftLayer_Provisioning_Hook::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Hook templateObject);
/**
* @see SoftLayer_Provisioning_Hook::getObject
*/
@ApiMethod(instanceRequired = true)
public Hook getObject();
/**
* @see SoftLayer_Provisioning_Hook::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* @see SoftLayer_Provisioning_Hook::getHookType
*/
@ApiMethod(instanceRequired = true)
public Type getHookType();
}
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(Hook templateObject);
public Future> createObject(Hook 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(Hook templateObject);
public Future> editObject(Hook templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getHookType}
*/
public Future getHookType();
/**
* Async callback version of {@link Service#getHookType}
*/
public Future> getHookType(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.provisioning.hook.Type.Mask hookType() {
return withSubMask("hookType", com.softlayer.api.service.provisioning.hook.Type.Mask.class);
}
public Mask accountId() {
withLocalProperty("accountId");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask typeId() {
withLocalProperty("typeId");
return this;
}
public Mask uri() {
withLocalProperty("uri");
return this;
}
}
}