Class PeekedMessageItem

java.lang.Object
com.azure.storage.queue.models.PeekedMessageItem
All Implemented Interfaces:
com.azure.xml.XmlSerializable<PeekedMessageItem>

public final class PeekedMessageItem extends Object implements com.azure.xml.XmlSerializable<PeekedMessageItem>
The object returned in the QueueMessageList array when calling Peek Messages on a Queue.
  • Constructor Details

    • PeekedMessageItem

      public PeekedMessageItem()
      Creates an instance of PeekedMessageItem.
  • Method Details

    • getMessageId

      public String getMessageId()
      Get the messageId property: The Id of the Message.
      Returns:
      the messageId value.
    • setMessageId

      public PeekedMessageItem setMessageId(String messageId)
      Set the messageId property: The Id of the Message.
      Parameters:
      messageId - the messageId value to set.
      Returns:
      the PeekedMessageItem object itself.
    • getInsertionTime

      public OffsetDateTime getInsertionTime()
      Get the insertionTime property: The time the Message was inserted into the Queue.
      Returns:
      the insertionTime value.
    • setInsertionTime

      public PeekedMessageItem setInsertionTime(OffsetDateTime insertionTime)
      Set the insertionTime property: The time the Message was inserted into the Queue.
      Parameters:
      insertionTime - the insertionTime value to set.
      Returns:
      the PeekedMessageItem object itself.
    • getExpirationTime

      public OffsetDateTime getExpirationTime()
      Get the expirationTime property: The time that the Message will expire and be automatically deleted.
      Returns:
      the expirationTime value.
    • setExpirationTime

      public PeekedMessageItem setExpirationTime(OffsetDateTime expirationTime)
      Set the expirationTime property: The time that the Message will expire and be automatically deleted.
      Parameters:
      expirationTime - the expirationTime value to set.
      Returns:
      the PeekedMessageItem object itself.
    • getDequeueCount

      public long getDequeueCount()
      Get the dequeueCount property: The number of times the message has been dequeued.
      Returns:
      the dequeueCount value.
    • setDequeueCount

      public PeekedMessageItem setDequeueCount(long dequeueCount)
      Set the dequeueCount property: The number of times the message has been dequeued.
      Parameters:
      dequeueCount - the dequeueCount value to set.
      Returns:
      the PeekedMessageItem object itself.
    • getMessageText

      @Deprecated public String getMessageText()
      Deprecated.
      use getBody() instead.
      Get the messageText property: The content of the Message.
      Returns:
      the messageText value.
    • setMessageText

      @Deprecated public PeekedMessageItem setMessageText(String messageText)
      Deprecated.
      use setBody(BinaryData) instead.
      Set the messageText property: The content of the Message.
      Parameters:
      messageText - the messageText value to set.
      Returns:
      the PeekedMessageItem object itself.
    • getBody

      public com.azure.core.util.BinaryData getBody()
      Get the body property: The content of the Message.
      Returns:
      the body value.
    • setBody

      public PeekedMessageItem setBody(com.azure.core.util.BinaryData body)
      Set the body property: The content of the Message.
      Parameters:
      body - the body value to set.
      Returns:
      the PeekedMessageItem object itself.
    • toXml

      public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter) throws XMLStreamException
      Specified by:
      toXml in interface com.azure.xml.XmlSerializable<PeekedMessageItem>
      Throws:
      XMLStreamException
    • toXml

      public com.azure.xml.XmlWriter toXml(com.azure.xml.XmlWriter xmlWriter, String rootElementName) throws XMLStreamException
      Specified by:
      toXml in interface com.azure.xml.XmlSerializable<PeekedMessageItem>
      Throws:
      XMLStreamException
    • fromXml

      public static PeekedMessageItem fromXml(com.azure.xml.XmlReader xmlReader) throws XMLStreamException
      Reads an instance of PeekedMessageItem from the XmlReader.
      Parameters:
      xmlReader - The XmlReader being read.
      Returns:
      An instance of PeekedMessageItem if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
      Throws:
      IllegalStateException - If the deserialized XML object was missing any required properties.
      XMLStreamException - If an error occurs while reading the PeekedMessageItem.
    • fromXml

      public static PeekedMessageItem fromXml(com.azure.xml.XmlReader xmlReader, String rootElementName) throws XMLStreamException
      Reads an instance of PeekedMessageItem from the XmlReader.
      Parameters:
      xmlReader - The XmlReader being read.
      rootElementName - Optional root element name to override the default defined by the model. Used to support cases where the model can deserialize from different root element names.
      Returns:
      An instance of PeekedMessageItem if the XmlReader was pointing to an instance of it, or null if it was pointing to XML null.
      Throws:
      IllegalStateException - If the deserialized XML object was missing any required properties.
      XMLStreamException - If an error occurs while reading the PeekedMessageItem.