@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PortRange extends Object implements Serializable, Cloneable, StructuredPojo
The range of ports the rule applies to.
Constructor and Description |
---|
PortRange() |
Modifier and Type | Method and Description |
---|---|
PortRange |
clone() |
boolean |
equals(Object obj) |
Integer |
getFrom()
The first port in the range.
|
Integer |
getTo()
The last port in the range.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFrom(Integer from)
The first port in the range.
|
void |
setTo(Integer to)
The last port in the range.
|
String |
toString()
Returns a string representation of this object.
|
PortRange |
withFrom(Integer from)
The first port in the range.
|
PortRange |
withTo(Integer to)
The last port in the range.
|
public void setFrom(Integer from)
The first port in the range.
from
- The first port in the range.public Integer getFrom()
The first port in the range.
public PortRange withFrom(Integer from)
The first port in the range.
from
- The first port in the range.public void setTo(Integer to)
The last port in the range.
to
- The last port in the range.public Integer getTo()
The last port in the range.
public PortRange withTo(Integer to)
The last port in the range.
to
- The last port in the range.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.