com.softlayer.api.service.network.firewall.Template 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.firewall;
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 com.softlayer.api.service.network.firewall.template.Rule;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Network_Firewall_Template type contains general information for a SoftLayer network firewall template.
*
* Firewall templates are recommend rule sets for use with SoftLayer Hardware Firewall (Dedicated). These optimized templates are designed to balance security restriction with application availability. The templates given may be altered to provide custom network security, or may be used as-is for basic security. At least one rule set MUST be applied for the firewall to block traffic. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request.
*
* @see SoftLayer_Network_Firewall_Template
*/
@ApiType("SoftLayer_Network_Firewall_Template")
public class Template extends Entity {
/**
* The rule set that belongs to this firewall rules template.
*/
@ApiProperty
protected List rules;
public List getRules() {
if (rules == null) {
rules = new ArrayList();
}
return rules;
}
/**
* A Firewall template's internal identifier.
*/
@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;
}
/**
* The name of the firewall rules template.
*/
@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;
}
/**
* A count of the rule set that belongs to this firewall rules template.
*/
@ApiProperty
protected Long ruleCount;
public Long getRuleCount() {
return ruleCount;
}
public void setRuleCount(Long ruleCount) {
this.ruleCount = ruleCount;
}
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());
}
/**
* The SoftLayer_Network_Firewall_Template service can be used to retrieve recommended SoftLayer network firewall templates and template rules.
*
* The provided firewall templates are recommend rule sets for use with SoftLayer Hardware Firewall (Dedicated). These optimized templates are designed to balance security restriction with application availability. The templates given may be altered to provide custom network security, or may be used as-is for basic security. At least one rule set MUST be applied for the firewall to block traffic. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Update Request]] service to submit a firewall update request.
*
* @see SoftLayer_Network_Firewall_Template
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_Firewall_Template")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Get all available firewall template objects.
*
* ''getAllObjects'' returns an array of SoftLayer_Network_Firewall_Template objects upon success.
*
* @see SoftLayer_Network_Firewall_Template::getAllObjects
*/
@ApiMethod
public List getAllObjects();
/**
* getObject returns a SoftLayer_Network_Firewall_Template object. You can retrieve all available firewall templates. getAllObjects returns an array of all available SoftLayer_Network_Firewall_Template objects. You can use these templates to generate a [[SoftLayer Network Firewall Update Request]].
*
* @SLDNDocumentation Service See Also SoftLayer_Network_Firewall_Update_Request
*
* @see SoftLayer_Network_Firewall_Template::getObject
*/
@ApiMethod(instanceRequired = true)
public Template getObject();
/**
* The rule set that belongs to this firewall rules template.
*
* @see SoftLayer_Network_Firewall_Template::getRules
*/
@ApiMethod(instanceRequired = true)
public List getRules();
}
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#getAllObjects}
*/
public Future> getAllObjects();
public Future> getAllObjects(ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getRules}
*/
public Future> getRules();
/**
* Async callback version of {@link Service#getRules}
*/
public Future> getRules(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.network.firewall.template.Rule.Mask rules() {
return withSubMask("rules", com.softlayer.api.service.network.firewall.template.Rule.Mask.class);
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask ruleCount() {
withLocalProperty("ruleCount");
return this;
}
}
}