java.lang.Object
com.azure.resourcemanager.devtestlabs.models.Port
All Implemented Interfaces:
com.azure.json.JsonSerializable<Port>

public final class Port extends Object implements com.azure.json.JsonSerializable<Port>
Properties of a network port.
  • Constructor Details

    • Port

      public Port()
      Creates an instance of Port class.
  • Method Details

    • transportProtocol

      public TransportProtocol transportProtocol()
      Get the transportProtocol property: Protocol type of the port.
      Returns:
      the transportProtocol value.
    • withTransportProtocol

      public Port withTransportProtocol(TransportProtocol transportProtocol)
      Set the transportProtocol property: Protocol type of the port.
      Parameters:
      transportProtocol - the transportProtocol value to set.
      Returns:
      the Port object itself.
    • backendPort

      public Integer backendPort()
      Get the backendPort property: Backend port of the target virtual machine.
      Returns:
      the backendPort value.
    • withBackendPort

      public Port withBackendPort(Integer backendPort)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<Port>
      Throws:
      IOException
    • fromJson

      public static Port fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.