Skip to content

Commit 8bd7ddc

Browse files
authored
Merge pull request #1774 from microsoftgraph/kiota/v1.0/pipelinebuild/111491
Generated models and request builders
2 parents 776861f + 1455ec5 commit 8bd7ddc

7,421 files changed

Lines changed: 23400 additions & 162745 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v
77

88
## [Unreleased]
99

10+
## [5.4.0] - 2023-03-28
11+
12+
### Added
13+
14+
- Updates kiota abstraction library dependencies to reduce code size in generation.
15+
- Metadata fixes for missing expand clauses for contact endpoints
16+
- Latest metadata updates from 28st March 2023
1017

1118
## [5.3.0] - 2023-03-21
1219

src/Microsoft.Graph/Extensions/DriveItemRequestBuilderExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public static CustomDriveItemItemRequestBuilder ItemWithPath(this Microsoft.Grap
8282

8383
private static IRequestAdapter GetRequestAdapter(this object obj) {
8484
var field = obj.GetType()
85+
.BaseType
8586
.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)
8687
.FirstOrDefault( field => field.FieldType.Equals(typeof(IRequestAdapter)));
8788
return (IRequestAdapter)field?.GetValue(obj);
@@ -164,8 +165,6 @@ public CustomDriveItemItemRequestBuilder(string rawUrl, IRequestAdapter requestA
164165
{ get =>
165166
new PreviewRequestBuilder(this._rawUrl+"/microsoft.graph.preview", RequestAdapter);
166167
}
167-
/// <summary>The request adapter to use to execute the requests.</summary>
168-
private IRequestAdapter RequestAdapter { get; set; }
169168
/// <summary>Provides operations to call the restore method.</summary>
170169
public new RestoreRequestBuilder Restore
171170
{ get =>

src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,24 @@ namespace Microsoft.Graph.Admin {
1313
/// <summary>
1414
/// Provides operations to manage the admin singleton.
1515
/// </summary>
16-
public class AdminRequestBuilder {
17-
/// <summary>Path parameters for the request</summary>
18-
private Dictionary<string, object> PathParameters { get; set; }
19-
/// <summary>The request adapter to use to execute the requests.</summary>
20-
private IRequestAdapter RequestAdapter { get; set; }
16+
public class AdminRequestBuilder : BaseRequestBuilder {
2117
/// <summary>Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.</summary>
2218
public ServiceAnnouncementRequestBuilder ServiceAnnouncement { get =>
2319
new ServiceAnnouncementRequestBuilder(PathParameters, RequestAdapter);
2420
}
25-
/// <summary>Url template to use to build the URL for the current request builder</summary>
26-
private string UrlTemplate { get; set; }
2721
/// <summary>
2822
/// Instantiates a new AdminRequestBuilder and sets the default values.
2923
/// </summary>
3024
/// <param name="pathParameters">Path parameters for the request</param>
3125
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
32-
public AdminRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
33-
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
34-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
35-
UrlTemplate = "{+baseurl}/admin{?%24select,%24expand}";
36-
var urlTplParams = new Dictionary<string, object>(pathParameters);
37-
PathParameters = urlTplParams;
38-
RequestAdapter = requestAdapter;
26+
public AdminRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin{?%24select,%24expand}", pathParameters) {
3927
}
4028
/// <summary>
4129
/// Instantiates a new AdminRequestBuilder and sets the default values.
4230
/// </summary>
4331
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
4432
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
45-
public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
46-
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
47-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
48-
UrlTemplate = "{+baseurl}/admin{?%24select,%24expand}";
49-
var urlTplParams = new Dictionary<string, object>();
50-
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
51-
PathParameters = urlTplParams;
52-
RequestAdapter = requestAdapter;
33+
public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin{?%24select,%24expand}", rawUrl) {
5334
}
5435
/// <summary>
5536
/// Get admin

src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Count/CountRequestBuilder.cs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,20 @@ namespace Microsoft.Graph.Admin.ServiceAnnouncement.HealthOverviews.Count {
1111
/// <summary>
1212
/// Provides operations to count the resources in the collection.
1313
/// </summary>
14-
public class CountRequestBuilder {
15-
/// <summary>Path parameters for the request</summary>
16-
private Dictionary<string, object> PathParameters { get; set; }
17-
/// <summary>The request adapter to use to execute the requests.</summary>
18-
private IRequestAdapter RequestAdapter { get; set; }
19-
/// <summary>Url template to use to build the URL for the current request builder</summary>
20-
private string UrlTemplate { get; set; }
14+
public class CountRequestBuilder : BaseRequestBuilder {
2115
/// <summary>
2216
/// Instantiates a new CountRequestBuilder and sets the default values.
2317
/// </summary>
2418
/// <param name="pathParameters">Path parameters for the request</param>
2519
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
26-
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
27-
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
28-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
29-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24search,%24filter}";
30-
var urlTplParams = new Dictionary<string, object>(pathParameters);
31-
PathParameters = urlTplParams;
32-
RequestAdapter = requestAdapter;
20+
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24search,%24filter}", pathParameters) {
3321
}
3422
/// <summary>
3523
/// Instantiates a new CountRequestBuilder and sets the default values.
3624
/// </summary>
3725
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
3826
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
39-
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
40-
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
41-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
42-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24search,%24filter}";
43-
var urlTplParams = new Dictionary<string, object>();
44-
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
45-
PathParameters = urlTplParams;
46-
RequestAdapter = requestAdapter;
27+
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/$count{?%24search,%24filter}", rawUrl) {
4728
}
4829
/// <summary>
4930
/// Get the number of the resource

src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,11 @@ namespace Microsoft.Graph.Admin.ServiceAnnouncement.HealthOverviews {
1414
/// <summary>
1515
/// Provides operations to manage the healthOverviews property of the microsoft.graph.serviceAnnouncement entity.
1616
/// </summary>
17-
public class HealthOverviewsRequestBuilder {
17+
public class HealthOverviewsRequestBuilder : BaseRequestBuilder {
1818
/// <summary>Provides operations to count the resources in the collection.</summary>
1919
public CountRequestBuilder Count { get =>
2020
new CountRequestBuilder(PathParameters, RequestAdapter);
2121
}
22-
/// <summary>Path parameters for the request</summary>
23-
private Dictionary<string, object> PathParameters { get; set; }
24-
/// <summary>The request adapter to use to execute the requests.</summary>
25-
private IRequestAdapter RequestAdapter { get; set; }
26-
/// <summary>Url template to use to build the URL for the current request builder</summary>
27-
private string UrlTemplate { get; set; }
2822
/// <summary>Provides operations to manage the healthOverviews property of the microsoft.graph.serviceAnnouncement entity.</summary>
2923
public ServiceHealthItemRequestBuilder this[string position] { get {
3024
var urlTplParams = new Dictionary<string, object>(PathParameters);
@@ -36,27 +30,14 @@ public ServiceHealthItemRequestBuilder this[string position] { get {
3630
/// </summary>
3731
/// <param name="pathParameters">Path parameters for the request</param>
3832
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
39-
public HealthOverviewsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
40-
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
41-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
42-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
43-
var urlTplParams = new Dictionary<string, object>(pathParameters);
44-
PathParameters = urlTplParams;
45-
RequestAdapter = requestAdapter;
33+
public HealthOverviewsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) {
4634
}
4735
/// <summary>
4836
/// Instantiates a new HealthOverviewsRequestBuilder and sets the default values.
4937
/// </summary>
5038
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
5139
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
52-
public HealthOverviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
53-
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
54-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
55-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
56-
var urlTplParams = new Dictionary<string, object>();
57-
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
58-
PathParameters = urlTplParams;
59-
RequestAdapter = requestAdapter;
40+
public HealthOverviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) {
6041
}
6142
/// <summary>
6243
/// Retrieve the serviceHealth resources from the **healthOverviews** navigation property. This operation provides the health report of all subscribed services for a tenant.

src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Count/CountRequestBuilder.cs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,20 @@ namespace Microsoft.Graph.Admin.ServiceAnnouncement.HealthOverviews.Item.Issues.
1111
/// <summary>
1212
/// Provides operations to count the resources in the collection.
1313
/// </summary>
14-
public class CountRequestBuilder {
15-
/// <summary>Path parameters for the request</summary>
16-
private Dictionary<string, object> PathParameters { get; set; }
17-
/// <summary>The request adapter to use to execute the requests.</summary>
18-
private IRequestAdapter RequestAdapter { get; set; }
19-
/// <summary>Url template to use to build the URL for the current request builder</summary>
20-
private string UrlTemplate { get; set; }
14+
public class CountRequestBuilder : BaseRequestBuilder {
2115
/// <summary>
2216
/// Instantiates a new CountRequestBuilder and sets the default values.
2317
/// </summary>
2418
/// <param name="pathParameters">Path parameters for the request</param>
2519
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
26-
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
27-
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
28-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
29-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24search,%24filter}";
30-
var urlTplParams = new Dictionary<string, object>(pathParameters);
31-
PathParameters = urlTplParams;
32-
RequestAdapter = requestAdapter;
20+
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24search,%24filter}", pathParameters) {
3321
}
3422
/// <summary>
3523
/// Instantiates a new CountRequestBuilder and sets the default values.
3624
/// </summary>
3725
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
3826
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
39-
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
40-
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
41-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
42-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24search,%24filter}";
43-
var urlTplParams = new Dictionary<string, object>();
44-
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
45-
PathParameters = urlTplParams;
46-
RequestAdapter = requestAdapter;
27+
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues/$count{?%24search,%24filter}", rawUrl) {
4728
}
4829
/// <summary>
4930
/// Get the number of the resource

src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,11 @@ namespace Microsoft.Graph.Admin.ServiceAnnouncement.HealthOverviews.Item.Issues
1414
/// <summary>
1515
/// Provides operations to manage the issues property of the microsoft.graph.serviceHealth entity.
1616
/// </summary>
17-
public class IssuesRequestBuilder {
17+
public class IssuesRequestBuilder : BaseRequestBuilder {
1818
/// <summary>Provides operations to count the resources in the collection.</summary>
1919
public CountRequestBuilder Count { get =>
2020
new CountRequestBuilder(PathParameters, RequestAdapter);
2121
}
22-
/// <summary>Path parameters for the request</summary>
23-
private Dictionary<string, object> PathParameters { get; set; }
24-
/// <summary>The request adapter to use to execute the requests.</summary>
25-
private IRequestAdapter RequestAdapter { get; set; }
26-
/// <summary>Url template to use to build the URL for the current request builder</summary>
27-
private string UrlTemplate { get; set; }
2822
/// <summary>Provides operations to manage the issues property of the microsoft.graph.serviceHealth entity.</summary>
2923
public ServiceHealthIssueItemRequestBuilder this[string position] { get {
3024
var urlTplParams = new Dictionary<string, object>(PathParameters);
@@ -36,27 +30,14 @@ public ServiceHealthIssueItemRequestBuilder this[string position] { get {
3630
/// </summary>
3731
/// <param name="pathParameters">Path parameters for the request</param>
3832
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
39-
public IssuesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) {
40-
_ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters));
41-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
42-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
43-
var urlTplParams = new Dictionary<string, object>(pathParameters);
44-
PathParameters = urlTplParams;
45-
RequestAdapter = requestAdapter;
33+
public IssuesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) {
4634
}
4735
/// <summary>
4836
/// Instantiates a new IssuesRequestBuilder and sets the default values.
4937
/// </summary>
5038
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
5139
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
52-
public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) {
53-
if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl));
54-
_ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter));
55-
UrlTemplate = "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}";
56-
var urlTplParams = new Dictionary<string, object>();
57-
if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl);
58-
PathParameters = urlTplParams;
59-
RequestAdapter = requestAdapter;
40+
public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/serviceAnnouncement/healthOverviews/{serviceHealth%2Did}/issues{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) {
6041
}
6142
/// <summary>
6243
/// A collection of issues that happened on the service, with detailed information for each issue.

0 commit comments

Comments
 (0)