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 Details

    • ConnectionError

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

    • connectionState

      public ConnectionState connectionState()
      Get the connectionState property: The kind of connection error that occurred.
      Returns:
      the connectionState value.
    • withConnectionState

      public ConnectionError withConnectionState(ConnectionState connectionState)
      Set the connectionState property: The kind of connection error that occurred.
      Parameters:
      connectionState - the connectionState value to set.
      Returns:
      the ConnectionError object itself.
    • iPFrom

      public String iPFrom()
      Get the iPFrom property: The IP of host that originated the failed connection.
      Returns:
      the iPFrom value.
    • withIPFrom

      public ConnectionError withIPFrom(String iPFrom)
      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

      public String iPTo()
      Get the iPTo property: The IP that the connection attempted to reach.
      Returns:
      the iPTo value.
    • withIPTo

      public ConnectionError withIPTo(String iPTo)
      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

      public Integer port()
      Get the port property: The TCP port the connection was attempted on.
      Returns:
      the port value.
    • withPort

      public ConnectionError withPort(Integer port)
      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

      public String exception()
      Get the exception property: Detailed error message about the failed connection.
      Returns:
      the exception value.
    • withException

      public ConnectionError withException(String exception)
      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

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

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