com.softlayer.api.service.network.securitygroup.Rule 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.securitygroup;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.network.SecurityGroup;
/**
* The SoftLayer_Network_SecurityGroup_Rule data type contains general information for a single rule that belongs to a [[SoftLayer_Network_SecurityGroup|security group]]. By default, all traffic (both inbound and
outbound) to a virtual server instance is blocked. Security group rules are permissive, and define the allowed incoming (ingress) and outgoing (egress) traffic to both the public and private interfaces of a
virtual server instance. The order of rules within a security group does not matter and priority always falls to the least restrictive rule.
*
* @see SoftLayer_Network_SecurityGroup_Rule
*/
@ApiType("SoftLayer_Network_SecurityGroup_Rule")
public class Rule extends Entity {
/**
* The remote security group allowed as part of this rule.
*/
@ApiProperty
protected SecurityGroup remoteGroup;
public SecurityGroup getRemoteGroup() {
return remoteGroup;
}
public void setRemoteGroup(SecurityGroup remoteGroup) {
this.remoteGroup = remoteGroup;
}
/**
* The security group of this rule.
*/
@ApiProperty
protected SecurityGroup securityGroup;
public SecurityGroup getSecurityGroup() {
return securityGroup;
}
public void setSecurityGroup(SecurityGroup securityGroup) {
this.securityGroup = securityGroup;
}
/**
* The direction of traffic (ingress or egress).
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String direction;
public String getDirection() {
return direction;
}
public void setDirection(String direction) {
directionSpecified = true;
this.direction = direction;
}
protected boolean directionSpecified;
public boolean isDirectionSpecified() {
return directionSpecified;
}
public void unsetDirection() {
direction = null;
directionSpecified = false;
}
/**
* IPv4 or IPv6. If the remoteIp or ethertype properties are not specified, the default is IPv4.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String ethertype;
public String getEthertype() {
return ethertype;
}
public void setEthertype(String ethertype) {
ethertypeSpecified = true;
this.ethertype = ethertype;
}
protected boolean ethertypeSpecified;
public boolean isEthertypeSpecified() {
return ethertypeSpecified;
}
public void unsetEthertype() {
ethertype = null;
ethertypeSpecified = false;
}
/**
* The unique ID for a rule.
*/
@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 end of the port range for allowed traffic.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long portRangeMax;
public Long getPortRangeMax() {
return portRangeMax;
}
public void setPortRangeMax(Long portRangeMax) {
portRangeMaxSpecified = true;
this.portRangeMax = portRangeMax;
}
protected boolean portRangeMaxSpecified;
public boolean isPortRangeMaxSpecified() {
return portRangeMaxSpecified;
}
public void unsetPortRangeMax() {
portRangeMax = null;
portRangeMaxSpecified = false;
}
/**
* The start of the port range for allowed traffic.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long portRangeMin;
public Long getPortRangeMin() {
return portRangeMin;
}
public void setPortRangeMin(Long portRangeMin) {
portRangeMinSpecified = true;
this.portRangeMin = portRangeMin;
}
protected boolean portRangeMinSpecified;
public boolean isPortRangeMinSpecified() {
return portRangeMinSpecified;
}
public void unsetPortRangeMin() {
portRangeMin = null;
portRangeMinSpecified = false;
}
/**
* The protocol of packets (icmp, tcp, or udp).
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String protocol;
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
protocolSpecified = true;
this.protocol = protocol;
}
protected boolean protocolSpecified;
public boolean isProtocolSpecified() {
return protocolSpecified;
}
public void unsetProtocol() {
protocol = null;
protocolSpecified = false;
}
/**
* The ID of the remote security group allowed as part of the rule. This property is mutually exclusive with the remoteIp property.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long remoteGroupId;
public Long getRemoteGroupId() {
return remoteGroupId;
}
public void setRemoteGroupId(Long remoteGroupId) {
remoteGroupIdSpecified = true;
this.remoteGroupId = remoteGroupId;
}
protected boolean remoteGroupIdSpecified;
public boolean isRemoteGroupIdSpecified() {
return remoteGroupIdSpecified;
}
public void unsetRemoteGroupId() {
remoteGroupId = null;
remoteGroupIdSpecified = false;
}
/**
* CIDR or IP address for allowed connections. This property is mutually exclusive with the remoteGroupId property.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String remoteIp;
public String getRemoteIp() {
return remoteIp;
}
public void setRemoteIp(String remoteIp) {
remoteIpSpecified = true;
this.remoteIp = remoteIp;
}
protected boolean remoteIpSpecified;
public boolean isRemoteIpSpecified() {
return remoteIpSpecified;
}
public void unsetRemoteIp() {
remoteIp = null;
remoteIpSpecified = false;
}
/**
* The ID of the security group that owns the rule.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long securityGroupId;
public Long getSecurityGroupId() {
return securityGroupId;
}
public void setSecurityGroupId(Long securityGroupId) {
securityGroupIdSpecified = true;
this.securityGroupId = securityGroupId;
}
protected boolean securityGroupIdSpecified;
public boolean isSecurityGroupIdSpecified() {
return securityGroupIdSpecified;
}
public void unsetSecurityGroupId() {
securityGroupId = null;
securityGroupIdSpecified = false;
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.network.SecurityGroup.Mask remoteGroup() {
return withSubMask("remoteGroup", com.softlayer.api.service.network.SecurityGroup.Mask.class);
}
public com.softlayer.api.service.network.SecurityGroup.Mask securityGroup() {
return withSubMask("securityGroup", com.softlayer.api.service.network.SecurityGroup.Mask.class);
}
public Mask direction() {
withLocalProperty("direction");
return this;
}
public Mask ethertype() {
withLocalProperty("ethertype");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask portRangeMax() {
withLocalProperty("portRangeMax");
return this;
}
public Mask portRangeMin() {
withLocalProperty("portRangeMin");
return this;
}
public Mask protocol() {
withLocalProperty("protocol");
return this;
}
public Mask remoteGroupId() {
withLocalProperty("remoteGroupId");
return this;
}
public Mask remoteIp() {
withLocalProperty("remoteIp");
return this;
}
public Mask securityGroupId() {
withLocalProperty("securityGroupId");
return this;
}
}
}