Class PeeringPropertiesDirect

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

public final class PeeringPropertiesDirect extends Object implements com.azure.json.JsonSerializable<PeeringPropertiesDirect>
The properties that define a direct peering.
  • Constructor Details

    • PeeringPropertiesDirect

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

    • connections

      public List<DirectConnection> connections()
      Get the connections property: The set of connections that constitute a direct peering.
      Returns:
      the connections value.
    • withConnections

      public PeeringPropertiesDirect withConnections(List<DirectConnection> connections)
      Set the connections property: The set of connections that constitute a direct peering.
      Parameters:
      connections - the connections value to set.
      Returns:
      the PeeringPropertiesDirect object itself.
    • useForPeeringService

      public Boolean useForPeeringService()
      Get the useForPeeringService property: The flag that indicates whether or not the peering is used for peering service.
      Returns:
      the useForPeeringService value.
    • peerAsn

      public com.azure.core.management.SubResource peerAsn()
      Get the peerAsn property: The reference of the peer ASN.
      Returns:
      the peerAsn value.
    • withPeerAsn

      public PeeringPropertiesDirect withPeerAsn(com.azure.core.management.SubResource peerAsn)
      Set the peerAsn property: The reference of the peer ASN.
      Parameters:
      peerAsn - the peerAsn value to set.
      Returns:
      the PeeringPropertiesDirect object itself.
    • directPeeringType

      public DirectPeeringType directPeeringType()
      Get the directPeeringType property: The type of direct peering.
      Returns:
      the directPeeringType value.
    • withDirectPeeringType

      public PeeringPropertiesDirect withDirectPeeringType(DirectPeeringType directPeeringType)
      Set the directPeeringType property: The type of direct peering.
      Parameters:
      directPeeringType - the directPeeringType value to set.
      Returns:
      the PeeringPropertiesDirect 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<PeeringPropertiesDirect>
      Throws:
      IOException
    • fromJson

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