Class ConnectionError
java.lang.Object
com.azure.resourcemanager.cosmos.models.ConnectionError
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ConnectionError>
public final class ConnectionError
extends Object
implements com.azure.json.JsonSerializable<ConnectionError>
The ConnectionError model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the connectionState property: The kind of connection error that occurred.Get the exception property: Detailed error message about the failed connection.static ConnectionError
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ConnectionError from the JsonReader.iPFrom()
Get the iPFrom property: The IP of host that originated the failed connection.iPTo()
Get the iPTo property: The IP that the connection attempted to reach.port()
Get the port property: The TCP port the connection was attempted on.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withConnectionState
(ConnectionState connectionState) Set the connectionState property: The kind of connection error that occurred.withException
(String exception) Set the exception property: Detailed error message about the failed connection.withIPFrom
(String iPFrom) Set the iPFrom property: The IP of host that originated the failed connection.Set the iPTo property: The IP that the connection attempted to reach.Set the port property: The TCP port the connection was attempted on.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
-
ConnectionError
public ConnectionError()Creates an instance of ConnectionError class.
-
-
Method Details
-
connectionState
Get the connectionState property: The kind of connection error that occurred.- Returns:
- the connectionState value.
-
withConnectionState
Set the connectionState property: The kind of connection error that occurred.- Parameters:
connectionState
- the connectionState value to set.- Returns:
- the ConnectionError object itself.
-
iPFrom
Get the iPFrom property: The IP of host that originated the failed connection.- Returns:
- the iPFrom value.
-
withIPFrom
Set the iPFrom property: The IP of host that originated the failed connection.- Parameters:
iPFrom
- the iPFrom value to set.- Returns:
- the ConnectionError object itself.
-
iPTo
Get the iPTo property: The IP that the connection attempted to reach.- Returns:
- the iPTo value.
-
withIPTo
Set the iPTo property: The IP that the connection attempted to reach.- Parameters:
iPTo
- the iPTo value to set.- Returns:
- the ConnectionError object itself.
-
port
Get the port property: The TCP port the connection was attempted on.- Returns:
- the port value.
-
withPort
Set the port property: The TCP port the connection was attempted on.- Parameters:
port
- the port value to set.- Returns:
- the ConnectionError object itself.
-
exception
Get the exception property: Detailed error message about the failed connection.- Returns:
- the exception value.
-
withException
Set the exception property: Detailed error message about the failed connection.- Parameters:
exception
- the exception value to set.- Returns:
- the ConnectionError 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<ConnectionError>
- Throws:
IOException
-
fromJson
Reads an instance of ConnectionError from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ConnectionError 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 ConnectionError.
-