Class Message

All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder, com.microsoft.kiota.serialization.Parsable, com.microsoft.kiota.store.BackedModel
Direct Known Subclasses:
CalendarSharingMessage, EventMessage

@Generated("com.microsoft.kiota") public class Message extends OutlookItem implements com.microsoft.kiota.serialization.Parsable
  • Constructor Details

    • Message

      public Message()
      Instantiates a new Message and sets the default values.
  • Method Details

    • createFromDiscriminatorValue

      @Nonnull public static Message createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode)
      Creates a new instance of the appropriate class based on discriminator value
      Parameters:
      parseNode - The parse node to use to read the discriminator value and create the object
      Returns:
      a Message
    • getAttachments

      @Nullable public List<Attachment> getAttachments()
      Gets the attachments property value. The fileAttachment and itemAttachment attachments for the message.
      Returns:
      a List<Attachment>
    • getBccRecipients

      @Nullable public List<Recipient> getBccRecipients()
      Gets the bccRecipients property value. The Bcc: recipients for the message.
      Returns:
      a List<Recipient>
    • getBody

      @Nullable public ItemBody getBody()
      Gets the body property value. The body of the message. It can be in HTML or text format. Find out about safe HTML in a message body.
      Returns:
      a ItemBody
    • getBodyPreview

      @Nullable public String getBodyPreview()
      Gets the bodyPreview property value. The first 255 characters of the message body. It is in text format.
      Returns:
      a String
    • getCcRecipients

      @Nullable public List<Recipient> getCcRecipients()
      Gets the ccRecipients property value. The Cc: recipients for the message.
      Returns:
      a List<Recipient>
    • getConversationId

      @Nullable public String getConversationId()
      Gets the conversationId property value. The ID of the conversation the email belongs to.
      Returns:
      a String
    • getConversationIndex

      @Nullable public byte[] getConversationIndex()
      Gets the conversationIndex property value. Indicates the position of the message within the conversation.
      Returns:
      a
      invalid reference
      byte[]
    • getExtensions

      @Nullable public List<Extension> getExtensions()
      Gets the extensions property value. The collection of open extensions defined for the message. Nullable.
      Returns:
      a List<Extension>
    • getFieldDeserializers

      @Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()
      The deserialization information for the current model
      Specified by:
      getFieldDeserializers in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class OutlookItem
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getFlag

      @Nullable public FollowupFlag getFlag()
      Gets the flag property value. Indicates the status, start date, due date, or completion date for the message.
      Returns:
      a FollowupFlag
    • getFrom

      @Nullable public Recipient getFrom()
      Gets the from property value. The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message.
      Returns:
      a Recipient
    • getHasAttachments

      @Nullable public Boolean getHasAttachments()
      Gets the hasAttachments property value. Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>.
      Returns:
      a Boolean
    • getImportance

      @Nullable public Importance getImportance()
      Gets the importance property value. The importance of the message. The possible values are: low, normal, and high.
      Returns:
      a Importance
    • getInferenceClassification

      @Nullable public InferenceClassificationType getInferenceClassification()
      Gets the inferenceClassification property value. The classification of the message for the user, based on inferred relevance or importance, or on an explicit override. The possible values are: focused or other.
      Returns:
      a InferenceClassificationType
    • getInternetMessageHeaders

      @Nullable public List<InternetMessageHeader> getInternetMessageHeaders()
      Gets the internetMessageHeaders property value. A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only.
      Returns:
      a List<InternetMessageHeader>
    • getInternetMessageId

      @Nullable public String getInternetMessageId()
      Gets the internetMessageId property value. The message ID in the format specified by RFC2822.
      Returns:
      a String
    • getIsDeliveryReceiptRequested

      @Nullable public Boolean getIsDeliveryReceiptRequested()
      Gets the isDeliveryReceiptRequested property value. Indicates whether a read receipt is requested for the message.
      Returns:
      a Boolean
    • getIsDraft

      @Nullable public Boolean getIsDraft()
      Gets the isDraft property value. Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.
      Returns:
      a Boolean
    • getIsRead

      @Nullable public Boolean getIsRead()
      Gets the isRead property value. Indicates whether the message has been read.
      Returns:
      a Boolean
    • getIsReadReceiptRequested

      @Nullable public Boolean getIsReadReceiptRequested()
      Gets the isReadReceiptRequested property value. Indicates whether a read receipt is requested for the message.
      Returns:
      a Boolean
    • getMultiValueExtendedProperties

      @Nullable public List<MultiValueLegacyExtendedProperty> getMultiValueExtendedProperties()
      Gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the message. Nullable.
      Returns:
      a List<MultiValueLegacyExtendedProperty>
    • getParentFolderId

      @Nullable public String getParentFolderId()
      Gets the parentFolderId property value. The unique identifier for the message's parent mailFolder.
      Returns:
      a String
    • getReceivedDateTime

      @Nullable public OffsetDateTime getReceivedDateTime()
      Gets the receivedDateTime property value. The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
      Returns:
      a OffsetDateTime
    • getReplyTo

      @Nullable public List<Recipient> getReplyTo()
      Gets the replyTo property value. The email addresses to use when replying.
      Returns:
      a List<Recipient>
    • getSender

      @Nullable public Recipient getSender()
      Gets the sender property value. The account that is used to generate the message. In most cases, this value is the same as the from property. You can set this property to a different value when sending a message from a shared mailbox, for a shared calendar, or as a delegate. In any case, the value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message.
      Returns:
      a Recipient
    • getSentDateTime

      @Nullable public OffsetDateTime getSentDateTime()
      Gets the sentDateTime property value. The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
      Returns:
      a OffsetDateTime
    • getSingleValueExtendedProperties

      @Nullable public List<SingleValueLegacyExtendedProperty> getSingleValueExtendedProperties()
      Gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the message. Nullable.
      Returns:
      a List<SingleValueLegacyExtendedProperty>
    • getSubject

      @Nullable public String getSubject()
      Gets the subject property value. The subject of the message.
      Returns:
      a String
    • getToRecipients

      @Nullable public List<Recipient> getToRecipients()
      Gets the toRecipients property value. The To: recipients for the message.
      Returns:
      a List<Recipient>
    • getUniqueBody

      @Nullable public ItemBody getUniqueBody()
      Gets the uniqueBody property value. The part of the body of the message that is unique to the current message. uniqueBody is not returned by default but can be retrieved for a given message by use of the ?$select=uniqueBody query. It can be in HTML or text format.
      Returns:
      a ItemBody
    • getWebLink

      @Nullable public String getWebLink()
      Gets the webLink property value. The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.NOTE: When using this URL to access a message from a mailbox with delegate permissions, both the signed-in user and the target mailbox must be in the same database region. For example, an error is returned when a user with a mailbox in the EUR (Europe) region attempts to access messages from a mailbox in the NAM (North America) region.
      Returns:
      a String
    • serialize

      public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer)
      Serializes information the current object
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class OutlookItem
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setAttachments

      public void setAttachments(@Nullable List<Attachment> value)
      Sets the attachments property value. The fileAttachment and itemAttachment attachments for the message.
      Parameters:
      value - Value to set for the attachments property.
    • setBccRecipients

      public void setBccRecipients(@Nullable List<Recipient> value)
      Sets the bccRecipients property value. The Bcc: recipients for the message.
      Parameters:
      value - Value to set for the bccRecipients property.
    • setBody

      public void setBody(@Nullable ItemBody value)
      Sets the body property value. The body of the message. It can be in HTML or text format. Find out about safe HTML in a message body.
      Parameters:
      value - Value to set for the body property.
    • setBodyPreview

      public void setBodyPreview(@Nullable String value)
      Sets the bodyPreview property value. The first 255 characters of the message body. It is in text format.
      Parameters:
      value - Value to set for the bodyPreview property.
    • setCcRecipients

      public void setCcRecipients(@Nullable List<Recipient> value)
      Sets the ccRecipients property value. The Cc: recipients for the message.
      Parameters:
      value - Value to set for the ccRecipients property.
    • setConversationId

      public void setConversationId(@Nullable String value)
      Sets the conversationId property value. The ID of the conversation the email belongs to.
      Parameters:
      value - Value to set for the conversationId property.
    • setConversationIndex

      public void setConversationIndex(@Nullable byte[] value)
      Sets the conversationIndex property value. Indicates the position of the message within the conversation.
      Parameters:
      value - Value to set for the conversationIndex property.
    • setExtensions

      public void setExtensions(@Nullable List<Extension> value)
      Sets the extensions property value. The collection of open extensions defined for the message. Nullable.
      Parameters:
      value - Value to set for the extensions property.
    • setFlag

      public void setFlag(@Nullable FollowupFlag value)
      Sets the flag property value. Indicates the status, start date, due date, or completion date for the message.
      Parameters:
      value - Value to set for the flag property.
    • setFrom

      public void setFrom(@Nullable Recipient value)
      Sets the from property value. The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message.
      Parameters:
      value - Value to set for the from property.
    • setHasAttachments

      public void setHasAttachments(@Nullable Boolean value)
      Sets the hasAttachments property value. Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>.
      Parameters:
      value - Value to set for the hasAttachments property.
    • setImportance

      public void setImportance(@Nullable Importance value)
      Sets the importance property value. The importance of the message. The possible values are: low, normal, and high.
      Parameters:
      value - Value to set for the importance property.
    • setInferenceClassification

      public void setInferenceClassification(@Nullable InferenceClassificationType value)
      Sets the inferenceClassification property value. The classification of the message for the user, based on inferred relevance or importance, or on an explicit override. The possible values are: focused or other.
      Parameters:
      value - Value to set for the inferenceClassification property.
    • setInternetMessageHeaders

      public void setInternetMessageHeaders(@Nullable List<InternetMessageHeader> value)
      Sets the internetMessageHeaders property value. A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only.
      Parameters:
      value - Value to set for the internetMessageHeaders property.
    • setInternetMessageId

      public void setInternetMessageId(@Nullable String value)
      Sets the internetMessageId property value. The message ID in the format specified by RFC2822.
      Parameters:
      value - Value to set for the internetMessageId property.
    • setIsDeliveryReceiptRequested

      public void setIsDeliveryReceiptRequested(@Nullable Boolean value)
      Sets the isDeliveryReceiptRequested property value. Indicates whether a read receipt is requested for the message.
      Parameters:
      value - Value to set for the isDeliveryReceiptRequested property.
    • setIsDraft

      public void setIsDraft(@Nullable Boolean value)
      Sets the isDraft property value. Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.
      Parameters:
      value - Value to set for the isDraft property.
    • setIsRead

      public void setIsRead(@Nullable Boolean value)
      Sets the isRead property value. Indicates whether the message has been read.
      Parameters:
      value - Value to set for the isRead property.
    • setIsReadReceiptRequested

      public void setIsReadReceiptRequested(@Nullable Boolean value)
      Sets the isReadReceiptRequested property value. Indicates whether a read receipt is requested for the message.
      Parameters:
      value - Value to set for the isReadReceiptRequested property.
    • setMultiValueExtendedProperties

      public void setMultiValueExtendedProperties(@Nullable List<MultiValueLegacyExtendedProperty> value)
      Sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the message. Nullable.
      Parameters:
      value - Value to set for the multiValueExtendedProperties property.
    • setParentFolderId

      public void setParentFolderId(@Nullable String value)
      Sets the parentFolderId property value. The unique identifier for the message's parent mailFolder.
      Parameters:
      value - Value to set for the parentFolderId property.
    • setReceivedDateTime

      public void setReceivedDateTime(@Nullable OffsetDateTime value)
      Sets the receivedDateTime property value. The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
      Parameters:
      value - Value to set for the receivedDateTime property.
    • setReplyTo

      public void setReplyTo(@Nullable List<Recipient> value)
      Sets the replyTo property value. The email addresses to use when replying.
      Parameters:
      value - Value to set for the replyTo property.
    • setSender

      public void setSender(@Nullable Recipient value)
      Sets the sender property value. The account that is used to generate the message. In most cases, this value is the same as the from property. You can set this property to a different value when sending a message from a shared mailbox, for a shared calendar, or as a delegate. In any case, the value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message.
      Parameters:
      value - Value to set for the sender property.
    • setSentDateTime

      public void setSentDateTime(@Nullable OffsetDateTime value)
      Sets the sentDateTime property value. The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
      Parameters:
      value - Value to set for the sentDateTime property.
    • setSingleValueExtendedProperties

      public void setSingleValueExtendedProperties(@Nullable List<SingleValueLegacyExtendedProperty> value)
      Sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the message. Nullable.
      Parameters:
      value - Value to set for the singleValueExtendedProperties property.
    • setSubject

      public void setSubject(@Nullable String value)
      Sets the subject property value. The subject of the message.
      Parameters:
      value - Value to set for the subject property.
    • setToRecipients

      public void setToRecipients(@Nullable List<Recipient> value)
      Sets the toRecipients property value. The To: recipients for the message.
      Parameters:
      value - Value to set for the toRecipients property.
    • setUniqueBody

      public void setUniqueBody(@Nullable ItemBody value)
      Sets the uniqueBody property value. The part of the body of the message that is unique to the current message. uniqueBody is not returned by default but can be retrieved for a given message by use of the ?$select=uniqueBody query. It can be in HTML or text format.
      Parameters:
      value - Value to set for the uniqueBody property.
    • setWebLink

      public void setWebLink(@Nullable String value)
      Sets the webLink property value. The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame.NOTE: When using this URL to access a message from a mailbox with delegate permissions, both the signed-in user and the target mailbox must be in the same database region. For example, an error is returned when a user with a mailbox in the EUR (Europe) region attempts to access messages from a mailbox in the NAM (North America) region.
      Parameters:
      value - Value to set for the webLink property.