Class ConnectivitySource

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

public final class ConnectivitySource extends Object implements com.azure.json.JsonSerializable<ConnectivitySource>
Parameters that define the source of the connection.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ConnectivitySource class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ConnectivitySource from the JsonReader.
    Get the port property: The source port from which a connectivity check will be performed.
    Get the resourceId property: The ID of the resource from which a connectivity check will be initiated.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the port property: The source port from which a connectivity check will be performed.
    withResourceId(String resourceId)
    Set the resourceId property: The ID of the resource from which a connectivity check will be initiated.

    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

    • ConnectivitySource

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

    • resourceId

      public String resourceId()
      Get the resourceId property: The ID of the resource from which a connectivity check will be initiated.
      Returns:
      the resourceId value.
    • withResourceId

      public ConnectivitySource withResourceId(String resourceId)
      Set the resourceId property: The ID of the resource from which a connectivity check will be initiated.
      Parameters:
      resourceId - the resourceId value to set.
      Returns:
      the ConnectivitySource object itself.
    • port

      public Integer port()
      Get the port property: The source port from which a connectivity check will be performed.
      Returns:
      the port value.
    • withPort

      public ConnectivitySource withPort(Integer port)
      Set the port property: The source port from which a connectivity check will be performed.
      Parameters:
      port - the port value to set.
      Returns:
      the ConnectivitySource 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<ConnectivitySource>
      Throws:
      IOException
    • fromJson

      public static ConnectivitySource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ConnectivitySource from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ConnectivitySource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ConnectivitySource.