Skip to content

Commit 2cd8709

Browse files
author
Paul Schaeflein
committed
added defaultView to splist
1 parent 39383bc commit 2cd8709

3 files changed

Lines changed: 92 additions & 3 deletions

File tree

codegen/lib/apiclient/Models/SPList.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ public partial class SPList : IAdditionalDataHolder, IParsable
1717
public IDictionary<string, object> AdditionalData { get; set; }
1818
/// <summary>The list definition type on which the list is based.</summary>
1919
public int? BaseTemplate { get; set; }
20-
/// <summary>The Forms property</summary>
20+
/// <summary>Requires $expand=DefaultView.</summary>
21+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
22+
#nullable enable
23+
public global::Graph.Community.Models.SPView? DefaultView { get; set; }
24+
#nullable restore
25+
#else
26+
public global::Graph.Community.Models.SPView DefaultView { get; set; }
27+
#endif
28+
/// <summary>Requires $expand=Forms.</summary>
2129
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
2230
#nullable enable
2331
public List<global::Graph.Community.Models.SPForm>? Forms { get; set; }
@@ -61,6 +69,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
6169
return new Dictionary<string, Action<IParseNode>>
6270
{
6371
{ "BaseTemplate", n => { BaseTemplate = n.GetIntValue(); } },
72+
{ "DefaultView", n => { DefaultView = n.GetObjectValue<global::Graph.Community.Models.SPView>(global::Graph.Community.Models.SPView.CreateFromDiscriminatorValue); } },
6473
{ "Forms", n => { Forms = n.GetCollectionOfObjectValues<global::Graph.Community.Models.SPForm>(global::Graph.Community.Models.SPForm.CreateFromDiscriminatorValue)?.AsList(); } },
6574
{ "Id", n => { Id = n.GetGuidValue(); } },
6675
{ "Title", n => { Title = n.GetStringValue(); } },
@@ -74,6 +83,7 @@ public virtual void Serialize(ISerializationWriter writer)
7483
{
7584
_ = writer ?? throw new ArgumentNullException(nameof(writer));
7685
writer.WriteIntValue("BaseTemplate", BaseTemplate);
86+
writer.WriteObjectValue<global::Graph.Community.Models.SPView>("DefaultView", DefaultView);
7787
writer.WriteCollectionOfObjectValues<global::Graph.Community.Models.SPForm>("Forms", Forms);
7888
writer.WriteGuidValue("Id", Id);
7989
writer.WriteStringValue("Title", Title);
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using Microsoft.Kiota.Abstractions.Extensions;
4+
using Microsoft.Kiota.Abstractions.Serialization;
5+
using System.Collections.Generic;
6+
using System.IO;
7+
using System;
8+
namespace Graph.Community.Models
9+
{
10+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
11+
#pragma warning disable CS1591
12+
public partial class SPView : IAdditionalDataHolder, IParsable
13+
#pragma warning restore CS1591
14+
{
15+
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
16+
public IDictionary<string, object> AdditionalData { get; set; }
17+
/// <summary>The Id property</summary>
18+
public Guid? Id { get; set; }
19+
/// <summary>The ServerRelativeUrl property</summary>
20+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
21+
#nullable enable
22+
public string? ServerRelativeUrl { get; set; }
23+
#nullable restore
24+
#else
25+
public string ServerRelativeUrl { get; set; }
26+
#endif
27+
/// <summary>The Title property</summary>
28+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
29+
#nullable enable
30+
public string? Title { get; set; }
31+
#nullable restore
32+
#else
33+
public string Title { get; set; }
34+
#endif
35+
/// <summary>
36+
/// Instantiates a new <see cref="global::Graph.Community.Models.SPView"/> and sets the default values.
37+
/// </summary>
38+
public SPView()
39+
{
40+
AdditionalData = new Dictionary<string, object>();
41+
}
42+
/// <summary>
43+
/// Creates a new instance of the appropriate class based on discriminator value
44+
/// </summary>
45+
/// <returns>A <see cref="global::Graph.Community.Models.SPView"/></returns>
46+
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
47+
public static global::Graph.Community.Models.SPView CreateFromDiscriminatorValue(IParseNode parseNode)
48+
{
49+
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
50+
return new global::Graph.Community.Models.SPView();
51+
}
52+
/// <summary>
53+
/// The deserialization information for the current model
54+
/// </summary>
55+
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
56+
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
57+
{
58+
return new Dictionary<string, Action<IParseNode>>
59+
{
60+
{ "Id", n => { Id = n.GetGuidValue(); } },
61+
{ "ServerRelativeUrl", n => { ServerRelativeUrl = n.GetStringValue(); } },
62+
{ "Title", n => { Title = n.GetStringValue(); } },
63+
};
64+
}
65+
/// <summary>
66+
/// Serializes information the current object
67+
/// </summary>
68+
/// <param name="writer">Serialization writer to use to serialize this model</param>
69+
public virtual void Serialize(ISerializationWriter writer)
70+
{
71+
_ = writer ?? throw new ArgumentNullException(nameof(writer));
72+
writer.WriteGuidValue("Id", Id);
73+
writer.WriteStringValue("ServerRelativeUrl", ServerRelativeUrl);
74+
writer.WriteStringValue("Title", Title);
75+
writer.WriteAdditionalData(AdditionalData);
76+
}
77+
}
78+
}
79+
#pragma warning restore CS0618

codegen/lib/apiclient/kiota-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"descriptionHash": "62FAB01C56186AAB752F18A8CE416A72C5E01BFCED6589C553259E32B66EA5982E7E20933C5F9DF3F3C69291DD3F0172E20A8E3F8E44C4D858F087A03CA98287",
2+
"descriptionHash": "7DFD7AA78F9C8B297E319AF5A042EC4C8E6810DFC8A25FCDE1C2D5651E1B33678D567CB7093160A087D18A567EEE59E13AC9CF22EACE21F3C3288DD24B746D6C",
33
"descriptionLocation": "../../../../graph-community-metadata/docs/openapi.json",
44
"lockFileVersion": "1.0.0",
5-
"kiotaVersion": "1.22.3",
5+
"kiotaVersion": "1.27.0",
66
"clientClassName": "SPClient",
77
"typeAccessModifier": "Public",
88
"clientNamespaceName": "Graph.Community",

0 commit comments

Comments
 (0)