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 -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectivitySourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ConnectivitySource from the JsonReader.port()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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()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, waitMethods 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
Get the resourceId property: The ID of the resource from which a connectivity check will be initiated.- Returns:
- the resourceId value.
-
withResourceId
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
Get the port property: The source port from which a connectivity check will be performed.- Returns:
- the port value.
-
withPort
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ConnectivitySource>- Throws:
IOException
-
fromJson
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.
-