Class Message

  • All Implemented Interfaces:
    com.github.davidmoten.odata.client.ODataEntityType, com.github.davidmoten.odata.client.ODataType
    Direct Known Subclasses:
    CalendarSharingMessage, EventMessage

    public class Message
    extends OutlookItem
    implements com.github.davidmoten.odata.client.ODataEntityType
    • Constructor Detail

      • Message

        protected Message()
    • Method Detail

      • odataTypeName

        public String odataTypeName()
        Specified by:
        odataTypeName in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        odataTypeName in class OutlookItem
      • builderMessage

        public static Message.Builder builderMessage()
        Returns a builder which is used to create a new instance of this class (given that this class is immutable).
        Returns:
        a new Builder for this class
      • getChangedFields

        public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
        Specified by:
        getChangedFields in interface com.github.davidmoten.odata.client.ODataEntityType
        Overrides:
        getChangedFields in class OutlookItem
      • postInject

        public void postInject​(boolean addKeysToContextPath)
        Specified by:
        postInject in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        postInject in class OutlookItem
      • getBccRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getBccRecipients()
      • getBccRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getBccRecipients​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • withBodyPreview

        public Message withBodyPreview​(String bodyPreview)
      • getCcRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getCcRecipients()
      • getCcRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getCcRecipients​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • withConversationId

        public Message withConversationId​(String conversationId)
      • getConversationIndex

        public Optional<byte[]> getConversationIndex()
      • withConversationIndex

        public Message withConversationIndex​(byte[] conversationIndex)
      • withHasAttachments

        public Message withHasAttachments​(Boolean hasAttachments)
      • getInternetMessageHeaders

        public com.github.davidmoten.odata.client.CollectionPage<InternetMessageHeader> getInternetMessageHeaders()
      • getInternetMessageHeaders

        public com.github.davidmoten.odata.client.CollectionPage<InternetMessageHeader> getInternetMessageHeaders​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • getInternetMessageId

        public Optional<String> getInternetMessageId()
      • withInternetMessageId

        public Message withInternetMessageId​(String internetMessageId)
      • getIsDeliveryReceiptRequested

        public Optional<Boolean> getIsDeliveryReceiptRequested()
      • withIsDeliveryReceiptRequested

        public Message withIsDeliveryReceiptRequested​(Boolean isDeliveryReceiptRequested)
      • getIsReadReceiptRequested

        public Optional<Boolean> getIsReadReceiptRequested()
      • withIsReadReceiptRequested

        public Message withIsReadReceiptRequested​(Boolean isReadReceiptRequested)
      • withParentFolderId

        public Message withParentFolderId​(String parentFolderId)
      • getReplyTo

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getReplyTo()
      • getReplyTo

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getReplyTo​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • getToRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getToRecipients()
      • getToRecipients

        public com.github.davidmoten.odata.client.CollectionPage<Recipient> getToRecipients​(com.github.davidmoten.odata.client.HttpRequestOptions options)
      • getAttachments

        public AttachmentCollectionRequest getAttachments()

        Org.OData.Capabilities.V1.ChangeTracking

        Supported = false

        Org.OData.Capabilities.V1.SearchRestrictions

        Searchable = false

        Org.OData.Capabilities.V1.UpdateRestrictions

        Updatable = false

        Returns:
        navigational property attachments
      • getExtensions

        public ExtensionCollectionRequest getExtensions()

        Org.OData.Capabilities.V1.ChangeTracking

        Supported = false

        Org.OData.Capabilities.V1.SearchRestrictions

        Searchable = false

        Returns:
        navigational property extensions
      • withAttachments

        public Message withAttachments​(List<Attachment> attachments)
        Returns an immutable copy of this with just the attachments field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        Org.OData.Capabilities.V1.ChangeTracking

        Supported = false

        Org.OData.Capabilities.V1.SearchRestrictions

        Searchable = false

        Org.OData.Capabilities.V1.UpdateRestrictions

        Updatable = false

        Parameters:
        attachments - new value of attachments field (as defined in service metadata)
        Returns:
        immutable copy of this with just the attachments field changed
      • withExtensions

        public Message withExtensions​(List<Extension> extensions)
        Returns an immutable copy of this with just the extensions field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        Org.OData.Capabilities.V1.ChangeTracking

        Supported = false

        Org.OData.Capabilities.V1.SearchRestrictions

        Searchable = false

        Parameters:
        extensions - new value of extensions field (as defined in service metadata)
        Returns:
        immutable copy of this with just the extensions field changed
      • getUnmappedFields

        public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
        Specified by:
        getUnmappedFields in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        getUnmappedFields in class OutlookItem
      • getStream

        public Optional<com.github.davidmoten.odata.client.StreamProvider> getStream()
        If suitable metadata found a StreamProvider is returned otherwise returns Optional.empty(). Normally for a stream to be available this entity needs to have been hydrated with full metadata. Consider calling the builder method .metadataFull() when getting this instance (either directly or as part of a collection).
        Returns:
        StreamProvider if suitable metadata found otherwise returns Optional.empty()
      • patch

        public Message patch()
        Submits only changed fields for update and returns an immutable copy of this with changed fields reset.
        Overrides:
        patch in class OutlookItem
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • put

        public Message put()
        Submits all fields for update and returns an immutable copy of this with changed fields reset (they were ignored anyway).
        Overrides:
        put in class OutlookItem
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • forward

        public com.github.davidmoten.odata.client.ActionRequestNoReturn forward​(List<Recipient> toRecipients,
                                                                                Message message,
                                                                                String comment)
      • copy

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Message> copy​(String destinationId)
      • move

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Message> move​(String destinationId)
      • createForward

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Message> createForward​(List<Recipient> toRecipients,
                                                                                                                      Message message,
                                                                                                                      String comment)
      • createReply

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Message> createReply​(Message message,
                                                                                                                    String comment)
      • createReplyAll

        public com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped<Message> createReplyAll​(Message message,
                                                                                                                       String comment)
      • reply

        public com.github.davidmoten.odata.client.ActionRequestNoReturn reply​(Message message,
                                                                              String comment)
      • replyAll

        public com.github.davidmoten.odata.client.ActionRequestNoReturn replyAll​(Message message,
                                                                                 String comment)
      • send

        public com.github.davidmoten.odata.client.ActionRequestNoReturn send()