|
| 1 | +// ------------------------------------------------------------------------------ |
| 2 | +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. |
| 3 | +// ------------------------------------------------------------------------------ |
| 4 | + |
| 5 | +using Microsoft.Kiota.Abstractions.Serialization; |
| 6 | +using Microsoft.Kiota.Abstractions.Store; |
| 7 | +using System; |
| 8 | +using System.Collections.Generic; |
| 9 | + |
| 10 | +namespace Microsoft.Graph.Models; |
| 11 | + |
| 12 | +public class PlannerAssignment: IAdditionalDataHolder, IBackedModel, IParsable |
| 13 | +{ |
| 14 | + /// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary> |
| 15 | + public IDictionary<string, object> AdditionalData { |
| 16 | + get { return BackingStore?.Get<IDictionary<string, object>>("additionalData"); } |
| 17 | + set { BackingStore?.Set("additionalData", value); } |
| 18 | + } |
| 19 | + /// <summary>Stores model information.</summary> |
| 20 | + public IBackingStore BackingStore { get; private set; } |
| 21 | + /// <summary>The OdataType property</summary> |
| 22 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 23 | +#nullable enable |
| 24 | + public string? OdataType { |
| 25 | + get { return BackingStore?.Get<string?>("@odata.type"); } |
| 26 | + set { BackingStore?.Set("@odata.type", value); } |
| 27 | + } |
| 28 | +#nullable restore |
| 29 | +#else |
| 30 | + public string OdataType { |
| 31 | + get { return BackingStore?.Get<string>("@odata.type"); } |
| 32 | + set { BackingStore?.Set("@odata.type", value); } |
| 33 | + } |
| 34 | +#endif |
| 35 | + /// <summary>The OdataType property</summary> |
| 36 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 37 | +#nullable enable |
| 38 | + public string? OrderHint { |
| 39 | + get { return BackingStore?.Get<string?>("orderHint"); } |
| 40 | + set { BackingStore?.Set("orderHint", value); } |
| 41 | + } |
| 42 | +#nullable restore |
| 43 | +#else |
| 44 | + public string OrderHint { |
| 45 | + get { return BackingStore?.Get<string>("orderHint"); } |
| 46 | + set { BackingStore?.Set("orderHint", value); } |
| 47 | + } |
| 48 | +#endif |
| 49 | + /// <summary> |
| 50 | + /// Instantiates a new auditActivityInitiator and sets the default values. |
| 51 | + /// </summary> |
| 52 | + public PlannerAssignment() { |
| 53 | + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); |
| 54 | + AdditionalData = new Dictionary<string, object>(); |
| 55 | + OdataType = "#microsoft.graph.plannerAssignment"; |
| 56 | + OrderHint = "!"; |
| 57 | + } |
| 58 | + /// <summary> |
| 59 | + /// Creates a new instance of the appropriate class based on discriminator value |
| 60 | + /// </summary> |
| 61 | + /// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param> |
| 62 | + public static PlannerAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { |
| 63 | + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); |
| 64 | + return new PlannerAssignment(); |
| 65 | + } |
| 66 | + /// <summary> |
| 67 | + /// The deserialization information for the current model |
| 68 | + /// </summary> |
| 69 | + public IDictionary<string, Action<IParseNode>> GetFieldDeserializers() { |
| 70 | + return new Dictionary<string, Action<IParseNode>> { |
| 71 | + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, |
| 72 | + {"orderHint", n => { OrderHint = n.GetStringValue(); } }, |
| 73 | + }; |
| 74 | + } |
| 75 | + /// <summary> |
| 76 | + /// Serializes information the current object |
| 77 | + /// </summary> |
| 78 | + /// <param name="writer">Serialization writer to use to serialize this model</param> |
| 79 | + public void Serialize(ISerializationWriter writer) { |
| 80 | + _ = writer ?? throw new ArgumentNullException(nameof(writer)); |
| 81 | + writer.WriteStringValue("@odata.type", OdataType); |
| 82 | + writer.WriteStringValue("orderHint", OrderHint); |
| 83 | + writer.WriteAdditionalData(AdditionalData); |
| 84 | + } |
| 85 | +} |
0 commit comments