All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.service.network.firewall.update.Request Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.network.firewall.update;

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.Hardware;
import com.softlayer.api.service.container.utility.network.firewall.rule.Attribute;
import com.softlayer.api.service.network.component.Firewall;
import com.softlayer.api.service.network.component.firewall.Rule;
import com.softlayer.api.service.user.Interface;
import com.softlayer.api.service.virtual.Guest;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Network_Firewall_Update_Request data type contains information relating to a SoftLayer network firewall update request. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. 
 *
 * @see SoftLayer_Network_Firewall_Update_Request
 */
@ApiType("SoftLayer_Network_Firewall_Update_Request")
public class Request extends Entity {

    /**
     * The user that authorized this firewall update request.
     */
    @ApiProperty
    protected Interface authorizingUser;

    public Interface getAuthorizingUser() {
        return authorizingUser;
    }

    public void setAuthorizingUser(Interface authorizingUser) {
        this.authorizingUser = authorizingUser;
    }

    /**
     * The downstream virtual server that the rule set will be applied to.
     */
    @ApiProperty
    protected Guest guest;

    public Guest getGuest() {
        return guest;
    }

    public void setGuest(Guest guest) {
        this.guest = guest;
    }

    /**
     * The downstream server that the rule set will be applied to.
     */
    @ApiProperty
    protected Hardware hardware;

    public Hardware getHardware() {
        return hardware;
    }

    public void setHardware(Hardware hardware) {
        this.hardware = hardware;
    }

    /**
     * The network component firewall that the rule set will be applied to.
     */
    @ApiProperty
    protected Firewall networkComponentFirewall;

    public Firewall getNetworkComponentFirewall() {
        return networkComponentFirewall;
    }

    public void setNetworkComponentFirewall(Firewall networkComponentFirewall) {
        this.networkComponentFirewall = networkComponentFirewall;
    }

    /**
     * The group of rules contained within the update request.
     */
    @ApiProperty
    protected List rules;

    public List getRules() {
        if (rules == null) {
            rules = new ArrayList();
        }
        return rules;
    }

    /**
     * Timestamp of when the rules from the update request were applied to the firewall.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar applyDate;

    public GregorianCalendar getApplyDate() {
        return applyDate;
    }

    public void setApplyDate(GregorianCalendar applyDate) {
        applyDateSpecified = true;
        this.applyDate = applyDate;
    }

    protected boolean applyDateSpecified;

    public boolean isApplyDateSpecified() {
        return applyDateSpecified;
    }

    public void unsetApplyDate() {
        applyDate = null;
        applyDateSpecified = false;
    }

    /**
     * The unique identifier of the user that authorized the update request.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long authorizingUserId;

    public Long getAuthorizingUserId() {
        return authorizingUserId;
    }

    public void setAuthorizingUserId(Long authorizingUserId) {
        authorizingUserIdSpecified = true;
        this.authorizingUserId = authorizingUserId;
    }

    protected boolean authorizingUserIdSpecified;

    public boolean isAuthorizingUserIdSpecified() {
        return authorizingUserIdSpecified;
    }

    public void unsetAuthorizingUserId() {
        authorizingUserId = null;
        authorizingUserIdSpecified = false;
    }

    /**
     * The type of user that authorized the update request [EMP or USR].
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String authorizingUserType;

    public String getAuthorizingUserType() {
        return authorizingUserType;
    }

    public void setAuthorizingUserType(String authorizingUserType) {
        authorizingUserTypeSpecified = true;
        this.authorizingUserType = authorizingUserType;
    }

    protected boolean authorizingUserTypeSpecified;

    public boolean isAuthorizingUserTypeSpecified() {
        return authorizingUserTypeSpecified;
    }

    public void unsetAuthorizingUserType() {
        authorizingUserType = null;
        authorizingUserTypeSpecified = false;
    }

    /**
     * Flag indicating whether the request is for a rule bypass configuration [0 or 1].
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Boolean bypassFlag;

    public Boolean getBypassFlag() {
        return bypassFlag;
    }

    public void setBypassFlag(Boolean bypassFlag) {
        bypassFlagSpecified = true;
        this.bypassFlag = bypassFlag;
    }

    protected boolean bypassFlagSpecified;

    public boolean isBypassFlagSpecified() {
        return bypassFlagSpecified;
    }

    public void unsetBypassFlag() {
        bypassFlag = null;
        bypassFlagSpecified = false;
    }

    /**
     * Timestamp of the creation of the record.
     */
    @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;
    }

    /**
     * The unique identifier of the firewall access control list that the rule set is destined for.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long firewallContextAccessControlListId;

    public Long getFirewallContextAccessControlListId() {
        return firewallContextAccessControlListId;
    }

    public void setFirewallContextAccessControlListId(Long firewallContextAccessControlListId) {
        firewallContextAccessControlListIdSpecified = true;
        this.firewallContextAccessControlListId = firewallContextAccessControlListId;
    }

    protected boolean firewallContextAccessControlListIdSpecified;

    public boolean isFirewallContextAccessControlListIdSpecified() {
        return firewallContextAccessControlListIdSpecified;
    }

    public void unsetFirewallContextAccessControlListId() {
        firewallContextAccessControlListId = null;
        firewallContextAccessControlListIdSpecified = false;
    }

    /**
     * The unique identifier of the server that the rule set is destined to protect.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long hardwareId;

    public Long getHardwareId() {
        return hardwareId;
    }

    public void setHardwareId(Long hardwareId) {
        hardwareIdSpecified = true;
        this.hardwareId = hardwareId;
    }

    protected boolean hardwareIdSpecified;

    public boolean isHardwareIdSpecified() {
        return hardwareIdSpecified;
    }

    public void unsetHardwareId() {
        hardwareId = null;
        hardwareIdSpecified = false;
    }

    /**
     * The unique identifier of the firewall update request.
     */
    @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 unique identifier of the network component firewall that the rule set is destined for.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long networkComponentFirewallId;

    public Long getNetworkComponentFirewallId() {
        return networkComponentFirewallId;
    }

    public void setNetworkComponentFirewallId(Long networkComponentFirewallId) {
        networkComponentFirewallIdSpecified = true;
        this.networkComponentFirewallId = networkComponentFirewallId;
    }

    protected boolean networkComponentFirewallIdSpecified;

    public boolean isNetworkComponentFirewallIdSpecified() {
        return networkComponentFirewallIdSpecified;
    }

    public void unsetNetworkComponentFirewallId() {
        networkComponentFirewallId = null;
        networkComponentFirewallIdSpecified = false;
    }

    /**
     * A count of the group of rules contained within the update request.
     */
    @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_Update_Request service can be used to create SoftLayer network component firewall rules update requests.  Update requests are added to a transaction queue and are typically posted in about 60 seconds.  After they are posted, they are listed as current rules via the [[SoftLayer Network Component Firewall]] service. Use the [[SoftLayer Network Component Firewall]] service to view current rules. Use the [[SoftLayer Network Firewall Template]] service to pull SoftLayer recommended rule set templates. 
     *
     * @see SoftLayer_Network_Firewall_Update_Request
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Network_Firewall_Update_Request")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Create a new firewall update request. The SoftLayer_Network_Firewall_Update_Request object passed to this function must have at least one rule. 
*
* ''createObject'' returns a Boolean ''true'' on successful object creation or ''false'' if your firewall update request was unable to be created. * * @see SoftLayer_Network_Firewall_Update_Request::createObject */ @ApiMethod public Request createObject(Request templateObject); /** * Get the possible attribute values for a firewall update request rule. These are the valid values which may be submitted as rule parameters for a firewall update request.
*
* ''getFirewallUpdateRequestRuleAttributes'' returns a SoftLayer_Container_Utility_Network_Firewall_Rule_Attribute object upon success. * * @see SoftLayer_Network_Firewall_Update_Request::getFirewallUpdateRequestRuleAttributes */ @ApiMethod public Attribute getFirewallUpdateRequestRuleAttributes(); /** * ''getObject'' returns a SoftLayer_Network_Firewall_Update_Request object. You can only get historical objects for servers attached to your account that have a network firewall enabled. ''createObject'' inserts a new SoftLayer_Network_Firewall_Update_Request object. You can only insert requests for servers attached to your account that have a network firewall enabled. ''getFirewallUpdateRequestRuleAttributes'' Get the possible attribute values for a firewall update request rule. * * @see SoftLayer_Network_Firewall_Update_Request::getObject */ @ApiMethod(instanceRequired = true) public Request getObject(); /** * @see SoftLayer_Network_Firewall_Update_Request::updateRuleNote */ @ApiMethod public Boolean updateRuleNote(Rule fwRule, String note); /** * The user that authorized this firewall update request. * * @see SoftLayer_Network_Firewall_Update_Request::getAuthorizingUser */ @ApiMethod(instanceRequired = true) public Interface getAuthorizingUser(); /** * The downstream virtual server that the rule set will be applied to. * * @see SoftLayer_Network_Firewall_Update_Request::getGuest */ @ApiMethod(instanceRequired = true) public Guest getGuest(); /** * The downstream server that the rule set will be applied to. * * @see SoftLayer_Network_Firewall_Update_Request::getHardware */ @ApiMethod(instanceRequired = true) public Hardware getHardware(); /** * The network component firewall that the rule set will be applied to. * * @see SoftLayer_Network_Firewall_Update_Request::getNetworkComponentFirewall */ @ApiMethod(instanceRequired = true) public Firewall getNetworkComponentFirewall(); /** * The group of rules contained within the update request. * * @see SoftLayer_Network_Firewall_Update_Request::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#createObject} */ public Future createObject(Request templateObject); public Future createObject(Request templateObject, ResponseHandler callback); /** * Async version of {@link Service#getFirewallUpdateRequestRuleAttributes} */ public Future getFirewallUpdateRequestRuleAttributes(); public Future getFirewallUpdateRequestRuleAttributes(ResponseHandler callback); /** * Async version of {@link Service#getObject} */ public Future getObject(); public Future getObject(ResponseHandler callback); /** * Async version of {@link Service#updateRuleNote} */ public Future updateRuleNote(Rule fwRule, String note); public Future updateRuleNote(Rule fwRule, String note, ResponseHandler callback); /** * Async version of {@link Service#getAuthorizingUser} */ public Future getAuthorizingUser(); /** * Async callback version of {@link Service#getAuthorizingUser} */ public Future getAuthorizingUser(ResponseHandler callback); /** * Async version of {@link Service#getGuest} */ public Future getGuest(); /** * Async callback version of {@link Service#getGuest} */ public Future getGuest(ResponseHandler callback); /** * Async version of {@link Service#getHardware} */ public Future getHardware(); /** * Async callback version of {@link Service#getHardware} */ public Future getHardware(ResponseHandler callback); /** * Async version of {@link Service#getNetworkComponentFirewall} */ public Future getNetworkComponentFirewall(); /** * Async callback version of {@link Service#getNetworkComponentFirewall} */ public Future getNetworkComponentFirewall(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.user.Interface.Mask authorizingUser() { return withSubMask("authorizingUser", com.softlayer.api.service.user.Interface.Mask.class); } public com.softlayer.api.service.virtual.Guest.Mask guest() { return withSubMask("guest", com.softlayer.api.service.virtual.Guest.Mask.class); } public com.softlayer.api.service.Hardware.Mask hardware() { return withSubMask("hardware", com.softlayer.api.service.Hardware.Mask.class); } public com.softlayer.api.service.network.component.Firewall.Mask networkComponentFirewall() { return withSubMask("networkComponentFirewall", com.softlayer.api.service.network.component.Firewall.Mask.class); } public com.softlayer.api.service.network.firewall.update.request.Rule.Mask rules() { return withSubMask("rules", com.softlayer.api.service.network.firewall.update.request.Rule.Mask.class); } public Mask applyDate() { withLocalProperty("applyDate"); return this; } public Mask authorizingUserId() { withLocalProperty("authorizingUserId"); return this; } public Mask authorizingUserType() { withLocalProperty("authorizingUserType"); return this; } public Mask bypassFlag() { withLocalProperty("bypassFlag"); return this; } public Mask createDate() { withLocalProperty("createDate"); return this; } public Mask firewallContextAccessControlListId() { withLocalProperty("firewallContextAccessControlListId"); return this; } public Mask hardwareId() { withLocalProperty("hardwareId"); return this; } public Mask id() { withLocalProperty("id"); return this; } public Mask networkComponentFirewallId() { withLocalProperty("networkComponentFirewallId"); return this; } public Mask ruleCount() { withLocalProperty("ruleCount"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy