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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the bgpSession property: The BGP session associated with the connection.Get the connectionIdentifier property: The unique identifier (GUID) for the connection.Get the connectionState property: The state of the connection.Get the errorMessage property: The error message related to the connection state, if any.static ExchangeConnectionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ExchangeConnection from the JsonReader.Get the peeringDBFacilityId property: The PeeringDB.com ID of the facility at which the connection has to be set up.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBgpSession(BgpSession bgpSession) Set the bgpSession property: The BGP session associated with the connection.withConnectionIdentifier(String connectionIdentifier) Set the connectionIdentifier property: The unique identifier (GUID) for the connection.withPeeringDBFacilityId(Integer peeringDBFacilityId) Set the peeringDBFacilityId property: The PeeringDB.com ID of the facility at which the connection has to be set up.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
-
ExchangeConnection
public ExchangeConnection()Creates an instance of ExchangeConnection class.
-
-
Method Details
-
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
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
Get the connectionState property: The state of the connection.- Returns:
- the connectionState value.
-
bgpSession
Get the bgpSession property: The BGP session associated with the connection.- Returns:
- the bgpSession value.
-
withBgpSession
Set the bgpSession property: The BGP session associated with the connection.- Parameters:
bgpSession- the bgpSession value to set.- Returns:
- the ExchangeConnection object itself.
-
connectionIdentifier
Get the connectionIdentifier property: The unique identifier (GUID) for the connection.- Returns:
- the connectionIdentifier value.
-
withConnectionIdentifier
Set the connectionIdentifier property: The unique identifier (GUID) for the connection.- Parameters:
connectionIdentifier- the connectionIdentifier value to set.- Returns:
- the ExchangeConnection object itself.
-
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ExchangeConnection>- Throws:
IOException
-
fromJson
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.
-