Record Class FabricNotification

java.lang.Object
java.lang.Record
com.eqixiac.equinix.messaging.FabricNotification
Record Components:
header - common header
body - the status-change details
rawJson - the envelope as received
All Implemented Interfaces:
EmgMessage

public record FabricNotification(EmgHeader header, FabricNotification.Body body, String rawJson) extends Record implements EmgMessage
Equinix Fabric port or virtual-connection operational-status notification (port/VC up or down), delivered with Task.Resource DataCenter.Network.Port or DataCenter.Network.VirtualConnection. Shape: the spec's FabricNotificationBody and the Fabric sample in the Notification Types guide.
  • Constructor Details

    • FabricNotification

      public FabricNotification(EmgHeader header, FabricNotification.Body body, String rawJson)
      Creates an instance of a FabricNotification record class.
      Parameters:
      header - the value for the header record component
      body - the value for the body record component
      rawJson - the value for the rawJson record component
  • Method Details

    • isDown

      public boolean isDown()
      Whether the affected port or connection is reported FabricNotification.OperationalStatus.DOWN.
      Returns:
      true only for an explicit DOWN status
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • header

      public EmgHeader header()
      Returns the value of the header record component.
      Specified by:
      header in interface EmgMessage
      Returns:
      the value of the header record component
    • body

      public FabricNotification.Body body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • rawJson

      public String rawJson()
      Returns the value of the rawJson record component.
      Specified by:
      rawJson in interface EmgMessage
      Returns:
      the value of the rawJson record component