using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WK_KLI_LAPS_Service
{
    // Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
    public class Body
    {
        public string contentType { get; set; }
        public string content { get; set; }
    }

    public class CcRecipient
    {
        public EmailAddress emailAddress { get; set; }
    }

    public class EmailAddress
    {
        public string name { get; set; }
        public string address { get; set; }
    }

    public class Flag
    {
        public string flagStatus { get; set; }
    }

    public class From
    {
        public EmailAddress emailAddress { get; set; }
    }

    public class Mail
    {
        [JsonProperty("@odata.context")]
        public string odatacontext { get; set; }
        public List<Value> value { get; set; }

        [JsonProperty("@odata.nextLink")]
        public string odatanextLink { get; set; }

        public string id { get; set; }
    }

    public class Sender
    {
        public EmailAddress emailAddress { get; set; }
    }

    public class ToRecipient
    {
        public EmailAddress emailAddress { get; set; }
    }

    public class Value
    {
        [JsonProperty("@odata.etag")]
        public string odataetag { get; set; }
        public string id { get; set; }
        public DateTime createdDateTime { get; set; }
        public DateTime lastModifiedDateTime { get; set; }
        public string changeKey { get; set; }
        public List<object> categories { get; set; }
        public DateTime receivedDateTime { get; set; }
        public DateTime sentDateTime { get; set; }
        public bool hasAttachments { get; set; }
        public string internetMessageId { get; set; }
        public string subject { get; set; }
        public string bodyPreview { get; set; }
        public string importance { get; set; }
        public string parentFolderId { get; set; }
        public string conversationId { get; set; }
        public string conversationIndex { get; set; }
        public bool? isDeliveryReceiptRequested { get; set; }
        public bool isReadReceiptRequested { get; set; }
        public bool isRead { get; set; }
        public bool isDraft { get; set; }
        public string webLink { get; set; }
        public string inferenceClassification { get; set; }
        public Body body { get; set; }
        public Sender sender { get; set; }
        public From from { get; set; }
        public List<ToRecipient> toRecipients { get; set; }
        public List<CcRecipient> ccRecipients { get; set; }
        public List<object> bccRecipients { get; set; }
        public List<object> replyTo { get; set; }
        public Flag flag { get; set; }
        public string displayName { get; set; }
        public string color { get; set; }
    }

    public class SinglemailValue
    {
        [JsonProperty("@odata.context")]
        public string odatacontext { get; set; }
        [JsonProperty("@odata.etag")]
        public string odataetag { get; set; }
        public string id { get; set; }
        public DateTime createdDateTime { get; set; }
        public DateTime lastModifiedDateTime { get; set; }
        public string changeKey { get; set; }
        public List<object> categories { get; set; }
        public DateTime receivedDateTime { get; set; }
        public DateTime sentDateTime { get; set; }
        public bool hasAttachments { get; set; }
        public string internetMessageId { get; set; }
        public string subject { get; set; }
        public string bodyPreview { get; set; }
        public string importance { get; set; }
        public string parentFolderId { get; set; }
        public string conversationId { get; set; }
        public string conversationIndex { get; set; }
        public bool? isDeliveryReceiptRequested { get; set; }
        public bool isReadReceiptRequested { get; set; }
        public bool isRead { get; set; }
        public bool isDraft { get; set; }
        public string webLink { get; set; }
        public string inferenceClassification { get; set; }
        public Body body { get; set; }
        public Sender sender { get; set; }
        public From from { get; set; }
        public List<ToRecipient> toRecipients { get; set; }
        public List<CcRecipient> ccRecipients { get; set; }
        public List<object> bccRecipients { get; set; }
        public List<object> replyTo { get; set; }
        public Flag flag { get; set; }
        public string displayName { get; set; }
        public string color { get; set; }
    }

    public class Token
    {
        public string token_type { get; set; }
        public int expires_in { get; set; }
        public int ext_expires_in { get; set; }
        public string access_token { get; set; }
    }

    public class Attachments
    {
        [JsonProperty("@odata.context")]
        public string odatacontext { get; set; }
        public List<Attachment_mail> value { get; set; }
    }

    public class Attachment_mail
    {
        [JsonProperty("@odata.type")]
        public string odatatype { get; set; }

        [JsonProperty("@odata.mediaContentType")]
        public string odatamediaContentType { get; set; }
        public string id { get; set; }
        public DateTime lastModifiedDateTime { get; set; }
        public string name { get; set; }
        public string contentType { get; set; }
        public int size { get; set; }
        public bool isInline { get; set; }
        public string contentId { get; set; }
        public object contentLocation { get; set; }
        public string contentBytes { get; set; }
    }





}
