<?php

/**
 * Generated by phpSPO model generator 2020-05-26T22:10:14+00:00 
 */
namespace Office365\Graph;

use Office365\Runtime\ClientObject;
use Office365\Runtime\ResourcePath;
/**
 *  "A message in a mailFolder."
 */
class Message extends ClientObject
{
    /**
     * 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">`.
     * @return bool
     */
    public function getHasAttachments()
    {
        if (!$this->isPropertyAvailable("HasAttachments")) {
            return null;
        }
        return $this->getProperty("HasAttachments");
    }
    /**
     * 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">`.
     * @var bool
     */
    public function setHasAttachments($value)
    {
        $this->setProperty("HasAttachments", $value, true);
    }
    /**
     * @return string
     */
    public function getInternetMessageId()
    {
        if (!$this->isPropertyAvailable("InternetMessageId")) {
            return null;
        }
        return $this->getProperty("InternetMessageId");
    }
    /**
     * @var string
     */
    public function setInternetMessageId($value)
    {
        $this->setProperty("InternetMessageId", $value, true);
    }
    /**
     * The subject of the message.
     * @return string
     */
    public function getSubject()
    {
        if (!$this->isPropertyAvailable("Subject")) {
            return null;
        }
        return $this->getProperty("Subject");
    }
    /**
     * The subject of the message.
     * @var string
     */
    public function setSubject($value)
    {
        $this->setProperty("Subject", $value, true);
    }
    /**
     * The first 255 characters of the message body. It is in text format.
     * @return string
     */
    public function getBodyPreview()
    {
        if (!$this->isPropertyAvailable("BodyPreview")) {
            return null;
        }
        return $this->getProperty("BodyPreview");
    }
    /**
     * The first 255 characters of the message body. It is in text format.
     * @var string
     */
    public function setBodyPreview($value)
    {
        $this->setProperty("BodyPreview", $value, true);
    }
    /**
     * The unique identifier for the message's parent mailFolder.
     * @return string
     */
    public function getParentFolderId()
    {
        if (!$this->isPropertyAvailable("ParentFolderId")) {
            return null;
        }
        return $this->getProperty("ParentFolderId");
    }
    /**
     * The unique identifier for the message's parent mailFolder.
     * @var string
     */
    public function setParentFolderId($value)
    {
        $this->setProperty("ParentFolderId", $value, true);
    }
    /**
     * The account that is actually 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](/exchange/collaboration/shared-mailboxes/shared-mailboxes), [for a shared calendar, or as a delegate](/graph/outlook-share-delegate-calendar.md). In any case, the value must correspond to the actual mailbox used. Find out more about [setting the from and sender properties](/graph/outlook-create-send-messages#setting-the-from-and-sender-properties) of a message.
     * @return Recipient
     */
    public function getSender()
    {
        if (!$this->isPropertyAvailable("Sender")) {
            return null;
        }
        return $this->getProperty("Sender");
    }
    /**
     * The account that is actually 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](/exchange/collaboration/shared-mailboxes/shared-mailboxes), [for a shared calendar, or as a delegate](/graph/outlook-share-delegate-calendar.md). In any case, the value must correspond to the actual mailbox used. Find out more about [setting the from and sender properties](/graph/outlook-create-send-messages#setting-the-from-and-sender-properties) of a message.
     * @var Recipient
     */
    public function setSender($value)
    {
        $this->setProperty("Sender", $value, true);
    }
    /**
     * 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](/graph/outlook-create-send-messages#setting-the-from-and-sender-properties) of a message.
     * @return Recipient
     */
    public function getFrom()
    {
        if (!$this->isPropertyAvailable("From")) {
            return null;
        }
        return $this->getProperty("From");
    }
    /**
     * 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](/graph/outlook-create-send-messages#setting-the-from-and-sender-properties) of a message.
     * @var Recipient
     */
    public function setFrom($value)
    {
        $this->setProperty("From", $value, true);
    }
    /**
     * The ID of the conversation the email belongs to.
     * @return string
     */
    public function getConversationId()
    {
        if (!$this->isPropertyAvailable("ConversationId")) {
            return null;
        }
        return $this->getProperty("ConversationId");
    }
    /**
     * The ID of the conversation the email belongs to.
     * @var string
     */
    public function setConversationId($value)
    {
        $this->setProperty("ConversationId", $value, true);
    }
    /**
     * Indicates the position of the message within the conversation.
     * @return string
     */
    public function getConversationIndex()
    {
        if (!$this->isPropertyAvailable("ConversationIndex")) {
            return null;
        }
        return $this->getProperty("ConversationIndex");
    }
    /**
     * Indicates the position of the message within the conversation.
     * @var string
     */
    public function setConversationIndex($value)
    {
        $this->setProperty("ConversationIndex", $value, true);
    }
    /**
     * Indicates whether a read receipt is requested for the message.
     * @return bool
     */
    public function getIsDeliveryReceiptRequested()
    {
        if (!$this->isPropertyAvailable("IsDeliveryReceiptRequested")) {
            return null;
        }
        return $this->getProperty("IsDeliveryReceiptRequested");
    }
    /**
     * Indicates whether a read receipt is requested for the message.
     * @var bool
     */
    public function setIsDeliveryReceiptRequested($value)
    {
        $this->setProperty("IsDeliveryReceiptRequested", $value, true);
    }
    /**
     * Indicates whether a read receipt is requested for the message.
     * @return bool
     */
    public function getIsReadReceiptRequested()
    {
        if (!$this->isPropertyAvailable("IsReadReceiptRequested")) {
            return null;
        }
        return $this->getProperty("IsReadReceiptRequested");
    }
    /**
     * Indicates whether a read receipt is requested for the message.
     * @var bool
     */
    public function setIsReadReceiptRequested($value)
    {
        $this->setProperty("IsReadReceiptRequested", $value, true);
    }
    /**
     * Indicates whether the message has been read.
     * @return bool
     */
    public function getIsRead()
    {
        if (!$this->isPropertyAvailable("IsRead")) {
            return null;
        }
        return $this->getProperty("IsRead");
    }
    /**
     * Indicates whether the message has been read.
     * @var bool
     */
    public function setIsRead($value)
    {
        $this->setProperty("IsRead", $value, true);
    }
    /**
     * Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.
     * @return bool
     */
    public function getIsDraft()
    {
        if (!$this->isPropertyAvailable("IsDraft")) {
            return null;
        }
        return $this->getProperty("IsDraft");
    }
    /**
     * Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet.
     * @var bool
     */
    public function setIsDraft($value)
    {
        $this->setProperty("IsDraft", $value, true);
    }
    /**
     * The URL to open the message in Outlook Web App.<br><br>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, then the browser will show the message in the Outlook Web App review pane.<br><br>The message will open in the browser if you are logged in to your mailbox via Outlook Web App. You will be prompted to login if you are not already logged in with the browser.<br><br>This URL can be accessed from within an iFrame.
     * @return string
     */
    public function getWebLink()
    {
        if (!$this->isPropertyAvailable("WebLink")) {
            return null;
        }
        return $this->getProperty("WebLink");
    }
    /**
     * The URL to open the message in Outlook Web App.<br><br>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, then the browser will show the message in the Outlook Web App review pane.<br><br>The message will open in the browser if you are logged in to your mailbox via Outlook Web App. You will be prompted to login if you are not already logged in with the browser.<br><br>This URL can be accessed from within an iFrame.
     * @var string
     */
    public function setWebLink($value)
    {
        $this->setProperty("WebLink", $value, true);
    }
    /**
     * The body of the message. It can be in HTML or text format. Find out about [safe HTML in a message body](/graph/outlook-create-send-messages#reading-messages-with-control-over-the-body-format-returned).
     * @return ItemBody
     */
    public function getBody()
    {
        if (!$this->isPropertyAvailable("Body")) {
            return null;
        }
        return $this->getProperty("Body");
    }
    /**
     * The body of the message. It can be in HTML or text format. Find out about [safe HTML in a message body](/graph/outlook-create-send-messages#reading-messages-with-control-over-the-body-format-returned).
     * @var ItemBody
     */
    public function setBody($value)
    {
        $this->setProperty("Body", $value, true);
    }
    /**
     * 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.
     * @return ItemBody
     */
    public function getUniqueBody()
    {
        if (!$this->isPropertyAvailable("UniqueBody")) {
            return null;
        }
        return $this->getProperty("UniqueBody");
    }
    /**
     * 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.
     * @var ItemBody
     */
    public function setUniqueBody($value)
    {
        $this->setProperty("UniqueBody", $value, true);
    }
    /**
     * The flag value that indicates the status, start date, due date, or completion date for the message.
     * @return FollowupFlag
     */
    public function getFlag()
    {
        if (!$this->isPropertyAvailable("Flag")) {
            return null;
        }
        return $this->getProperty("Flag");
    }
    /**
     * The flag value that indicates the status, start date, due date, or completion date for the message.
     * @var FollowupFlag
     */
    public function setFlag($value)
    {
        $this->setProperty("Flag", $value, true);
    }
}