forked from microsoftgraph/msgraph-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccessPackageResource.cs
More file actions
123 lines (123 loc) · 6.77 KB
/
Copy pathAccessPackageResource.cs
File metadata and controls
123 lines (123 loc) · 6.77 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace ApiSdk.Models {
public class AccessPackageResource : Entity, IParsable {
/// <summary>Contains information about the attributes to be collected from the requestor and sent to the resource application.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<AccessPackageResourceAttribute>? Attributes { get; set; }
#nullable restore
#else
public List<AccessPackageResourceAttribute> Attributes { get; set; }
#endif
/// <summary>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. Read-only.</summary>
public DateTimeOffset? CreatedDateTime { get; set; }
/// <summary>A description for the resource.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Description { get; set; }
#nullable restore
#else
public string Description { get; set; }
#endif
/// <summary>The display name of the resource, such as the application name, group name or site name.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? DisplayName { get; set; }
#nullable restore
#else
public string DisplayName { get; set; }
#endif
/// <summary>Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment's originId.Supports $expand.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public AccessPackageResourceEnvironment? Environment { get; set; }
#nullable restore
#else
public AccessPackageResourceEnvironment Environment { get; set; }
#endif
/// <summary>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. Read-only.</summary>
public DateTimeOffset? ModifiedDateTime { get; set; }
/// <summary>The unique identifier of the resource in the origin system. In the case of a Microsoft Entra group, this is the identifier of the group.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? OriginId { get; set; }
#nullable restore
#else
public string OriginId { get; set; }
#endif
/// <summary>The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? OriginSystem { get; set; }
#nullable restore
#else
public string OriginSystem { get; set; }
#endif
/// <summary>Read-only. Nullable. Supports $expand.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<AccessPackageResourceRole>? Roles { get; set; }
#nullable restore
#else
public List<AccessPackageResourceRole> Roles { get; set; }
#endif
/// <summary>Read-only. Nullable. Supports $expand.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<AccessPackageResourceScope>? Scopes { get; set; }
#nullable restore
#else
public List<AccessPackageResourceScope> Scopes { get; set; }
#endif
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <cref="AccessPackageResource"></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static new AccessPackageResource CreateFromDiscriminatorValue(IParseNode parseNode) {
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new AccessPackageResource();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A <cref="IDictionary<string, Action<IParseNode>>"></returns>
public override IDictionary<string, Action<IParseNode>> GetFieldDeserializers() {
return new Dictionary<string, Action<IParseNode>>(base.GetFieldDeserializers()) {
{"attributes", n => { Attributes = n.GetCollectionOfObjectValues<AccessPackageResourceAttribute>(AccessPackageResourceAttribute.CreateFromDiscriminatorValue)?.ToList(); } },
{"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } },
{"description", n => { Description = n.GetStringValue(); } },
{"displayName", n => { DisplayName = n.GetStringValue(); } },
{"environment", n => { Environment = n.GetObjectValue<AccessPackageResourceEnvironment>(AccessPackageResourceEnvironment.CreateFromDiscriminatorValue); } },
{"modifiedDateTime", n => { ModifiedDateTime = n.GetDateTimeOffsetValue(); } },
{"originId", n => { OriginId = n.GetStringValue(); } },
{"originSystem", n => { OriginSystem = n.GetStringValue(); } },
{"roles", n => { Roles = n.GetCollectionOfObjectValues<AccessPackageResourceRole>(AccessPackageResourceRole.CreateFromDiscriminatorValue)?.ToList(); } },
{"scopes", n => { Scopes = n.GetCollectionOfObjectValues<AccessPackageResourceScope>(AccessPackageResourceScope.CreateFromDiscriminatorValue)?.ToList(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public override void Serialize(ISerializationWriter writer) {
_ = writer ?? throw new ArgumentNullException(nameof(writer));
base.Serialize(writer);
writer.WriteCollectionOfObjectValues<AccessPackageResourceAttribute>("attributes", Attributes);
writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime);
writer.WriteStringValue("description", Description);
writer.WriteStringValue("displayName", DisplayName);
writer.WriteObjectValue<AccessPackageResourceEnvironment>("environment", Environment);
writer.WriteDateTimeOffsetValue("modifiedDateTime", ModifiedDateTime);
writer.WriteStringValue("originId", OriginId);
writer.WriteStringValue("originSystem", OriginSystem);
writer.WriteCollectionOfObjectValues<AccessPackageResourceRole>("roles", Roles);
writer.WriteCollectionOfObjectValues<AccessPackageResourceScope>("scopes", Scopes);
}
}
}