Class BgpSession

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

public final class BgpSession extends Object implements com.azure.json.JsonSerializable<BgpSession>
The properties that define a BGP session.
  • Constructor Details

    • BgpSession

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

    • sessionPrefixV4

      public String sessionPrefixV4()
      Get the sessionPrefixV4 property: The IPv4 prefix that contains both ends' IPv4 addresses.
      Returns:
      the sessionPrefixV4 value.
    • withSessionPrefixV4

      public BgpSession withSessionPrefixV4(String sessionPrefixV4)
      Set the sessionPrefixV4 property: The IPv4 prefix that contains both ends' IPv4 addresses.
      Parameters:
      sessionPrefixV4 - the sessionPrefixV4 value to set.
      Returns:
      the BgpSession object itself.
    • sessionPrefixV6

      public String sessionPrefixV6()
      Get the sessionPrefixV6 property: The IPv6 prefix that contains both ends' IPv6 addresses.
      Returns:
      the sessionPrefixV6 value.
    • withSessionPrefixV6

      public BgpSession withSessionPrefixV6(String sessionPrefixV6)
      Set the sessionPrefixV6 property: The IPv6 prefix that contains both ends' IPv6 addresses.
      Parameters:
      sessionPrefixV6 - the sessionPrefixV6 value to set.
      Returns:
      the BgpSession object itself.
    • microsoftSessionIPv4Address

      public String microsoftSessionIPv4Address()
      Get the microsoftSessionIPv4Address property: The IPv4 session address on Microsoft's end.
      Returns:
      the microsoftSessionIPv4Address value.
    • withMicrosoftSessionIPv4Address

      public BgpSession withMicrosoftSessionIPv4Address(String microsoftSessionIPv4Address)
      Set the microsoftSessionIPv4Address property: The IPv4 session address on Microsoft's end.
      Parameters:
      microsoftSessionIPv4Address - the microsoftSessionIPv4Address value to set.
      Returns:
      the BgpSession object itself.
    • microsoftSessionIPv6Address

      public String microsoftSessionIPv6Address()
      Get the microsoftSessionIPv6Address property: The IPv6 session address on Microsoft's end.
      Returns:
      the microsoftSessionIPv6Address value.
    • withMicrosoftSessionIPv6Address

      public BgpSession withMicrosoftSessionIPv6Address(String microsoftSessionIPv6Address)
      Set the microsoftSessionIPv6Address property: The IPv6 session address on Microsoft's end.
      Parameters:
      microsoftSessionIPv6Address - the microsoftSessionIPv6Address value to set.
      Returns:
      the BgpSession object itself.
    • peerSessionIPv4Address

      public String peerSessionIPv4Address()
      Get the peerSessionIPv4Address property: The IPv4 session address on peer's end.
      Returns:
      the peerSessionIPv4Address value.
    • withPeerSessionIPv4Address

      public BgpSession withPeerSessionIPv4Address(String peerSessionIPv4Address)
      Set the peerSessionIPv4Address property: The IPv4 session address on peer's end.
      Parameters:
      peerSessionIPv4Address - the peerSessionIPv4Address value to set.
      Returns:
      the BgpSession object itself.
    • peerSessionIPv6Address

      public String peerSessionIPv6Address()
      Get the peerSessionIPv6Address property: The IPv6 session address on peer's end.
      Returns:
      the peerSessionIPv6Address value.
    • withPeerSessionIPv6Address

      public BgpSession withPeerSessionIPv6Address(String peerSessionIPv6Address)
      Set the peerSessionIPv6Address property: The IPv6 session address on peer's end.
      Parameters:
      peerSessionIPv6Address - the peerSessionIPv6Address value to set.
      Returns:
      the BgpSession object itself.
    • sessionStateV4

      public SessionStateV4 sessionStateV4()
      Get the sessionStateV4 property: The state of the IPv4 session.
      Returns:
      the sessionStateV4 value.
    • sessionStateV6

      public SessionStateV6 sessionStateV6()
      Get the sessionStateV6 property: The state of the IPv6 session.
      Returns:
      the sessionStateV6 value.
    • maxPrefixesAdvertisedV4

      public Integer maxPrefixesAdvertisedV4()
      Get the maxPrefixesAdvertisedV4 property: The maximum number of prefixes advertised over the IPv4 session.
      Returns:
      the maxPrefixesAdvertisedV4 value.
    • withMaxPrefixesAdvertisedV4

      public BgpSession withMaxPrefixesAdvertisedV4(Integer maxPrefixesAdvertisedV4)
      Set the maxPrefixesAdvertisedV4 property: The maximum number of prefixes advertised over the IPv4 session.
      Parameters:
      maxPrefixesAdvertisedV4 - the maxPrefixesAdvertisedV4 value to set.
      Returns:
      the BgpSession object itself.
    • maxPrefixesAdvertisedV6

      public Integer maxPrefixesAdvertisedV6()
      Get the maxPrefixesAdvertisedV6 property: The maximum number of prefixes advertised over the IPv6 session.
      Returns:
      the maxPrefixesAdvertisedV6 value.
    • withMaxPrefixesAdvertisedV6

      public BgpSession withMaxPrefixesAdvertisedV6(Integer maxPrefixesAdvertisedV6)
      Set the maxPrefixesAdvertisedV6 property: The maximum number of prefixes advertised over the IPv6 session.
      Parameters:
      maxPrefixesAdvertisedV6 - the maxPrefixesAdvertisedV6 value to set.
      Returns:
      the BgpSession object itself.
    • md5AuthenticationKey

      public String md5AuthenticationKey()
      Get the md5AuthenticationKey property: The MD5 authentication key of the session.
      Returns:
      the md5AuthenticationKey value.
    • withMd5AuthenticationKey

      public BgpSession withMd5AuthenticationKey(String md5AuthenticationKey)
      Set the md5AuthenticationKey property: The MD5 authentication key of the session.
      Parameters:
      md5AuthenticationKey - the md5AuthenticationKey value to set.
      Returns:
      the BgpSession 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<BgpSession>
      Throws:
      IOException
    • fromJson

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