forked from microsoftgraph/msgraph-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlertCollectionResponse.cs
More file actions
48 lines (48 loc) · 2.38 KB
/
Copy pathAlertCollectionResponse.cs
File metadata and controls
48 lines (48 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using Microsoft.Kiota.Abstractions.Serialization;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace ApiSdk.Models {
public class AlertCollectionResponse : IAdditionalDataHolder, IParsable {
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The nextLink property</summary>
public string NextLink { get; set; }
/// <summary>The value property</summary>
public List<Alert> Value { get; set; }
/// <summary>
/// Instantiates a new AlertCollectionResponse and sets the default values.
/// </summary>
public AlertCollectionResponse() {
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
/// </summary>
public static AlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new AlertCollectionResponse();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
public IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>> {
{"@odata.nextLink", n => { NextLink = n.GetStringValue(); } },
{"value", n => { Value = n.GetCollectionOfObjectValues<Alert>(Alert.CreateFromDiscriminatorValue).ToList(); } },
};
}
/// <summary>
/// Serializes information the current object
/// <param name="writer">Serialization writer to use to serialize this model</param>
/// </summary>
public void Serialize(ISerializationWriter writer) {
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("@odata.nextLink", NextLink);
writer.WriteCollectionOfObjectValues<Alert>("value", Value);
writer.WriteAdditionalData(AdditionalData);
}
}
}