Class PortRange
java.lang.Object
com.azure.resourcemanager.containerservice.models.PortRange
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PortRange>
The port range.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PortRangefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PortRange from the JsonReader.portEnd()Get the portEnd property: The maximum port that is included in the range.Get the portStart property: The minimum port that is included in the range.protocol()Get the protocol property: The network protocol of the port.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withPortEnd(Integer portEnd) Set the portEnd property: The maximum port that is included in the range.withPortStart(Integer portStart) Set the portStart property: The minimum port that is included in the range.withProtocol(Protocol protocol) Set the protocol property: The network protocol of the port.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PortRange
public PortRange()Creates an instance of PortRange class.
-
-
Method Details
-
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:
- the portStart value.
-
withPortStart
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:
portStart- the portStart value to set.- Returns:
- the PortRange object itself.
-
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:
- the portEnd value.
-
withPortEnd
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:
portEnd- the portEnd value to set.- Returns:
- the PortRange object itself.
-
protocol
Get the protocol property: The network protocol of the port.- Returns:
- the protocol value.
-
withProtocol
Set the protocol property: The network protocol of the port.- Parameters:
protocol- the protocol value to set.- Returns:
- the PortRange object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<PortRange>- Throws:
IOException
-
fromJson
Reads an instance of PortRange from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PortRange if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the PortRange.
-