|
| 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 PlannerExternalReference: 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>Used to set the relative order of items in the checklist. The format is defined as outlined here..</summary> |
| 36 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 37 | +#nullable enable |
| 38 | + public string? Alias { |
| 39 | + get { return BackingStore?.Get<string?>("alias"); } |
| 40 | + set { BackingStore?.Set("alias", value); } |
| 41 | + } |
| 42 | +#nullable restore |
| 43 | +#else |
| 44 | + public string Alias { |
| 45 | + get { return BackingStore?.Get<string>("alias"); } |
| 46 | + set { BackingStore?.Set("alias", value); } |
| 47 | + } |
| 48 | +#endif |
| 49 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 50 | +#nullable enable |
| 51 | + public string? PreviewPriority { |
| 52 | + get { return BackingStore?.Get<string?>("previewPriority"); } |
| 53 | + set { BackingStore?.Set("previewPriority", value); } |
| 54 | + } |
| 55 | +#nullable restore |
| 56 | +#else |
| 57 | + public string PreviewPriority { |
| 58 | + get { return BackingStore?.Get<string>("previewPriority"); } |
| 59 | + set { BackingStore?.Set("previewPriority", value); } |
| 60 | + } |
| 61 | +#endif |
| 62 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 63 | +#nullable enable |
| 64 | + public string? Type { |
| 65 | + get { return BackingStore?.Get<string?>("type"); } |
| 66 | + set { BackingStore?.Set("type", value); } |
| 67 | + } |
| 68 | +#nullable restore |
| 69 | +#else |
| 70 | + public string Type { |
| 71 | + get { return BackingStore?.Get<string>("type"); } |
| 72 | + set { BackingStore?.Set("type", value); } |
| 73 | + } |
| 74 | +#endif |
| 75 | + /// <summary>Read-only. User ID by which this is last modified.</summary> |
| 76 | +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER |
| 77 | +#nullable enable |
| 78 | + public IdentitySet? LastModifiedBy { |
| 79 | + get { return BackingStore?.Get<IdentitySet>("lastModifiedBy"); } |
| 80 | + set { BackingStore?.Set("lastModifiedBy", value); } |
| 81 | + } |
| 82 | +#nullable restore |
| 83 | +#else |
| 84 | + public IdentitySet LastModifiedBy { |
| 85 | + get { return BackingStore?.Get<IdentitySet>("lastModifiedBy"); } |
| 86 | + set { BackingStore?.Set("lastModifiedBy", value); } |
| 87 | + } |
| 88 | +#endif |
| 89 | + /// <summary>Read-only. Date and time at which this is last modified. 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.</summary> |
| 90 | + public DateTimeOffset? LastModifiedDateTime { |
| 91 | + get { return BackingStore?.Get<DateTimeOffset?>("lastModifiedDateTime"); } |
| 92 | + set { BackingStore?.Set("lastModifiedDateTime", value); } |
| 93 | + } |
| 94 | + /// <summary> |
| 95 | + /// Instantiates a new auditActivityInitiator and sets the default values. |
| 96 | + /// </summary> |
| 97 | + public PlannerExternalReference() { |
| 98 | + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); |
| 99 | + AdditionalData = new Dictionary<string, object>(); |
| 100 | + OdataType = "#microsoft.graph.plannerExternalReference"; |
| 101 | + } |
| 102 | + /// <summary> |
| 103 | + /// Creates a new instance of the appropriate class based on discriminator value |
| 104 | + /// </summary> |
| 105 | + /// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param> |
| 106 | + public static PlannerExternalReference CreateFromDiscriminatorValue(IParseNode parseNode) { |
| 107 | + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); |
| 108 | + return new PlannerExternalReference(); |
| 109 | + } |
| 110 | + /// <summary> |
| 111 | + /// The deserialization information for the current model |
| 112 | + /// </summary> |
| 113 | + public IDictionary<string, Action<IParseNode>> GetFieldDeserializers() { |
| 114 | + return new Dictionary<string, Action<IParseNode>> { |
| 115 | + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, |
| 116 | + {"type", n => { Type = n.GetStringValue(); } }, |
| 117 | + {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, |
| 118 | + {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, |
| 119 | + {"previewPriority", n => { PreviewPriority = n.GetStringValue(); } }, |
| 120 | + {"alias", n => { Alias = n.GetStringValue(); } }, |
| 121 | + }; |
| 122 | + } |
| 123 | + /// <summary> |
| 124 | + /// Serializes information the current object |
| 125 | + /// </summary> |
| 126 | + /// <param name="writer">Serialization writer to use to serialize this model</param> |
| 127 | + public void Serialize(ISerializationWriter writer) { |
| 128 | + _ = writer ?? throw new ArgumentNullException(nameof(writer)); |
| 129 | + writer.WriteStringValue("@odata.type", OdataType); |
| 130 | + writer.WriteStringValue("type", Type); |
| 131 | + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); |
| 132 | + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); |
| 133 | + writer.WriteStringValue("previewPriority", PreviewPriority); |
| 134 | + writer.WriteStringValue("alias", Alias); |
| 135 | + writer.WriteAdditionalData(AdditionalData); |
| 136 | + } |
| 137 | +} |
0 commit comments