Class ConnectionMonitorSource
java.lang.Object
com.azure.resourcemanager.network.models.ConnectionMonitorSource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConnectionMonitorSource>
public final class ConnectionMonitorSource
extends Object
implements com.azure.json.JsonSerializable<ConnectionMonitorSource>
Describes the source of connection monitor.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ConnectionMonitorSource class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConnectionMonitorSourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ConnectionMonitorSource from the JsonReader.port()Get the port property: The source port used by connection monitor.Get the resourceId property: The ID of the resource used as the source by connection monitor.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the port property: The source port used by connection monitor.withResourceId(String resourceId) Set the resourceId property: The ID of the resource used as the source by connection monitor.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
-
ConnectionMonitorSource
public ConnectionMonitorSource()Creates an instance of ConnectionMonitorSource class.
-
-
Method Details
-
resourceId
Get the resourceId property: The ID of the resource used as the source by connection monitor.- Returns:
- the resourceId value.
-
withResourceId
Set the resourceId property: The ID of the resource used as the source by connection monitor.- Parameters:
resourceId- the resourceId value to set.- Returns:
- the ConnectionMonitorSource object itself.
-
port
Get the port property: The source port used by connection monitor.- Returns:
- the port value.
-
withPort
Set the port property: The source port used by connection monitor.- Parameters:
port- the port value to set.- Returns:
- the ConnectionMonitorSource 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<ConnectionMonitorSource>- Throws:
IOException
-
fromJson
public static ConnectionMonitorSource fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ConnectionMonitorSource from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ConnectionMonitorSource 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 ConnectionMonitorSource.
-