Record Class PushRequest.PushMessage

java.lang.Object
java.lang.Record
io.micronaut.gcp.pubsub.push.PushRequest.PushMessage
Record Components:
attributes - the message attributes
data - the message data, encoded as a Base64 string
messageId - the message id
publishTime - 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 Details

    • PushMessage

      public PushMessage(Map<String,String> attributes, String data, @NotBlank @NotBlank String messageId, @NotBlank @NotBlank String publishTime)
      Creates an instance of a PushMessage record class.
      Parameters:
      attributes - the value for the attributes record component
      data - the value for the data record component
      messageId - the value for the messageId record component
      publishTime - the value for the publishTime record component
  • Method Details

    • 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.
    • attributes

      public Map<String,String> attributes()
      Returns the value of the attributes record component.
      Returns:
      the value of the attributes record component
    • data

      public String data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • messageId

      @NotBlank public @NotBlank String messageId()
      Returns the value of the messageId record component.
      Returns:
      the value of the messageId record component
    • publishTime

      @NotBlank public @NotBlank String publishTime()
      Returns the value of the publishTime record component.
      Returns:
      the value of the publishTime record component