Class ExchangeConnection

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

public final class ExchangeConnection extends Object implements com.azure.json.JsonSerializable<ExchangeConnection>
The properties that define an exchange connection.
  • Constructor Details

    • ExchangeConnection

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

    • peeringDBFacilityId

      public Integer peeringDBFacilityId()
      Get the peeringDBFacilityId property: The PeeringDB.com ID of the facility at which the connection has to be set up.
      Returns:
      the peeringDBFacilityId value.
    • withPeeringDBFacilityId

      public ExchangeConnection withPeeringDBFacilityId(Integer peeringDBFacilityId)
      Set the peeringDBFacilityId property: The PeeringDB.com ID of the facility at which the connection has to be set up.
      Parameters:
      peeringDBFacilityId - the peeringDBFacilityId value to set.
      Returns:
      the ExchangeConnection object itself.
    • connectionState

      public ConnectionState connectionState()
      Get the connectionState property: The state of the connection.
      Returns:
      the connectionState value.
    • bgpSession

      public BgpSession bgpSession()
      Get the bgpSession property: The BGP session associated with the connection.
      Returns:
      the bgpSession value.
    • withBgpSession

      public ExchangeConnection withBgpSession(BgpSession bgpSession)
      Set the bgpSession property: The BGP session associated with the connection.
      Parameters:
      bgpSession - the bgpSession value to set.
      Returns:
      the ExchangeConnection object itself.
    • connectionIdentifier

      public String connectionIdentifier()
      Get the connectionIdentifier property: The unique identifier (GUID) for the connection.
      Returns:
      the connectionIdentifier value.
    • withConnectionIdentifier

      public ExchangeConnection withConnectionIdentifier(String connectionIdentifier)
      Set the connectionIdentifier property: The unique identifier (GUID) for the connection.
      Parameters:
      connectionIdentifier - the connectionIdentifier value to set.
      Returns:
      the ExchangeConnection object itself.
    • errorMessage

      public String errorMessage()
      Get the errorMessage property: The error message related to the connection state, if any.
      Returns:
      the errorMessage value.
    • 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<ExchangeConnection>
      Throws:
      IOException
    • fromJson

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