Class ConnectionState

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

public final class ConnectionState extends Object implements com.azure.json.JsonSerializable<ConnectionState>
ConnectionState information.
  • Constructor Details

    • ConnectionState

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

    • status

      public PrivateLinkConnectionStatus status()
      Get the status property: Status of the connection.
      Returns:
      the status value.
    • withStatus

      public ConnectionState withStatus(PrivateLinkConnectionStatus status)
      Set the status property: Status of the connection.
      Parameters:
      status - the status value to set.
      Returns:
      the ConnectionState object itself.
    • description

      public String description()
      Get the description property: Description of the connection state.
      Returns:
      the description value.
    • withDescription

      public ConnectionState withDescription(String description)
      Set the description property: Description of the connection state.
      Parameters:
      description - the description value to set.
      Returns:
      the ConnectionState 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<ConnectionState>
      Throws:
      IOException
    • fromJson

      public static ConnectionState fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ConnectionState from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ConnectionState 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 ConnectionState.