@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PortRange extends Object implements Serializable, Cloneable, StructuredPojo
A single port range specification. This is used for source and destination port ranges in the stateless rule
MatchAttributes, SourcePorts
, and DestinationPorts
settings.
Constructor and Description |
---|
PortRange() |
Modifier and Type | Method and Description |
---|---|
PortRange |
clone() |
boolean |
equals(Object obj) |
Integer |
getFromPort()
The lower limit of the port range.
|
Integer |
getToPort()
The upper limit of the port range.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFromPort(Integer fromPort)
The lower limit of the port range.
|
void |
setToPort(Integer toPort)
The upper limit of the port range.
|
String |
toString()
Returns a string representation of this object.
|
PortRange |
withFromPort(Integer fromPort)
The lower limit of the port range.
|
PortRange |
withToPort(Integer toPort)
The upper limit of the port range.
|
public void setFromPort(Integer fromPort)
The lower limit of the port range. This must be less than or equal to the ToPort
specification.
fromPort
- The lower limit of the port range. This must be less than or equal to the ToPort
specification.public Integer getFromPort()
The lower limit of the port range. This must be less than or equal to the ToPort
specification.
ToPort
specification.public PortRange withFromPort(Integer fromPort)
The lower limit of the port range. This must be less than or equal to the ToPort
specification.
fromPort
- The lower limit of the port range. This must be less than or equal to the ToPort
specification.public void setToPort(Integer toPort)
The upper limit of the port range. This must be greater than or equal to the FromPort
specification.
toPort
- The upper limit of the port range. This must be greater than or equal to the FromPort
specification.public Integer getToPort()
The upper limit of the port range. This must be greater than or equal to the FromPort
specification.
FromPort
specification.public PortRange withToPort(Integer toPort)
The upper limit of the port range. This must be greater than or equal to the FromPort
specification.
toPort
- The upper limit of the port range. This must be greater than or equal to the FromPort
specification.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.