Package com.microsoft.graph.models
Class Message
java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.OutlookItem
com.microsoft.graph.models.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
-
Field Summary
Fields inherited from class com.microsoft.graph.models.Entity
backingStore -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MessagecreateFromDiscriminatorValue(com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator valueGets the attachments property value.Gets the bccRecipients property value.getBody()Gets the body property value.Gets the bodyPreview property value.Gets the ccRecipients property value.Gets the conversationId property value.byte[]Gets the conversationIndex property value.Gets the extensions property value.The deserialization information for the current modelgetFlag()Gets the flag property value.getFrom()Gets the from property value.Gets the hasAttachments property value.Gets the importance property value.Gets the inferenceClassification property value.Gets the internetMessageHeaders property value.Gets the internetMessageId property value.Gets the isDeliveryReceiptRequested property value.Gets the isDraft property value.Gets the isRead property value.Gets the isReadReceiptRequested property value.Gets the multiValueExtendedProperties property value.Gets the parentFolderId property value.Gets the receivedDateTime property value.Gets the replyTo property value.Gets the sender property value.Gets the sentDateTime property value.Gets the singleValueExtendedProperties property value.Gets the subject property value.Gets the toRecipients property value.Gets the uniqueBody property value.Gets the webLink property value.voidserialize(com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current objectvoidsetAttachments(List<Attachment> value) Sets the attachments property value.voidsetBccRecipients(List<Recipient> value) Sets the bccRecipients property value.voidSets the body property value.voidsetBodyPreview(String value) Sets the bodyPreview property value.voidsetCcRecipients(List<Recipient> value) Sets the ccRecipients property value.voidsetConversationId(String value) Sets the conversationId property value.voidsetConversationIndex(byte[] value) Sets the conversationIndex property value.voidsetExtensions(List<Extension> value) Sets the extensions property value.voidsetFlag(FollowupFlag value) Sets the flag property value.voidSets the from property value.voidsetHasAttachments(Boolean value) Sets the hasAttachments property value.voidsetImportance(Importance value) Sets the importance property value.voidSets the inferenceClassification property value.voidSets the internetMessageHeaders property value.voidsetInternetMessageId(String value) Sets the internetMessageId property value.voidSets the isDeliveryReceiptRequested property value.voidsetIsDraft(Boolean value) Sets the isDraft property value.voidSets the isRead property value.voidsetIsReadReceiptRequested(Boolean value) Sets the isReadReceiptRequested property value.voidSets the multiValueExtendedProperties property value.voidsetParentFolderId(String value) Sets the parentFolderId property value.voidSets the receivedDateTime property value.voidsetReplyTo(List<Recipient> value) Sets the replyTo property value.voidSets the sender property value.voidsetSentDateTime(OffsetDateTime value) Sets the sentDateTime property value.voidSets the singleValueExtendedProperties property value.voidsetSubject(String value) Sets the subject property value.voidsetToRecipients(List<Recipient> value) Sets the toRecipients property value.voidsetUniqueBody(ItemBody value) Sets the uniqueBody property value.voidsetWebLink(String value) Sets the webLink property value.Methods inherited from class com.microsoft.graph.models.OutlookItem
getCategories, getChangeKey, getCreatedDateTime, getLastModifiedDateTime, setCategories, setChangeKey, setCreatedDateTime, setLastModifiedDateTimeMethods inherited from class com.microsoft.graph.models.Entity
getAdditionalData, getBackingStore, getId, getOdataType, setAdditionalData, setBackingStore, setId, setOdataType
-
Constructor Details
-
Message
public Message()Instantiates a newMessageand 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
Gets the attachments property value. The fileAttachment and itemAttachment attachments for the message.- Returns:
- a
List<Attachment>
-
getBccRecipients
Gets the bccRecipients property value. The Bcc: recipients for the message. -
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
Gets the bodyPreview property value. The first 255 characters of the message body. It is in text format.- Returns:
- a
String
-
getCcRecipients
Gets the ccRecipients property value. The Cc: recipients for the message. -
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
Gets the extensions property value. The collection of open extensions defined for the message. Nullable. -
getFieldDeserializers
@Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()The deserialization information for the current model- Specified by:
getFieldDeserializersin interfacecom.microsoft.kiota.serialization.Parsable- Overrides:
getFieldDeserializersin classOutlookItem- Returns:
- a
Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
-
getFlag
Gets the flag property value. Indicates the status, start date, due date, or completion date for the message.- Returns:
- a
FollowupFlag
-
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
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
Gets the importance property value. The importance of the message. The possible values are: low, normal, and high.- Returns:
- a
Importance
-
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
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
Gets the internetMessageId property value. The message ID in the format specified by RFC2822.- Returns:
- a
String
-
getIsDeliveryReceiptRequested
Gets the isDeliveryReceiptRequested property value. Indicates whether a read receipt is requested for the message.- Returns:
- a
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
Gets the isRead property value. Indicates whether the message has been read.- Returns:
- a
Boolean
-
getIsReadReceiptRequested
Gets the isReadReceiptRequested property value. Indicates whether a read receipt is requested for the message.- Returns:
- a
Boolean
-
getMultiValueExtendedProperties
Gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the message. Nullable.- Returns:
- a
List<MultiValueLegacyExtendedProperty>
-
getParentFolderId
Gets the parentFolderId property value. The unique identifier for the message's parent mailFolder.- Returns:
- a
String
-
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
Gets the replyTo property value. The email addresses to use when replying. -
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
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
Gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the message. Nullable.- Returns:
- a
List<SingleValueLegacyExtendedProperty>
-
getSubject
Gets the subject property value. The subject of the message.- Returns:
- a
String
-
getToRecipients
Gets the toRecipients property value. The To: recipients for the message. -
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
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.- Returns:
- a
String
-
serialize
public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current object- Specified by:
serializein interfacecom.microsoft.kiota.serialization.Parsable- Overrides:
serializein classOutlookItem- Parameters:
writer- Serialization writer to use to serialize this model
-
setAttachments
Sets the attachments property value. The fileAttachment and itemAttachment attachments for the message.- Parameters:
value- Value to set for the attachments property.
-
setBccRecipients
Sets the bccRecipients property value. The Bcc: recipients for the message.- Parameters:
value- Value to set for the bccRecipients property.
-
setBody
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
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
Sets the ccRecipients property value. The Cc: recipients for the message.- Parameters:
value- Value to set for the ccRecipients property.
-
setConversationId
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
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
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
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
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
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
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
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
Sets the internetMessageId property value. The message ID in the format specified by RFC2822.- Parameters:
value- Value to set for the internetMessageId property.
-
setIsDeliveryReceiptRequested
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
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
Sets the isRead property value. Indicates whether the message has been read.- Parameters:
value- Value to set for the isRead property.
-
setIsReadReceiptRequested
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
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
Sets the parentFolderId property value. The unique identifier for the message's parent mailFolder.- Parameters:
value- Value to set for the parentFolderId property.
-
setReceivedDateTime
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
Sets the replyTo property value. The email addresses to use when replying.- Parameters:
value- Value to set for the replyTo property.
-
setSender
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
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
Sets the subject property value. The subject of the message.- Parameters:
value- Value to set for the subject property.
-
setToRecipients
Sets the toRecipients property value. The To: recipients for the message.- Parameters:
value- Value to set for the toRecipients property.
-
setUniqueBody
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
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.- Parameters:
value- Value to set for the webLink property.
-