Skip to content

Commit 99b7a01

Browse files
Merge pull request #369 from microsoftgraph/v1.0/pipelinebuild/960089
Generated models and request builders using Typewriter
2 parents ef7f4e9 + 58d11a5 commit 99b7a01

20 files changed

+867
-2
lines changed

src/Microsoft.Graph/Models/Generated/FileAttachment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public partial class FileAttachment : Attachment
3030

3131
/// <summary>
3232
/// Gets or sets content location.
33-
/// The Uniform Resource Identifier (URI) that corresponds to the location of the content of the attachment.
33+
/// Do not use this property as it is not supported.
3434
/// </summary>
3535
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "contentLocation", Required = Newtonsoft.Json.Required.Default)]
3636
public string ContentLocation { get; set; }

src/Microsoft.Graph/Models/Generated/Group.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ namespace Microsoft.Graph
2121
public partial class Group : DirectoryObject
2222
{
2323

24+
/// <summary>
25+
/// Gets or sets assigned licenses.
26+
/// </summary>
27+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "assignedLicenses", Required = Newtonsoft.Json.Required.Default)]
28+
public IEnumerable<AssignedLicense> AssignedLicenses { get; set; }
29+
2430
/// <summary>
2531
/// Gets or sets classification.
2632
/// Describes a classification for the group (such as low, medium or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default.
@@ -49,13 +55,25 @@ public partial class Group : DirectoryObject
4955
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "displayName", Required = Newtonsoft.Json.Required.Default)]
5056
public string DisplayName { get; set; }
5157

58+
/// <summary>
59+
/// Gets or sets has members with license errors.
60+
/// </summary>
61+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "hasMembersWithLicenseErrors", Required = Newtonsoft.Json.Required.Default)]
62+
public bool? HasMembersWithLicenseErrors { get; set; }
63+
5264
/// <summary>
5365
/// Gets or sets group types.
5466
/// Specifies the type of group to create. Possible values are Unified to create an Office 365 group, or DynamicMembership for dynamic groups. For all other group types, like security-enabled groups and email-enabled security groups, do not set this property. Returned by default. Supports $filter.
5567
/// </summary>
5668
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "groupTypes", Required = Newtonsoft.Json.Required.Default)]
5769
public IEnumerable<string> GroupTypes { get; set; }
5870

71+
/// <summary>
72+
/// Gets or sets license processing state.
73+
/// </summary>
74+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "licenseProcessingState", Required = Newtonsoft.Json.Required.Default)]
75+
public LicenseProcessingState LicenseProcessingState { get; set; }
76+
5977
/// <summary>
6078
/// Gets or sets mail.
6179
/// The SMTP address for the group, for example, 'serviceadmins@contoso.onmicrosoft.com'. Returned by default. Read-only. Supports $filter.
@@ -181,6 +199,12 @@ public partial class Group : DirectoryObject
181199
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "memberOf", Required = Newtonsoft.Json.Required.Default)]
182200
public IGroupMemberOfCollectionWithReferencesPage MemberOf { get; set; }
183201

202+
/// <summary>
203+
/// Gets or sets members with license errors.
204+
/// </summary>
205+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "membersWithLicenseErrors", Required = Newtonsoft.Json.Required.Default)]
206+
public IGroupMembersWithLicenseErrorsCollectionWithReferencesPage MembersWithLicenseErrors { get; set; }
207+
184208
/// <summary>
185209
/// Gets or sets transitive members.
186210
/// </summary>

src/Microsoft.Graph/Models/Generated/ItemBody.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public partial class ItemBody
2424

2525
/// <summary>
2626
/// Gets or sets contentType.
27-
/// The type of the content. Possible values are Text and HTML.
27+
/// The type of the content. Possible values are text and HTML.
2828
/// </summary>
2929
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "contentType", Required = Newtonsoft.Json.Required.Default)]
3030
public BodyType? ContentType { get; set; }
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
7+
// Template Source: Templates\CSharp\Model\ComplexType.cs.tt
8+
9+
namespace Microsoft.Graph
10+
{
11+
using System;
12+
using System.Collections.Generic;
13+
using System.IO;
14+
using System.Runtime.Serialization;
15+
using Newtonsoft.Json;
16+
17+
/// <summary>
18+
/// The type LicenseAssignmentState.
19+
/// </summary>
20+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
21+
[JsonConverter(typeof(DerivedTypeConverter))]
22+
public partial class LicenseAssignmentState
23+
{
24+
25+
/// <summary>
26+
/// Gets or sets skuId.
27+
/// </summary>
28+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "skuId", Required = Newtonsoft.Json.Required.Default)]
29+
public Guid? SkuId { get; set; }
30+
31+
/// <summary>
32+
/// Gets or sets disabledPlans.
33+
/// </summary>
34+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "disabledPlans", Required = Newtonsoft.Json.Required.Default)]
35+
public IEnumerable<Guid> DisabledPlans { get; set; }
36+
37+
/// <summary>
38+
/// Gets or sets assignedByGroup.
39+
/// </summary>
40+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "assignedByGroup", Required = Newtonsoft.Json.Required.Default)]
41+
public string AssignedByGroup { get; set; }
42+
43+
/// <summary>
44+
/// Gets or sets state.
45+
/// </summary>
46+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "state", Required = Newtonsoft.Json.Required.Default)]
47+
public string State { get; set; }
48+
49+
/// <summary>
50+
/// Gets or sets error.
51+
/// </summary>
52+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "error", Required = Newtonsoft.Json.Required.Default)]
53+
public string Error { get; set; }
54+
55+
/// <summary>
56+
/// Gets or sets additional data.
57+
/// </summary>
58+
[JsonExtensionData(ReadData = true)]
59+
public IDictionary<string, object> AdditionalData { get; set; }
60+
61+
/// <summary>
62+
/// Gets or sets @odata.type.
63+
/// </summary>
64+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "@odata.type", Required = Newtonsoft.Json.Required.Default)]
65+
public string ODataType { get; set; }
66+
67+
}
68+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
7+
// Template Source: Templates\CSharp\Model\ComplexType.cs.tt
8+
9+
namespace Microsoft.Graph
10+
{
11+
using System;
12+
using System.Collections.Generic;
13+
using System.IO;
14+
using System.Runtime.Serialization;
15+
using Newtonsoft.Json;
16+
17+
/// <summary>
18+
/// The type LicenseProcessingState.
19+
/// </summary>
20+
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
21+
[JsonConverter(typeof(DerivedTypeConverter))]
22+
public partial class LicenseProcessingState
23+
{
24+
25+
/// <summary>
26+
/// Gets or sets state.
27+
/// </summary>
28+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "state", Required = Newtonsoft.Json.Required.Default)]
29+
public string State { get; set; }
30+
31+
/// <summary>
32+
/// Gets or sets additional data.
33+
/// </summary>
34+
[JsonExtensionData(ReadData = true)]
35+
public IDictionary<string, object> AdditionalData { get; set; }
36+
37+
/// <summary>
38+
/// Gets or sets @odata.type.
39+
/// </summary>
40+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "@odata.type", Required = Newtonsoft.Json.Required.Default)]
41+
public string ODataType { get; set; }
42+
43+
}
44+
}

src/Microsoft.Graph/Models/Generated/User.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ public partial class User : DirectoryObject
138138
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "legalAgeGroupClassification", Required = Newtonsoft.Json.Required.Default)]
139139
public string LegalAgeGroupClassification { get; set; }
140140

141+
/// <summary>
142+
/// Gets or sets license assignment states.
143+
/// </summary>
144+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName = "licenseAssignmentStates", Required = Newtonsoft.Json.Required.Default)]
145+
public IEnumerable<LicenseAssignmentState> LicenseAssignmentStates { get; set; }
146+
141147
/// <summary>
142148
/// Gets or sets mail.
143149
/// The SMTP address for the user, for example, 'jeff@contoso.onmicrosoft.com'. Read-Only. Supports $filter.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
7+
// Template Source: Templates\CSharp\Requests\EntityCollectionReferencesRequest.cs.tt
8+
9+
namespace Microsoft.Graph
10+
{
11+
using System;
12+
using System.Collections.Generic;
13+
using System.Net.Http;
14+
using System.Threading;
15+
16+
/// <summary>
17+
/// The type GroupMembersWithLicenseErrorsCollectionReferencesRequest.
18+
/// </summary>
19+
public partial class GroupMembersWithLicenseErrorsCollectionReferencesRequest : BaseRequest, IGroupMembersWithLicenseErrorsCollectionReferencesRequest
20+
{
21+
/// <summary>
22+
/// Constructs a new GroupMembersWithLicenseErrorsCollectionReferencesRequest.
23+
/// </summary>
24+
/// <param name="requestUrl">The URL for the built request.</param>
25+
/// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
26+
/// <param name="options">Query and header option name value pairs for the request.</param>
27+
public GroupMembersWithLicenseErrorsCollectionReferencesRequest(
28+
string requestUrl,
29+
IBaseClient client,
30+
IEnumerable<Option> options)
31+
: base(requestUrl, client, options)
32+
{
33+
}
34+
35+
/// <summary>
36+
/// Adds the specified DirectoryObject to the collection via POST.
37+
/// </summary>
38+
/// <param name="directoryObject">The DirectoryObject to add.</param>
39+
/// <returns>The task to await.</returns>
40+
public System.Threading.Tasks.Task AddAsync(DirectoryObject directoryObject)
41+
{
42+
return this.AddAsync(directoryObject, CancellationToken.None);
43+
}
44+
45+
/// <summary>
46+
/// Adds the specified DirectoryObject to the collection via POST.
47+
/// </summary>
48+
/// <param name="directoryObject">The DirectoryObject to add.</param>
49+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
50+
/// <returns>The task to await.</returns>
51+
public System.Threading.Tasks.Task AddAsync(DirectoryObject directoryObject, CancellationToken cancellationToken)
52+
{
53+
this.ContentType = "application/json";
54+
this.Method = "POST";
55+
56+
if (string.IsNullOrEmpty(directoryObject.Id))
57+
{
58+
throw new ServiceException(new Error { Code = "invalidRequest", Message = "ID is required to add a reference." });
59+
}
60+
61+
var requestBody = new ReferenceRequestBody { ODataId = string.Format("{0}/directoryObjects/{1}", this.Client.BaseUrl, directoryObject.Id) };
62+
return this.SendAsync(requestBody, cancellationToken);
63+
}
64+
65+
}
66+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
7+
// Template Source: Templates\CSharp\Requests\EntityCollectionReferencesRequestBuilder.cs.tt
8+
namespace Microsoft.Graph
9+
{
10+
using System;
11+
using System.Collections.Generic;
12+
13+
/// <summary>
14+
/// The type GroupMembersWithLicenseErrorsCollectionReferencesRequestBuilder.
15+
/// </summary>
16+
public partial class GroupMembersWithLicenseErrorsCollectionReferencesRequestBuilder : BaseRequestBuilder, IGroupMembersWithLicenseErrorsCollectionReferencesRequestBuilder
17+
{
18+
19+
/// <summary>
20+
/// Constructs a new GroupMembersWithLicenseErrorsCollectionReferencesRequestBuilder.
21+
/// </summary>
22+
/// <param name="requestUrl">The URL for the built request.</param>
23+
/// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
24+
public GroupMembersWithLicenseErrorsCollectionReferencesRequestBuilder(
25+
string requestUrl,
26+
IBaseClient client)
27+
: base(requestUrl, client)
28+
{
29+
}
30+
31+
/// <summary>
32+
/// Builds the request.
33+
/// </summary>
34+
/// <returns>The built request.</returns>
35+
public IGroupMembersWithLicenseErrorsCollectionReferencesRequest Request()
36+
{
37+
return this.Request(null);
38+
}
39+
40+
/// <summary>
41+
/// Builds the request.
42+
/// </summary>
43+
/// <param name="options">The query and header options for the request.</param>
44+
/// <returns>The built request.</returns>
45+
public IGroupMembersWithLicenseErrorsCollectionReferencesRequest Request(IEnumerable<Option> options)
46+
{
47+
return new GroupMembersWithLicenseErrorsCollectionReferencesRequest(this.RequestUrl, this.Client, options);
48+
}
49+
}
50+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
// **NOTE** This file was generated by a tool and any changes will be overwritten.
6+
7+
// Template Source: Templates\CSharp\Requests\EntityCollectionWithReferencesPage.cs.tt
8+
9+
namespace Microsoft.Graph
10+
{
11+
using System;
12+
13+
/// <summary>
14+
/// The type GroupMembersWithLicenseErrorsCollectionWithReferencesPage.
15+
/// </summary>
16+
public partial class GroupMembersWithLicenseErrorsCollectionWithReferencesPage : CollectionPage<DirectoryObject>, IGroupMembersWithLicenseErrorsCollectionWithReferencesPage
17+
{
18+
/// <summary>
19+
/// Gets the next page <see cref="IGroupMembersWithLicenseErrorsCollectionWithReferencesRequest"/> instance.
20+
/// </summary>
21+
public IGroupMembersWithLicenseErrorsCollectionWithReferencesRequest NextPageRequest { get; private set; }
22+
23+
/// <summary>
24+
/// Initializes the NextPageRequest property.
25+
/// </summary>
26+
public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString)
27+
{
28+
if (!string.IsNullOrEmpty(nextPageLinkString))
29+
{
30+
this.NextPageRequest = new GroupMembersWithLicenseErrorsCollectionWithReferencesRequest(
31+
nextPageLinkString,
32+
client,
33+
null);
34+
}
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)