com.softlayer.api.service.network.gateway.Precheck 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.network.gateway;
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 java.util.List;
import java.util.concurrent.Future;
/**
* A network gateway precheck is the precheck codes for member(s) of a gateway
*
* @see SoftLayer_Network_Gateway_Precheck
*/
@ApiType("SoftLayer_Network_Gateway_Precheck")
public class Precheck extends Entity {
/**
* Category name
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String category;
public String getCategory() {
return category;
}
public void setCategory(String category) {
categorySpecified = true;
this.category = category;
}
protected boolean categorySpecified;
public boolean isCategorySpecified() {
return categorySpecified;
}
public void unsetCategory() {
category = null;
categorySpecified = false;
}
/**
* Gateway precheck status
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String gatewayReadinessValue;
public String getGatewayReadinessValue() {
return gatewayReadinessValue;
}
public void setGatewayReadinessValue(String gatewayReadinessValue) {
gatewayReadinessValueSpecified = true;
this.gatewayReadinessValue = gatewayReadinessValue;
}
protected boolean gatewayReadinessValueSpecified;
public boolean isGatewayReadinessValueSpecified() {
return gatewayReadinessValueSpecified;
}
public void unsetGatewayReadinessValue() {
gatewayReadinessValue = null;
gatewayReadinessValueSpecified = false;
}
/**
* The gateway member for this precheck.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long memberId;
public Long getMemberId() {
return memberId;
}
public void setMemberId(Long memberId) {
memberIdSpecified = true;
this.memberId = memberId;
}
protected boolean memberIdSpecified;
public boolean isMemberIdSpecified() {
return memberIdSpecified;
}
public void unsetMemberId() {
memberId = null;
memberIdSpecified = false;
}
/**
* Gateway precheck status
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String memberReadinessValue;
public String getMemberReadinessValue() {
return memberReadinessValue;
}
public void setMemberReadinessValue(String memberReadinessValue) {
memberReadinessValueSpecified = true;
this.memberReadinessValue = memberReadinessValue;
}
protected boolean memberReadinessValueSpecified;
public boolean isMemberReadinessValueSpecified() {
return memberReadinessValueSpecified;
}
public void unsetMemberReadinessValue() {
memberReadinessValue = null;
memberReadinessValueSpecified = false;
}
/**
* The precheck error status of the member
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long returnCode;
public Long getReturnCode() {
return returnCode;
}
public void setReturnCode(Long returnCode) {
returnCodeSpecified = true;
this.returnCode = returnCode;
}
protected boolean returnCodeSpecified;
public boolean isReturnCodeSpecified() {
return returnCodeSpecified;
}
public void unsetReturnCode() {
returnCode = null;
returnCodeSpecified = false;
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
/**
* A network gateway precheck is the precheck codes for member(s) of a gateway
*
* @see SoftLayer_Network_Gateway_Precheck
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_Gateway_Precheck")
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_Network_Gateway_Precheck::getObject
*/
@ApiMethod(instanceRequired = true)
public Precheck getObject();
/**
* Get the precheck status for all Juniper Gateway Action categories which require a readiness check before executing. Reference cloud.ibm.com documentation for more details.
*
* Possible precheck readiness values include:
*
* Ready (0): The member or Gateway category is ready. The only state that will be allowed to execute the Action. Not Ready (1): The member or Gateway category is not ready. This could occur because of several reasons. Either a precheck error occur, or the precheck has not run within the precheck timeout window. Check the returnCode for details on the specific error. Reference the cloud.ibm.com documentation for recovery details. Running (2): The precheck is currently running with no errors. Incomplete (3): The other member in the Gateway failed, therefore the current member could not complete it's precheck. Unsupported (4): The category is unsupported for the given member or Gateway. Expired (5) : The precheck record has expired so will need to be run again. Unchecked (6) : The precheck for the category has never been run. Current (7) : The gateway state is current so running precheck is not required. This commonly relates to version upgrade if gateway is in most update version.
*
* Return Values: Array of objects
*
* Object Definition:
*
* category : String : The precheck category which corresponds to one or more executeable actions.
*
* Current categories include: upgrade_precheck : Required for major and minor upgrade version actions. license_precheck : Required for license upgrade and downgrade actions. reload_precheck : Required for OS Reload action. rollback_precheck : Optional and related to upgrade_precheck. Only returned if getRollbackPrecheck is provided and set to True (1).
*
*
*
* memberId : Integer : The softlayer member id. memberReadinessValue : String : The precheck readiness state for the member. See possible readiness values above. gatewayReadinessValue : String : The precheck readiness state for the gateway : See possible readiness values above. returnCode : Integer : The return code. 0 if no error. Reference cloud.ibm.com documentation for details.
*
*
*
* @see SoftLayer_Network_Gateway_Precheck::getPrecheckStatus
*/
@ApiMethod
public List getPrecheckStatus(Long gatewayId, Boolean getRollbackPrecheck);
/**
* Used to create a License Management Network Gateway Precheck transaction.
*
*
*
* @see SoftLayer_Network_Gateway_Precheck::licenseManagementPrecheck
*/
@ApiMethod
public Boolean licenseManagementPrecheck(Long gatewayId);
/**
* Create an OS Reload Network Gateway Precheck transaction.
*
*
*
* @see SoftLayer_Network_Gateway_Precheck::osReloadPrecheck
*/
@ApiMethod
public Boolean osReloadPrecheck(Long gatewayId);
/**
* Create a Upgrade Network Gateway Precheck transaction.
*
*
*
* @see SoftLayer_Network_Gateway_Precheck::upgradePrecheck
*/
@ApiMethod
public Boolean upgradePrecheck(Long gatewayId);
}
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#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getPrecheckStatus}
*/
public Future> getPrecheckStatus(Long gatewayId, Boolean getRollbackPrecheck);
public Future> getPrecheckStatus(Long gatewayId, Boolean getRollbackPrecheck, ResponseHandler> callback);
/**
* Async version of {@link Service#licenseManagementPrecheck}
*/
public Future licenseManagementPrecheck(Long gatewayId);
public Future> licenseManagementPrecheck(Long gatewayId, ResponseHandler callback);
/**
* Async version of {@link Service#osReloadPrecheck}
*/
public Future osReloadPrecheck(Long gatewayId);
public Future> osReloadPrecheck(Long gatewayId, ResponseHandler callback);
/**
* Async version of {@link Service#upgradePrecheck}
*/
public Future upgradePrecheck(Long gatewayId);
public Future> upgradePrecheck(Long gatewayId, ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask category() {
withLocalProperty("category");
return this;
}
public Mask gatewayReadinessValue() {
withLocalProperty("gatewayReadinessValue");
return this;
}
public Mask memberId() {
withLocalProperty("memberId");
return this;
}
public Mask memberReadinessValue() {
withLocalProperty("memberReadinessValue");
return this;
}
public Mask returnCode() {
withLocalProperty("returnCode");
return this;
}
}
}