Class Port
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.Port
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Port>
Properties of a network port.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the backendPort property: Backend port of the target virtual machine.static Port
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of Port from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Get the transportProtocol property: Protocol type of the port.void
validate()
Validates the instance.withBackendPort
(Integer backendPort) Set the backendPort property: Backend port of the target virtual machine.withTransportProtocol
(TransportProtocol transportProtocol) Set the transportProtocol property: Protocol type of the port.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Port
public Port()Creates an instance of Port class.
-
-
Method Details
-
transportProtocol
Get the transportProtocol property: Protocol type of the port.- Returns:
- the transportProtocol value.
-
withTransportProtocol
Set the transportProtocol property: Protocol type of the port.- Parameters:
transportProtocol
- the transportProtocol value to set.- Returns:
- the Port object itself.
-
backendPort
Get the backendPort property: Backend port of the target virtual machine.- Returns:
- the backendPort value.
-
withBackendPort
Set the backendPort property: Backend port of the target virtual machine.- Parameters:
backendPort
- the backendPort value to set.- Returns:
- the Port object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<Port>
- Throws:
IOException
-
fromJson
Reads an instance of Port from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of Port 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 Port.
-