diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/Attachment.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/Attachment.cs
index 0455a517d..78edd1ac4 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/Attachment.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/Attachment.cs
@@ -16,6 +16,14 @@ public class Attachment : Entity, IParsable {
/// The length of the attachment in bytes.
public int? Size { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new Attachment CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new Attachment();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/DateTimeTimeZone.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/DateTimeTimeZone.cs
index 6d427a752..6bc0e876e 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/DateTimeTimeZone.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/DateTimeTimeZone.cs
@@ -18,6 +18,14 @@ public DateTimeTimeZone() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new DateTimeTimeZone();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/EmailAddress.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/EmailAddress.cs
index a8a3d24de..61f4e23f9 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/EmailAddress.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/EmailAddress.cs
@@ -18,6 +18,14 @@ public EmailAddress() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new EmailAddress();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/Entity.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/Entity.cs
index 5131d9190..024ee6dc2 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/Entity.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/Entity.cs
@@ -16,6 +16,14 @@ public Entity() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new Entity();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/Extension.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/Extension.cs
index a5ee7bfe2..3703e40bc 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/Extension.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/Extension.cs
@@ -5,6 +5,14 @@
using System.Linq;
namespace Graphdotnetv4.Models.Microsoft.Graph {
public class Extension : Entity, IParsable {
+ ///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new Extension CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new Extension();
+ }
///
/// The deserialization information for the current model
///
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/FollowupFlag.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/FollowupFlag.cs
index 17db6bc34..75fee16a4 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/FollowupFlag.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/FollowupFlag.cs
@@ -18,14 +18,22 @@ public FollowupFlag() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static FollowupFlag CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new FollowupFlag();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
- {"completedDateTime", (o,n) => { (o as FollowupFlag).CompletedDateTime = n.GetObjectValue(); } },
- {"dueDateTime", (o,n) => { (o as FollowupFlag).DueDateTime = n.GetObjectValue(); } },
+ {"completedDateTime", (o,n) => { (o as FollowupFlag).CompletedDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } },
+ {"dueDateTime", (o,n) => { (o as FollowupFlag).DueDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } },
{"flagStatus", (o,n) => { (o as FollowupFlag).FlagStatus = n.GetEnumValue(); } },
- {"startDateTime", (o,n) => { (o as FollowupFlag).StartDateTime = n.GetObjectValue(); } },
+ {"startDateTime", (o,n) => { (o as FollowupFlag).StartDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassification.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassification.cs
index 4d7e551ba..f3d49c680 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassification.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassification.cs
@@ -8,11 +8,19 @@ public class InferenceClassification : Entity, IParsable {
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
public List Overrides { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new InferenceClassification CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new InferenceClassification();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
return new Dictionary>(base.GetFieldDeserializers()) {
- {"overrides", (o,n) => { (o as InferenceClassification).Overrides = n.GetCollectionOfObjectValues().ToList(); } },
+ {"overrides", (o,n) => { (o as InferenceClassification).Overrides = n.GetCollectionOfObjectValues(InferenceClassificationOverride.CreateFromDiscriminatorValue).ToList(); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassificationOverride.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassificationOverride.cs
index 4c2948294..2871e7229 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassificationOverride.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/InferenceClassificationOverride.cs
@@ -8,12 +8,20 @@ public class InferenceClassificationOverride : Entity, IParsable {
public InferenceClassificationType? ClassifyAs { get; set; }
public EmailAddress SenderEmailAddress { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new InferenceClassificationOverride CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new InferenceClassificationOverride();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
return new Dictionary>(base.GetFieldDeserializers()) {
{"classifyAs", (o,n) => { (o as InferenceClassificationOverride).ClassifyAs = n.GetEnumValue(); } },
- {"senderEmailAddress", (o,n) => { (o as InferenceClassificationOverride).SenderEmailAddress = n.GetObjectValue(); } },
+ {"senderEmailAddress", (o,n) => { (o as InferenceClassificationOverride).SenderEmailAddress = n.GetObjectValue(EmailAddress.CreateFromDiscriminatorValue); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/InternetMessageHeader.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/InternetMessageHeader.cs
index 782a351c9..6f874c03f 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/InternetMessageHeader.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/InternetMessageHeader.cs
@@ -18,6 +18,14 @@ public InternetMessageHeader() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static InternetMessageHeader CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new InternetMessageHeader();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/ItemBody.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/ItemBody.cs
index ce1b09009..b8f430b1a 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/ItemBody.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/ItemBody.cs
@@ -17,6 +17,14 @@ public ItemBody() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static ItemBody CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ItemBody();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/MailFolder.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/MailFolder.cs
index 21d3ccd59..369092359 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/MailFolder.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/MailFolder.cs
@@ -28,19 +28,27 @@ public class MailFolder : Entity, IParsable {
/// The number of items in the mailFolder marked as unread.
public int? UnreadItemCount { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new MailFolder CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MailFolder();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
return new Dictionary>(base.GetFieldDeserializers()) {
{"childFolderCount", (o,n) => { (o as MailFolder).ChildFolderCount = n.GetIntValue(); } },
- {"childFolders", (o,n) => { (o as MailFolder).ChildFolders = n.GetCollectionOfObjectValues().ToList(); } },
+ {"childFolders", (o,n) => { (o as MailFolder).ChildFolders = n.GetCollectionOfObjectValues(MailFolder.CreateFromDiscriminatorValue).ToList(); } },
{"displayName", (o,n) => { (o as MailFolder).DisplayName = n.GetStringValue(); } },
{"isHidden", (o,n) => { (o as MailFolder).IsHidden = n.GetBoolValue(); } },
- {"messageRules", (o,n) => { (o as MailFolder).MessageRules = n.GetCollectionOfObjectValues().ToList(); } },
- {"messages", (o,n) => { (o as MailFolder).Messages = n.GetCollectionOfObjectValues().ToList(); } },
- {"multiValueExtendedProperties", (o,n) => { (o as MailFolder).MultiValueExtendedProperties = n.GetCollectionOfObjectValues().ToList(); } },
+ {"messageRules", (o,n) => { (o as MailFolder).MessageRules = n.GetCollectionOfObjectValues(MessageRule.CreateFromDiscriminatorValue).ToList(); } },
+ {"messages", (o,n) => { (o as MailFolder).Messages = n.GetCollectionOfObjectValues(Message.CreateFromDiscriminatorValue).ToList(); } },
+ {"multiValueExtendedProperties", (o,n) => { (o as MailFolder).MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue).ToList(); } },
{"parentFolderId", (o,n) => { (o as MailFolder).ParentFolderId = n.GetStringValue(); } },
- {"singleValueExtendedProperties", (o,n) => { (o as MailFolder).SingleValueExtendedProperties = n.GetCollectionOfObjectValues().ToList(); } },
+ {"singleValueExtendedProperties", (o,n) => { (o as MailFolder).SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue).ToList(); } },
{"totalItemCount", (o,n) => { (o as MailFolder).TotalItemCount = n.GetIntValue(); } },
{"unreadItemCount", (o,n) => { (o as MailFolder).UnreadItemCount = n.GetIntValue(); } },
};
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/Message.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/Message.cs
index 923dd103b..65e979cc8 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/Message.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/Message.cs
@@ -24,7 +24,7 @@ public class Message : OutlookItem, IParsable {
public Recipient From { get; set; }
/// 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 .
public bool? HasAttachments { get; set; }
- public Importance? Importance { get; set; }
+ public Graphdotnetv4.Models.Microsoft.Graph.Importance? Importance { get; set; }
public InferenceClassificationType? InferenceClassification { get; set; }
public List InternetMessageHeaders { get; set; }
public string InternetMessageId { get; set; }
@@ -46,39 +46,47 @@ public class Message : OutlookItem, IParsable {
public ItemBody UniqueBody { get; set; }
public string WebLink { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new Message CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new Message();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
return new Dictionary>(base.GetFieldDeserializers()) {
- {"attachments", (o,n) => { (o as Message).Attachments = n.GetCollectionOfObjectValues().ToList(); } },
- {"bccRecipients", (o,n) => { (o as Message).BccRecipients = n.GetCollectionOfObjectValues().ToList(); } },
- {"body", (o,n) => { (o as Message).Body = n.GetObjectValue(); } },
+ {"attachments", (o,n) => { (o as Message).Attachments = n.GetCollectionOfObjectValues(Attachment.CreateFromDiscriminatorValue).ToList(); } },
+ {"bccRecipients", (o,n) => { (o as Message).BccRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
+ {"body", (o,n) => { (o as Message).Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } },
{"bodyPreview", (o,n) => { (o as Message).BodyPreview = n.GetStringValue(); } },
- {"ccRecipients", (o,n) => { (o as Message).CcRecipients = n.GetCollectionOfObjectValues().ToList(); } },
+ {"ccRecipients", (o,n) => { (o as Message).CcRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
{"conversationId", (o,n) => { (o as Message).ConversationId = n.GetStringValue(); } },
{"conversationIndex", (o,n) => { (o as Message).ConversationIndex = n.GetByteArrayValue(); } },
- {"extensions", (o,n) => { (o as Message).Extensions = n.GetCollectionOfObjectValues().ToList(); } },
- {"flag", (o,n) => { (o as Message).Flag = n.GetObjectValue(); } },
- {"from", (o,n) => { (o as Message).From = n.GetObjectValue(); } },
+ {"extensions", (o,n) => { (o as Message).Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue).ToList(); } },
+ {"flag", (o,n) => { (o as Message).Flag = n.GetObjectValue(FollowupFlag.CreateFromDiscriminatorValue); } },
+ {"from", (o,n) => { (o as Message).From = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } },
{"hasAttachments", (o,n) => { (o as Message).HasAttachments = n.GetBoolValue(); } },
{"importance", (o,n) => { (o as Message).Importance = n.GetEnumValue(); } },
{"inferenceClassification", (o,n) => { (o as Message).InferenceClassification = n.GetEnumValue(); } },
- {"internetMessageHeaders", (o,n) => { (o as Message).InternetMessageHeaders = n.GetCollectionOfObjectValues().ToList(); } },
+ {"internetMessageHeaders", (o,n) => { (o as Message).InternetMessageHeaders = n.GetCollectionOfObjectValues(InternetMessageHeader.CreateFromDiscriminatorValue).ToList(); } },
{"internetMessageId", (o,n) => { (o as Message).InternetMessageId = n.GetStringValue(); } },
{"isDeliveryReceiptRequested", (o,n) => { (o as Message).IsDeliveryReceiptRequested = n.GetBoolValue(); } },
{"isDraft", (o,n) => { (o as Message).IsDraft = n.GetBoolValue(); } },
{"isRead", (o,n) => { (o as Message).IsRead = n.GetBoolValue(); } },
{"isReadReceiptRequested", (o,n) => { (o as Message).IsReadReceiptRequested = n.GetBoolValue(); } },
- {"multiValueExtendedProperties", (o,n) => { (o as Message).MultiValueExtendedProperties = n.GetCollectionOfObjectValues().ToList(); } },
+ {"multiValueExtendedProperties", (o,n) => { (o as Message).MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue).ToList(); } },
{"parentFolderId", (o,n) => { (o as Message).ParentFolderId = n.GetStringValue(); } },
{"receivedDateTime", (o,n) => { (o as Message).ReceivedDateTime = n.GetDateTimeOffsetValue(); } },
- {"replyTo", (o,n) => { (o as Message).ReplyTo = n.GetCollectionOfObjectValues().ToList(); } },
- {"sender", (o,n) => { (o as Message).Sender = n.GetObjectValue(); } },
+ {"replyTo", (o,n) => { (o as Message).ReplyTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
+ {"sender", (o,n) => { (o as Message).Sender = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } },
{"sentDateTime", (o,n) => { (o as Message).SentDateTime = n.GetDateTimeOffsetValue(); } },
- {"singleValueExtendedProperties", (o,n) => { (o as Message).SingleValueExtendedProperties = n.GetCollectionOfObjectValues().ToList(); } },
+ {"singleValueExtendedProperties", (o,n) => { (o as Message).SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue).ToList(); } },
{"subject", (o,n) => { (o as Message).Subject = n.GetStringValue(); } },
- {"toRecipients", (o,n) => { (o as Message).ToRecipients = n.GetCollectionOfObjectValues().ToList(); } },
- {"uniqueBody", (o,n) => { (o as Message).UniqueBody = n.GetObjectValue(); } },
+ {"toRecipients", (o,n) => { (o as Message).ToRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
+ {"uniqueBody", (o,n) => { (o as Message).UniqueBody = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } },
{"webLink", (o,n) => { (o as Message).WebLink = n.GetStringValue(); } },
};
}
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRule.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRule.cs
index 4ab66a692..3ec693584 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRule.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRule.cs
@@ -19,14 +19,22 @@ public class MessageRule : Entity, IParsable {
/// Indicates the order in which the rule is executed, among other rules.
public int? Sequence { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new MessageRule CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MessageRule();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
return new Dictionary>(base.GetFieldDeserializers()) {
- {"actions", (o,n) => { (o as MessageRule).Actions = n.GetObjectValue(); } },
- {"conditions", (o,n) => { (o as MessageRule).Conditions = n.GetObjectValue(); } },
+ {"actions", (o,n) => { (o as MessageRule).Actions = n.GetObjectValue(MessageRuleActions.CreateFromDiscriminatorValue); } },
+ {"conditions", (o,n) => { (o as MessageRule).Conditions = n.GetObjectValue(MessageRulePredicates.CreateFromDiscriminatorValue); } },
{"displayName", (o,n) => { (o as MessageRule).DisplayName = n.GetStringValue(); } },
- {"exceptions", (o,n) => { (o as MessageRule).Exceptions = n.GetObjectValue(); } },
+ {"exceptions", (o,n) => { (o as MessageRule).Exceptions = n.GetObjectValue(MessageRulePredicates.CreateFromDiscriminatorValue); } },
{"hasError", (o,n) => { (o as MessageRule).HasError = n.GetBoolValue(); } },
{"isEnabled", (o,n) => { (o as MessageRule).IsEnabled = n.GetBoolValue(); } },
{"isReadOnly", (o,n) => { (o as MessageRule).IsReadOnly = n.GetBoolValue(); } },
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRuleActions.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRuleActions.cs
index b8f4342c2..d7bdede0c 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRuleActions.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRuleActions.cs
@@ -35,6 +35,14 @@ public MessageRuleActions() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static MessageRuleActions CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MessageRuleActions();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
@@ -42,13 +50,13 @@ public IDictionary> GetFieldDeserializers() {
{"assignCategories", (o,n) => { (o as MessageRuleActions).AssignCategories = n.GetCollectionOfPrimitiveValues().ToList(); } },
{"copyToFolder", (o,n) => { (o as MessageRuleActions).CopyToFolder = n.GetStringValue(); } },
{"delete", (o,n) => { (o as MessageRuleActions).Delete = n.GetBoolValue(); } },
- {"forwardAsAttachmentTo", (o,n) => { (o as MessageRuleActions).ForwardAsAttachmentTo = n.GetCollectionOfObjectValues().ToList(); } },
- {"forwardTo", (o,n) => { (o as MessageRuleActions).ForwardTo = n.GetCollectionOfObjectValues().ToList(); } },
+ {"forwardAsAttachmentTo", (o,n) => { (o as MessageRuleActions).ForwardAsAttachmentTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
+ {"forwardTo", (o,n) => { (o as MessageRuleActions).ForwardTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
{"markAsRead", (o,n) => { (o as MessageRuleActions).MarkAsRead = n.GetBoolValue(); } },
{"markImportance", (o,n) => { (o as MessageRuleActions).MarkImportance = n.GetEnumValue(); } },
{"moveToFolder", (o,n) => { (o as MessageRuleActions).MoveToFolder = n.GetStringValue(); } },
{"permanentDelete", (o,n) => { (o as MessageRuleActions).PermanentDelete = n.GetBoolValue(); } },
- {"redirectTo", (o,n) => { (o as MessageRuleActions).RedirectTo = n.GetCollectionOfObjectValues().ToList(); } },
+ {"redirectTo", (o,n) => { (o as MessageRuleActions).RedirectTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
{"stopProcessingRules", (o,n) => { (o as MessageRuleActions).StopProcessingRules = n.GetBoolValue(); } },
};
}
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRulePredicates.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRulePredicates.cs
index 2387f3286..9a220f4aa 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRulePredicates.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/MessageRulePredicates.cs
@@ -19,7 +19,7 @@ public class MessageRulePredicates : IParsable {
public bool? HasAttachments { get; set; }
/// Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply.
public List HeaderContains { get; set; }
- public Importance? Importance { get; set; }
+ public Graphdotnetv4.Models.Microsoft.Graph.Importance? Importance { get; set; }
/// Indicates whether an incoming message must be an approval request in order for the condition or exception to apply.
public bool? IsApprovalRequest { get; set; }
/// Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply.
@@ -42,14 +42,14 @@ public class MessageRulePredicates : IParsable {
public bool? IsSigned { get; set; }
/// Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply.
public bool? IsVoicemail { get; set; }
- public MessageActionFlag? MessageActionFlag { get; set; }
+ public Graphdotnetv4.Models.Microsoft.Graph.MessageActionFlag? MessageActionFlag { get; set; }
/// Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply.
public bool? NotSentToMe { get; set; }
/// Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply.
public List RecipientContains { get; set; }
/// Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply.
public List SenderContains { get; set; }
- public Sensitivity? Sensitivity { get; set; }
+ public Graphdotnetv4.Models.Microsoft.Graph.Sensitivity? Sensitivity { get; set; }
/// Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply.
public bool? SentCcMe { get; set; }
/// Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply.
@@ -70,6 +70,14 @@ public MessageRulePredicates() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static MessageRulePredicates CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MessageRulePredicates();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
@@ -77,7 +85,7 @@ public IDictionary> GetFieldDeserializers() {
{"bodyContains", (o,n) => { (o as MessageRulePredicates).BodyContains = n.GetCollectionOfPrimitiveValues().ToList(); } },
{"bodyOrSubjectContains", (o,n) => { (o as MessageRulePredicates).BodyOrSubjectContains = n.GetCollectionOfPrimitiveValues().ToList(); } },
{"categories", (o,n) => { (o as MessageRulePredicates).Categories = n.GetCollectionOfPrimitiveValues().ToList(); } },
- {"fromAddresses", (o,n) => { (o as MessageRulePredicates).FromAddresses = n.GetCollectionOfObjectValues().ToList(); } },
+ {"fromAddresses", (o,n) => { (o as MessageRulePredicates).FromAddresses = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
{"hasAttachments", (o,n) => { (o as MessageRulePredicates).HasAttachments = n.GetBoolValue(); } },
{"headerContains", (o,n) => { (o as MessageRulePredicates).HeaderContains = n.GetCollectionOfPrimitiveValues().ToList(); } },
{"importance", (o,n) => { (o as MessageRulePredicates).Importance = n.GetEnumValue(); } },
@@ -99,11 +107,11 @@ public IDictionary> GetFieldDeserializers() {
{"sensitivity", (o,n) => { (o as MessageRulePredicates).Sensitivity = n.GetEnumValue(); } },
{"sentCcMe", (o,n) => { (o as MessageRulePredicates).SentCcMe = n.GetBoolValue(); } },
{"sentOnlyToMe", (o,n) => { (o as MessageRulePredicates).SentOnlyToMe = n.GetBoolValue(); } },
- {"sentToAddresses", (o,n) => { (o as MessageRulePredicates).SentToAddresses = n.GetCollectionOfObjectValues().ToList(); } },
+ {"sentToAddresses", (o,n) => { (o as MessageRulePredicates).SentToAddresses = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue).ToList(); } },
{"sentToMe", (o,n) => { (o as MessageRulePredicates).SentToMe = n.GetBoolValue(); } },
{"sentToOrCcMe", (o,n) => { (o as MessageRulePredicates).SentToOrCcMe = n.GetBoolValue(); } },
{"subjectContains", (o,n) => { (o as MessageRulePredicates).SubjectContains = n.GetCollectionOfPrimitiveValues().ToList(); } },
- {"withinSizeRange", (o,n) => { (o as MessageRulePredicates).WithinSizeRange = n.GetObjectValue(); } },
+ {"withinSizeRange", (o,n) => { (o as MessageRulePredicates).WithinSizeRange = n.GetObjectValue(SizeRange.CreateFromDiscriminatorValue); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/MultiValueLegacyExtendedProperty.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/MultiValueLegacyExtendedProperty.cs
index 3cc16ee36..5073821c8 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/MultiValueLegacyExtendedProperty.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/MultiValueLegacyExtendedProperty.cs
@@ -8,6 +8,14 @@ public class MultiValueLegacyExtendedProperty : Entity, IParsable {
/// A collection of property values.
public List Value { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new MultiValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MultiValueLegacyExtendedProperty();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/OutlookItem.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/OutlookItem.cs
index 7106ff179..0bd68e191 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/OutlookItem.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/OutlookItem.cs
@@ -14,6 +14,14 @@ public class OutlookItem : Entity, IParsable {
/// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z
public DateTimeOffset? LastModifiedDateTime { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new OutlookItem CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new OutlookItem();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/Recipient.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/Recipient.cs
index 72cbc3d79..29622fe3b 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/Recipient.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/Recipient.cs
@@ -7,7 +7,7 @@ namespace Graphdotnetv4.Models.Microsoft.Graph {
public class Recipient : IParsable {
/// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
public IDictionary AdditionalData { get; set; }
- public EmailAddress EmailAddress { get; set; }
+ public Graphdotnetv4.Models.Microsoft.Graph.EmailAddress EmailAddress { get; set; }
///
/// Instantiates a new recipient and sets the default values.
///
@@ -15,11 +15,19 @@ public Recipient() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static Recipient CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new Recipient();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
- {"emailAddress", (o,n) => { (o as Recipient).EmailAddress = n.GetObjectValue(); } },
+ {"emailAddress", (o,n) => { (o as Recipient).EmailAddress = n.GetObjectValue(Graphdotnetv4.Models.Microsoft.Graph.EmailAddress.CreateFromDiscriminatorValue); } },
};
}
///
@@ -28,7 +36,7 @@ public IDictionary> GetFieldDeserializers() {
///
public void Serialize(ISerializationWriter writer) {
_ = writer ?? throw new ArgumentNullException(nameof(writer));
- writer.WriteObjectValue("emailAddress", EmailAddress);
+ writer.WriteObjectValue("emailAddress", EmailAddress);
writer.WriteAdditionalData(AdditionalData);
}
}
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/SingleValueLegacyExtendedProperty.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/SingleValueLegacyExtendedProperty.cs
index 72323aa8c..0e71cc8c4 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/SingleValueLegacyExtendedProperty.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/SingleValueLegacyExtendedProperty.cs
@@ -8,6 +8,14 @@ public class SingleValueLegacyExtendedProperty : Entity, IParsable {
/// A property value.
public string Value { get; set; }
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static new SingleValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new SingleValueLegacyExtendedProperty();
+ }
+ ///
/// The deserialization information for the current model
///
public new IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Models/Microsoft/Graph/SizeRange.cs b/msgraph-mail/dotnet/Models/Microsoft/Graph/SizeRange.cs
index c882d52a4..9a29f3aa9 100644
--- a/msgraph-mail/dotnet/Models/Microsoft/Graph/SizeRange.cs
+++ b/msgraph-mail/dotnet/Models/Microsoft/Graph/SizeRange.cs
@@ -18,6 +18,14 @@ public SizeRange() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static SizeRange CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new SizeRange();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
diff --git a/msgraph-mail/dotnet/Users/Item/InferenceClassification/InferenceClassificationRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/InferenceClassification/InferenceClassificationRequestBuilder.cs
index db35acd7d..d5b3a9b71 100644
--- a/msgraph-mail/dotnet/Users/Item/InferenceClassification/InferenceClassificationRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/InferenceClassification/InferenceClassificationRequestBuilder.cs
@@ -110,7 +110,7 @@ public RequestInformation CreatePatchRequestInformation(Graphdotnetv4.Models.Mic
///
public async Task DeleteAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateDeleteRequestInformation(h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
///
/// Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
@@ -122,7 +122,7 @@ public async Task DeleteAsync(Action> h = default, I
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, Graphdotnetv4.Models.Microsoft.Graph.InferenceClassification.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
@@ -135,7 +135,7 @@ public async Task DeleteAsync(Action> h = default, I
public async Task PatchAsync(Graphdotnetv4.Models.Microsoft.Graph.InferenceClassification body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePatchRequestInformation(body, h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
/// Relevance classification of the user's messages based on explicit designations which override inferred relevance or importance.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs
similarity index 91%
rename from msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideRequestBuilder.cs
rename to msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs
index 1883a9e87..42579b31f 100644
--- a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs
@@ -9,7 +9,7 @@
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Item.InferenceClassification.Overrides.Item {
/// Builds and executes requests for operations under \users\{user-id}\inferenceClassification\overrides\{inferenceClassificationOverride-id}
- public class InferenceClassificationOverrideRequestBuilder {
+ public class InferenceClassificationOverrideItemRequestBuilder {
/// Path parameters for the request
private Dictionary PathParameters { get; set; }
/// The request adapter to use to execute the requests.
@@ -17,11 +17,11 @@ public class InferenceClassificationOverrideRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
///
- /// Instantiates a new InferenceClassificationOverrideRequestBuilder and sets the default values.
+ /// Instantiates a new InferenceClassificationOverrideItemRequestBuilder and sets the default values.
/// Path parameters for the request
/// The request adapter to use to execute the requests.
///
- public InferenceClassificationOverrideRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
+ public InferenceClassificationOverrideItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/inferenceClassification/overrides/{inferenceClassificationOverride_id}{?select}";
@@ -30,11 +30,11 @@ public InferenceClassificationOverrideRequestBuilder(Dictionary
RequestAdapter = requestAdapter;
}
///
- /// Instantiates a new InferenceClassificationOverrideRequestBuilder and sets the default values.
+ /// Instantiates a new InferenceClassificationOverrideItemRequestBuilder and sets the default values.
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
///
- public InferenceClassificationOverrideRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
+ public InferenceClassificationOverrideItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/inferenceClassification/overrides/{inferenceClassificationOverride_id}{?select}";
@@ -106,7 +106,7 @@ public RequestInformation CreatePatchRequestInformation(InferenceClassificationO
///
public async Task DeleteAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateDeleteRequestInformation(h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
///
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
@@ -118,7 +118,7 @@ public async Task DeleteAsync(Action> h = default, I
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, InferenceClassificationOverride.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
@@ -131,7 +131,7 @@ public async Task GetAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePatchRequestInformation(body, h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesRequestBuilder.cs
index a3cf5f529..116f16218 100644
--- a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesRequestBuilder.cs
@@ -18,10 +18,10 @@ public class OverridesRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
/// Gets an item from the Graphdotnetv4.users.item.inferenceClassification.overrides.item collection
- public InferenceClassificationOverrideRequestBuilder this[string position] { get {
+ public InferenceClassificationOverrideItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary(PathParameters);
urlTplParams.Add("inferenceClassificationOverride_id", position);
- return new InferenceClassificationOverrideRequestBuilder(urlTplParams, RequestAdapter);
+ return new InferenceClassificationOverrideItemRequestBuilder(urlTplParams, RequestAdapter);
} }
///
/// Instantiates a new OverridesRequestBuilder and sets the default values.
@@ -99,7 +99,7 @@ public RequestInformation CreatePostRequestInformation(InferenceClassificationOv
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, OverridesResponse.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
@@ -112,7 +112,7 @@ public async Task GetAsync(Action q = def
public async Task PostAsync(InferenceClassificationOverride body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePostRequestInformation(body, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, InferenceClassificationOverride.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
/// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesResponse.cs b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesResponse.cs
index e0a727152..6404ea369 100644
--- a/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesResponse.cs
+++ b/msgraph-mail/dotnet/Users/Item/InferenceClassification/Overrides/OverridesResponse.cs
@@ -17,12 +17,20 @@ public OverridesResponse() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static OverridesResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new OverridesResponse();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
{"@odata.nextLink", (o,n) => { (o as OverridesResponse).NextLink = n.GetStringValue(); } },
- {"value", (o,n) => { (o as OverridesResponse).Value = n.GetCollectionOfObjectValues().ToList(); } },
+ {"value", (o,n) => { (o as OverridesResponse).Value = n.GetCollectionOfObjectValues(InferenceClassificationOverride.CreateFromDiscriminatorValue).ToList(); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs
index 5c1c91b72..27226f7d3 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs
@@ -18,10 +18,10 @@ public class ChildFoldersRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
/// Gets an item from the Graphdotnetv4.users.item.mailFolders.item.childFolders.item collection
- public MailFolderRequestBuilder this[string position] { get {
+ public MailFolderItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary(PathParameters);
urlTplParams.Add("mailFolder_id1", position);
- return new MailFolderRequestBuilder(urlTplParams, RequestAdapter);
+ return new MailFolderItemRequestBuilder(urlTplParams, RequestAdapter);
} }
///
/// Instantiates a new ChildFoldersRequestBuilder and sets the default values.
@@ -99,7 +99,7 @@ public RequestInformation CreatePostRequestInformation(MailFolder body, Action
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, ChildFoldersResponse.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// The collection of child folders in the mailFolder.
@@ -112,7 +112,7 @@ public async Task GetAsync(Action q =
public async Task PostAsync(MailFolder body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePostRequestInformation(body, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MailFolder.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
/// The collection of child folders in the mailFolder.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersResponse.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersResponse.cs
index 2048c2481..c13366c96 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersResponse.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/ChildFoldersResponse.cs
@@ -17,12 +17,20 @@ public ChildFoldersResponse() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static ChildFoldersResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new ChildFoldersResponse();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
{"@odata.nextLink", (o,n) => { (o as ChildFoldersResponse).NextLink = n.GetStringValue(); } },
- {"value", (o,n) => { (o as ChildFoldersResponse).Value = n.GetCollectionOfObjectValues().ToList(); } },
+ {"value", (o,n) => { (o as ChildFoldersResponse).Value = n.GetCollectionOfObjectValues(MailFolder.CreateFromDiscriminatorValue).ToList(); } },
};
}
///
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs
similarity index 92%
rename from msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderRequestBuilder.cs
rename to msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs
index 957abbf36..44dfd44fe 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs
@@ -9,7 +9,7 @@
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Item.MailFolders.Item.ChildFolders.Item {
/// Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\childFolders\{mailFolder-id1}
- public class MailFolderRequestBuilder {
+ public class MailFolderItemRequestBuilder {
/// Path parameters for the request
private Dictionary PathParameters { get; set; }
/// The request adapter to use to execute the requests.
@@ -17,11 +17,11 @@ public class MailFolderRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
///
- /// Instantiates a new MailFolderRequestBuilder and sets the default values.
+ /// Instantiates a new MailFolderItemRequestBuilder and sets the default values.
/// Path parameters for the request
/// The request adapter to use to execute the requests.
///
- public MailFolderRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
+ public MailFolderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}/childFolders/{mailFolder_id1}{?select,expand}";
@@ -30,11 +30,11 @@ public MailFolderRequestBuilder(Dictionary pathParameters, IRequ
RequestAdapter = requestAdapter;
}
///
- /// Instantiates a new MailFolderRequestBuilder and sets the default values.
+ /// Instantiates a new MailFolderItemRequestBuilder and sets the default values.
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
///
- public MailFolderRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
+ public MailFolderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}/childFolders/{mailFolder_id1}{?select,expand}";
@@ -106,7 +106,7 @@ public RequestInformation CreatePatchRequestInformation(MailFolder body, Action<
///
public async Task DeleteAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateDeleteRequestInformation(h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
///
/// The collection of child folders in the mailFolder.
@@ -118,7 +118,7 @@ public async Task DeleteAsync(Action> h = default, I
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MailFolder.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// The collection of child folders in the mailFolder.
@@ -131,7 +131,7 @@ public async Task GetAsync(Action q = default, A
public async Task PatchAsync(MailFolder body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePatchRequestInformation(body, h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
/// The collection of child folders in the mailFolder.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs
similarity index 93%
rename from msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderRequestBuilder.cs
rename to msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs
index 9203929f6..624ad95ea 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs
@@ -14,7 +14,7 @@
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Item.MailFolders.Item {
/// Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}
- public class MailFolderRequestBuilder {
+ public class MailFolderItemRequestBuilder {
public ChildFoldersRequestBuilder ChildFolders { get =>
new ChildFoldersRequestBuilder(PathParameters, RequestAdapter);
}
@@ -37,11 +37,11 @@ public class MailFolderRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
///
- /// Instantiates a new MailFolderRequestBuilder and sets the default values.
+ /// Instantiates a new MailFolderItemRequestBuilder and sets the default values.
/// Path parameters for the request
/// The request adapter to use to execute the requests.
///
- public MailFolderRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
+ public MailFolderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}{?select}";
@@ -50,11 +50,11 @@ public MailFolderRequestBuilder(Dictionary pathParameters, IRequ
RequestAdapter = requestAdapter;
}
///
- /// Instantiates a new MailFolderRequestBuilder and sets the default values.
+ /// Instantiates a new MailFolderItemRequestBuilder and sets the default values.
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
///
- public MailFolderRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
+ public MailFolderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}{?select}";
@@ -126,7 +126,7 @@ public RequestInformation CreatePatchRequestInformation(MailFolder body, Action<
///
public async Task DeleteAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateDeleteRequestInformation(h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
///
/// The user's mail folders. Read-only. Nullable.
@@ -138,7 +138,7 @@ public async Task DeleteAsync(Action> h = default, I
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MailFolder.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// The user's mail folders. Read-only. Nullable.
@@ -151,7 +151,7 @@ public async Task GetAsync(Action q = default, A
public async Task PatchAsync(MailFolder body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePatchRequestInformation(body, h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
/// The user's mail folders. Read-only. Nullable.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs
similarity index 92%
rename from msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleRequestBuilder.cs
rename to msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs
index be586d090..4d90f87a0 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs
@@ -9,7 +9,7 @@
using System.Threading.Tasks;
namespace Graphdotnetv4.Users.Item.MailFolders.Item.MessageRules.Item {
/// Builds and executes requests for operations under \users\{user-id}\mailFolders\{mailFolder-id}\messageRules\{messageRule-id}
- public class MessageRuleRequestBuilder {
+ public class MessageRuleItemRequestBuilder {
/// Path parameters for the request
private Dictionary PathParameters { get; set; }
/// The request adapter to use to execute the requests.
@@ -17,11 +17,11 @@ public class MessageRuleRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
///
- /// Instantiates a new MessageRuleRequestBuilder and sets the default values.
+ /// Instantiates a new MessageRuleItemRequestBuilder and sets the default values.
/// Path parameters for the request
/// The request adapter to use to execute the requests.
///
- public MessageRuleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
+ public MessageRuleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) {
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}/messageRules/{messageRule_id}{?select}";
@@ -30,11 +30,11 @@ public MessageRuleRequestBuilder(Dictionary pathParameters, IReq
RequestAdapter = requestAdapter;
}
///
- /// Instantiates a new MessageRuleRequestBuilder and sets the default values.
+ /// Instantiates a new MessageRuleItemRequestBuilder and sets the default values.
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
///
- public MessageRuleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
+ public MessageRuleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
UrlTemplate = "{+baseurl}/users/{user_id}/mailFolders/{mailFolder_id}/messageRules/{messageRule_id}{?select}";
@@ -106,7 +106,7 @@ public RequestInformation CreatePatchRequestInformation(MessageRule body, Action
///
public async Task DeleteAsync(Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateDeleteRequestInformation(h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
///
/// The collection of rules that apply to the user's Inbox folder.
@@ -118,7 +118,7 @@ public async Task DeleteAsync(Action> h = default, I
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MessageRule.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// The collection of rules that apply to the user's Inbox folder.
@@ -131,7 +131,7 @@ public async Task GetAsync(Action q = default,
public async Task PatchAsync(MessageRule body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePatchRequestInformation(body, h, o);
- await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, cancellationToken);
+ await RequestAdapter.SendNoContentAsync(requestInfo, responseHandler, default, cancellationToken);
}
/// The collection of rules that apply to the user's Inbox folder.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs
index 55407ffe1..adaf22906 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs
@@ -18,10 +18,10 @@ public class MessageRulesRequestBuilder {
/// Url template to use to build the URL for the current request builder
private string UrlTemplate { get; set; }
/// Gets an item from the Graphdotnetv4.users.item.mailFolders.item.messageRules.item collection
- public MessageRuleRequestBuilder this[string position] { get {
+ public MessageRuleItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary(PathParameters);
urlTplParams.Add("messageRule_id", position);
- return new MessageRuleRequestBuilder(urlTplParams, RequestAdapter);
+ return new MessageRuleItemRequestBuilder(urlTplParams, RequestAdapter);
} }
///
/// Instantiates a new MessageRulesRequestBuilder and sets the default values.
@@ -99,7 +99,7 @@ public RequestInformation CreatePostRequestInformation(MessageRule body, Action<
///
public async Task GetAsync(Action q = default, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
var requestInfo = CreateGetRequestInformation(q, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MessageRulesResponse.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
///
/// The collection of rules that apply to the user's Inbox folder.
@@ -112,7 +112,7 @@ public async Task GetAsync(Action q =
public async Task PostAsync(MessageRule body, Action> h = default, IEnumerable o = default, IResponseHandler responseHandler = default, CancellationToken cancellationToken = default) {
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = CreatePostRequestInformation(body, h, o);
- return await RequestAdapter.SendAsync(requestInfo, responseHandler, cancellationToken);
+ return await RequestAdapter.SendAsync(requestInfo, MessageRule.CreateFromDiscriminatorValue, responseHandler, default, cancellationToken);
}
/// The collection of rules that apply to the user's Inbox folder.
public class GetQueryParameters : QueryParametersBase {
diff --git a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesResponse.cs b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesResponse.cs
index 7390f9a48..e83333b02 100644
--- a/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesResponse.cs
+++ b/msgraph-mail/dotnet/Users/Item/MailFolders/Item/MessageRules/MessageRulesResponse.cs
@@ -17,12 +17,20 @@ public MessageRulesResponse() {
AdditionalData = new Dictionary();
}
///
+ /// Creates a new instance of the appropriate class based on discriminator value
+ /// The parse node to use to read the discriminator value and create the object
+ ///
+ public static MessageRulesResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
+ _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
+ return new MessageRulesResponse();
+ }
+ ///
/// The deserialization information for the current model
///
public IDictionary> GetFieldDeserializers() {
return new Dictionary> {
{"@odata.nextLink", (o,n) => { (o as MessageRulesResponse).NextLink = n.GetStringValue(); } },
- {"value", (o,n) => { (o as MessageRulesResponse).Value = n.GetCollectionOfObjectValues().ToList(); } },
+ {"value", (o,n) => { (o as MessageRulesResponse).Value = n.GetCollectionOfObjectValues