Record Class EmgHeader
java.lang.Object
java.lang.Record
com.eqixiac.equinix.messaging.EmgHeader
- Record Components:
id-Task.Id: unique per message; the natural idempotency keysource-Task.Source: identifies the sender; issued when EMG is enabledverb-Task.Verbresource-Task.Resource: the Equinix product, e.g.DataCenter.MaintenancecontentType-Task.ContentType, normallyapplication/jsoncreationTime-Task.CreationTimeUTC, ornullif absent or unparseableversion-Task.Version:"1.0"or"2.0"in the specsignature- the envelopeSignature(Base64, trimmed). Equinix does not document a verification algorithm, so the SDK exposes it but does not verify it.
public record EmgHeader(String id, String source, EmgVerb verb, String resource, String contentType, Instant creationTime, String version, String signature)
extends Record
The header attributes common to every EMG notification: the
Task attributes other than
Body, plus the envelope's Signature.
Attribute names are matched case-insensitively (Id and the documented ID are
the same), and CreateTimeUTC (the name in the header attribute list of the Notification
Types guide) is accepted as an alias of CreationTimeUTC (the name in the AsyncAPI spec and
every documented sample).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.Returns the value of thecreationTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.resource()Returns the value of theresourcerecord component.Returns the value of thesignaturerecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.verb()Returns the value of theverbrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
EmgHeader
public EmgHeader(String id, String source, EmgVerb verb, String resource, String contentType, Instant creationTime, String version, String signature) Creates an instance of aEmgHeaderrecord class.- Parameters:
id- the value for theidrecord componentsource- the value for thesourcerecord componentverb- the value for theverbrecord componentresource- the value for theresourcerecord componentcontentType- the value for thecontentTyperecord componentcreationTime- the value for thecreationTimerecord componentversion- the value for theversionrecord componentsignature- the value for thesignaturerecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
id
-
source
-
verb
-
resource
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
creationTime
Returns the value of thecreationTimerecord component.- Returns:
- the value of the
creationTimerecord component
-
version
-
signature
-