Package io.micronaut.gcp.pubsub.push
Record Class PushRequest.PushMessage
java.lang.Object
java.lang.Record
io.micronaut.gcp.pubsub.push.PushRequest.PushMessage
- Record Components:
attributes
- the message attributesdata
- the message data, encoded as a Base64 stringmessageId
- the message idpublishTime
- the publishing time of the message
- Enclosing class:
- PushRequest
public static record PushRequest.PushMessage(Map<String,String> attributes, String data, @NotBlank String messageId, @NotBlank String publishTime)
extends Record
The body of the deserialized push message.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributes
record component.data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotBlank String
Returns the value of themessageId
record component.@NotBlank String
Returns the value of thepublishTime
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PushMessage
public PushMessage(Map<String, String> attributes, String data, @NotBlank @NotBlank String messageId, @NotBlank @NotBlank String publishTime) Creates an instance of aPushMessage
record class.- Parameters:
attributes
- the value for theattributes
record componentdata
- the value for thedata
record componentmessageId
- the value for themessageId
record componentpublishTime
- the value for thepublishTime
record component
-
-
Method Details
-
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. -
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. -
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)
. -
attributes
Returns the value of theattributes
record component.- Returns:
- the value of the
attributes
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
messageId
Returns the value of themessageId
record component.- Returns:
- the value of the
messageId
record component
-
publishTime
Returns the value of thepublishTime
record component.- Returns:
- the value of the
publishTime
record component
-