Class Rule
- java.lang.Object
-
- org.jclouds.openstack.neutron.v2.domain.Rule
-
- Direct Known Subclasses:
Rule.CreateRule
public class Rule extends Object
Contains a mapping between a MAC address and an IP address.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Rule.Builder<ParameterizedBuilderType>
static class
Rule.CreateBuilder
This is used to build a CreateBuilder object.static class
Rule.CreateRule
Create and Update options - extend the domain class, passed to API update and create calls.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Rule(String id, String tenantId, RuleDirection direction, String securityGroupId, RuleEthertype ethertype, Integer portRangeMin, Integer portRangeMax, RuleProtocol protocol, String remoteGroupId, String remoteIpPrefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Rule.CreateBuilder
createBuilder(RuleDirection direction, String securityGroupId)
boolean
equals(Object o)
RuleDirection
getDirection()
RuleEthertype
getEthertype()
String
getId()
Integer
getPortRangeMax()
Integer
getPortRangeMin()
RuleProtocol
getProtocol()
String
getRemoteGroupId()
String
getRemoteIpPrefix()
String
getSecurityGroupId()
String
getTenantId()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
Rule
@ConstructorProperties({"id","tenant_id","direction","security_group_id","ethertype","port_range_min","port_range_max","protocol","remote_group_id","remote_ip_prefix"}) protected Rule(String id, String tenantId, RuleDirection direction, String securityGroupId, RuleEthertype ethertype, Integer portRangeMin, Integer portRangeMax, RuleProtocol protocol, String remoteGroupId, String remoteIpPrefix)
-
-
Method Detail
-
getTenantId
@Nullable public String getTenantId()
- Returns:
- The identifier of the tenant for this rule.
-
getDirection
@Nullable public RuleDirection getDirection()
- Returns:
- The direction in which the security group rule is applied.
-
getSecurityGroupId
@Nullable public String getSecurityGroupId()
- Returns:
- The security group ID to associate with this security group rule.
-
getEthertype
@Nullable public RuleEthertype getEthertype()
- Returns:
- The internet protocol version type of this rule.
-
getPortRangeMin
@Nullable public Integer getPortRangeMin()
- Returns:
- The minimum port number in the range that is matched by the security group rule. If the protocol is TCP or UDP, this value must be less than or equal to the value of the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
-
getPortRangeMax
@Nullable public Integer getPortRangeMax()
- Returns:
- The maximum port number in the range that is matched by the security group rule. The port_range_min attribute constrains the port_range_max attribute. If the protocol is ICMP, this value must be an ICMP type.
-
getProtocol
@Nullable public RuleProtocol getProtocol()
- Returns:
- The protocol that is matched by the security group rule. Valid values are null, tcp, udp, and icmp.
-
getRemoteGroupId
@Nullable public String getRemoteGroupId()
- Returns:
- The remote group ID to be associated with this security group rule.
-
getRemoteIpPrefix
@Nullable public String getRemoteIpPrefix()
- Returns:
- The remote IP prefix to be associated with this security group rule. This attribute matches the specified IP prefix as the source IP address of the IP packet.
-
createBuilder
public static Rule.CreateBuilder createBuilder(RuleDirection direction, String securityGroupId)
- Returns:
- the Builder for creating a new SecurityGroupRule
-
-