PortRange Class
- java.
lang. Object - com.
azure. resourcemanager. oracledatabase. models. PortRange
- com.
Implements
public final class PortRange
implements JsonSerializable<PortRange>
Port Range to specify particular destination ports for TCP rules.
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 |
| int |
max()
Get the max property: The maximum port number, which must not be less than the minimum port number. |
| int |
min()
Get the min property: The minimum port number, which must not be greater than the maximum port number. |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Port |
withMax(int max)
Set the max property: The maximum port number, which must not be less than the minimum port number. |
|
Port |
withMin(int min)
Set the min property: The minimum port number, which must not be greater than the maximum port number. |
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:
max
public int max()
Get the max property: The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.
Returns:
min
public int min()
Get the min property: The minimum port number, which must not be greater than the maximum port number.
Returns:
toJson
validate
public void validate()
Validates the instance.
withMax
public PortRange withMax(int max)
Set the max property: The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.
Parameters:
Returns:
withMin
public PortRange withMin(int min)
Set the min property: The minimum port number, which must not be greater than the maximum port number.
Parameters:
Returns: