Record Class NetworkNotification

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

public record NetworkNotification(EmgHeader header, TicketBody body, String rawJson) extends Record implements EmgMessage
Network maintenance or incident notification: Task.Resource Network.Maintenance or Network.Incident (schema 1.0), or a ticket-shaped DataCenter.Network.Port / DataCenter.Network.VirtualConnection notification (the spec maps those 2.0 resources to NetworkNotificationV2Body; when their body is instead Fabric-shaped, the parser produces a FabricNotification).
  • Constructor Details

    • NetworkNotification

      public NetworkNotification(EmgHeader header, TicketBody body, String rawJson)
      Creates an instance of a NetworkNotification 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

    • category

      public TicketCategory category()
      The event kind, derived from Task.Resource.
      Returns:
      the category, never null
    • 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 TicketBody 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