/// <summary>
        /// Clear flags for conversation items. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="contextFolderId">The Id of the folder items must belong to in order to be unflagged. If contextFolderId is
        /// null, flags for items in conversation across the entire mailbox are cleared.</param>
        public void ClearItemFlags(FolderId contextFolderId)
        {
            Flag flag = new Flag() { FlagStatus = ItemFlagStatus.NotFlagged };

            this.Service.SetFlagStatusForItemsInConversations(
                new KeyValuePair<ConversationId, DateTime?>[]
                {
                    new KeyValuePair<ConversationId, DateTime?>(
                        this.Id,
                        this.GlobalLastDeliveryTime)
                },
                contextFolderId,
                flag)[0].ThrowIfNecessary();
        }
        /// <summary>
        /// Flags conversation items. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="contextFolderId">The Id of the folder items must belong to in order to be flagged. If contextFolderId is
        /// null, items in conversation across the entire mailbox are flagged.</param>
        /// <param name="startDate">The start date (can be null).</param>
        /// <param name="dueDate">The due date (can be null).</param>
        public void FlagItems(
            FolderId contextFolderId,
            DateTime? startDate,
            DateTime? dueDate)
        {
            Flag flag = new Flag() { FlagStatus = ItemFlagStatus.Flagged };
            if (startDate.HasValue)
            {
                flag.StartDate = startDate.Value;
            }
            if (dueDate.HasValue)
            {
                flag.DueDate = dueDate.Value;
            }

            this.Service.SetFlagStatusForItemsInConversations(
                new KeyValuePair<ConversationId, DateTime?>[]
                {
                    new KeyValuePair<ConversationId, DateTime?>(
                        this.Id,
                        this.GlobalLastDeliveryTime)
                },
                contextFolderId,
                flag)[0].ThrowIfNecessary();
        }
        /// <summary>
        /// Flag conversation items as complete. Calling this method results in a call to EWS.
        /// </summary>
        /// <param name="contextFolderId">The Id of the folder items must belong to in order to be flagged as complete. If contextFolderId is
        /// null, items in conversation across the entire mailbox are marked as complete.</param>
        /// <param name="completeDate">The complete date (can be null).</param>
        public void FlagItemsComplete(
            FolderId contextFolderId,
            DateTime? completeDate)
        {
            Flag flag = new Flag() { FlagStatus = ItemFlagStatus.Complete };
            if (completeDate.HasValue)
            {
                flag.CompleteDate = completeDate.Value;
            }

            this.Service.SetFlagStatusForItemsInConversations(
                new KeyValuePair<ConversationId, DateTime?>[]
                {
                    new KeyValuePair<ConversationId, DateTime?>(
                        this.Id,
                        this.GlobalLastDeliveryTime)
                },
                contextFolderId,
                flag)[0].ThrowIfNecessary();
        }