PortRange Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. models. PortRange
- com.
Implements
public final class PortRange
implements JsonSerializable<PortRange>
The port range.
Constructor Summary
Constructor | Description |
---|---|
PortRange() |
Creates an instance of Port |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Port |
fromJson(JsonReader jsonReader)
Reads an instance of Port |
Integer |
portEnd()
Get the port |
Integer |
portStart()
Get the port |
Protocol |
protocol()
Get the protocol property: The network protocol of the port. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Port |
withPortEnd(Integer portEnd)
Set the port |
Port |
withPortStart(Integer portStart)
Set the port |
Port |
withProtocol(Protocol protocol)
Set the protocol property: The network protocol of the port. |
Methods inherited from java.lang.Object
Constructor Details
PortRange
public PortRange()
Creates an instance of PortRange class.
Method Details
fromJson
public static PortRange fromJson(JsonReader jsonReader)
Reads an instance of PortRange from the JsonReader.
Parameters:
Returns:
Throws:
portEnd
public Integer portEnd()
Get the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart.
Returns:
portStart
public Integer portStart()
Get the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd.
Returns:
protocol
public Protocol protocol()
Get the protocol property: The network protocol of the port.
Returns:
toJson
validate
public void validate()
Validates the instance.
withPortEnd
public PortRange withPortEnd(Integer portEnd)
Set the portEnd property: The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart.
Parameters:
Returns:
withPortStart
public PortRange withPortStart(Integer portStart)
Set the portStart property: The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd.
Parameters:
Returns:
withProtocol
public PortRange withProtocol(Protocol protocol)
Set the protocol property: The network protocol of the port.
Parameters:
Returns:
Applies to
Azure SDK for Java