Skip to content

Commit

Permalink
Merge pull request #2171 from microsoftgraph/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
baywet authored Oct 19, 2023
2 parents 0ee0d08 + 5fbfa66 commit a9f6568
Show file tree
Hide file tree
Showing 217 changed files with 1,877 additions and 757 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validatePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
solutionName: Microsoft.Graph.sln
steps:
- uses: actions/[email protected].0
- uses: actions/[email protected].1
- name: Setup .NET
uses: actions/[email protected]
with:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v

## [Unreleased]

## [5.31.0] - 2023-10-19

- Latest metadata updates from 17th October 2023.

## [5.30.0] - 2023-10-12

- Fixes incorrect casing of model properties during serialization/deserialization (https://github.com/microsoft/kiota/pull/343)
Expand Down
5 changes: 5 additions & 0 deletions src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// <auto-generated/>
using Microsoft.Graph.Admin.Edge;
using Microsoft.Graph.Admin.People;
using Microsoft.Graph.Admin.ServiceAnnouncement;
using Microsoft.Graph.Admin.Sharepoint;
using Microsoft.Graph.Models.ODataErrors;
Expand All @@ -21,6 +22,10 @@ public class AdminRequestBuilder : BaseRequestBuilder {
public EdgeRequestBuilder Edge { get =>
new EdgeRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the people property of the microsoft.graph.admin entity.</summary>
public PeopleRequestBuilder People { get =>
new PeopleRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>Provides operations to manage the serviceAnnouncement property of the microsoft.graph.admin entity.</summary>
public ServiceAnnouncementRequestBuilder ServiceAnnouncement { get =>
new ServiceAnnouncementRequestBuilder(PathParameters, RequestAdapter);
Expand Down
197 changes: 197 additions & 0 deletions src/Microsoft.Graph/Generated/Admin/People/PeopleRequestBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
// <auto-generated/>
using Microsoft.Graph.Admin.People.ProfileCardProperties;
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Graph.Models;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Admin.People {
/// <summary>
/// Provides operations to manage the people property of the microsoft.graph.admin entity.
/// </summary>
public class PeopleRequestBuilder : BaseRequestBuilder {
/// <summary>Provides operations to manage the profileCardProperties property of the microsoft.graph.peopleAdminSettings entity.</summary>
public ProfileCardPropertiesRequestBuilder ProfileCardProperties { get =>
new ProfileCardPropertiesRequestBuilder(PathParameters, RequestAdapter);
}
/// <summary>
/// Instantiates a new PeopleRequestBuilder and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public PeopleRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/people{?%24select,%24expand}", pathParameters) {
}
/// <summary>
/// Instantiates a new PeopleRequestBuilder and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/people{?%24select,%24expand}", rawUrl) {
}
/// <summary>
/// Get people from admin
/// </summary>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<PeopleAdminSettings?> GetAsync(Action<PeopleRequestBuilderGetRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#nullable restore
#else
public async Task<PeopleAdminSettings> GetAsync(Action<PeopleRequestBuilderGetRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync<PeopleAdminSettings>(requestInfo, PeopleAdminSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Update the navigation property people in admin
/// </summary>
/// <param name="body">The request body</param>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<PeopleAdminSettings?> PatchAsync(PeopleAdminSettings body, Action<PeopleRequestBuilderPatchRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#nullable restore
#else
public async Task<PeopleAdminSettings> PatchAsync(PeopleAdminSettings body, Action<PeopleRequestBuilderPatchRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync<PeopleAdminSettings>(requestInfo, PeopleAdminSettings.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get people from admin
/// </summary>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<PeopleRequestBuilderGetRequestConfiguration>? requestConfiguration = default) {
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<PeopleRequestBuilderGetRequestConfiguration> requestConfiguration = default) {
#endif
var requestInfo = new RequestInformation {
HttpMethod = Method.GET,
UrlTemplate = UrlTemplate,
PathParameters = PathParameters,
};
requestInfo.Headers.Add("Accept", "application/json");
if (requestConfiguration != null) {
var requestConfig = new PeopleRequestBuilderGetRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddQueryParameters(requestConfig.QueryParameters);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Update the navigation property people in admin
/// </summary>
/// <param name="body">The request body</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPatchRequestInformation(PeopleAdminSettings body, Action<PeopleRequestBuilderPatchRequestConfiguration>? requestConfiguration = default) {
#nullable restore
#else
public RequestInformation ToPatchRequestInformation(PeopleAdminSettings body, Action<PeopleRequestBuilderPatchRequestConfiguration> requestConfiguration = default) {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation {
HttpMethod = Method.PATCH,
UrlTemplate = UrlTemplate,
PathParameters = PathParameters,
};
requestInfo.Headers.Add("Accept", "application/json");
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
if (requestConfiguration != null) {
var requestConfig = new PeopleRequestBuilderPatchRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public PeopleRequestBuilder WithUrl(string rawUrl) {
return new PeopleRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get people from admin
/// </summary>
public class PeopleRequestBuilderGetQueryParameters {
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24expand")]
public string[]? Expand { get; set; }
#nullable restore
#else
[QueryParameter("%24expand")]
public string[] Expand { get; set; }
#endif
/// <summary>Select properties to be returned</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24select")]
public string[]? Select { get; set; }
#nullable restore
#else
[QueryParameter("%24select")]
public string[] Select { get; set; }
#endif
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class PeopleRequestBuilderGetRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>Request query parameters</summary>
public PeopleRequestBuilderGetQueryParameters QueryParameters { get; set; } = new PeopleRequestBuilderGetQueryParameters();
/// <summary>
/// Instantiates a new peopleRequestBuilderGetRequestConfiguration and sets the default values.
/// </summary>
public PeopleRequestBuilderGetRequestConfiguration() {
Options = new List<IRequestOption>();
Headers = new RequestHeaders();
}
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class PeopleRequestBuilderPatchRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>
/// Instantiates a new peopleRequestBuilderPatchRequestConfiguration and sets the default values.
/// </summary>
public PeopleRequestBuilderPatchRequestConfiguration() {
Options = new List<IRequestOption>();
Headers = new RequestHeaders();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// <auto-generated/>
using Microsoft.Graph.Models.ODataErrors;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace Microsoft.Graph.Admin.People.ProfileCardProperties.Count {
/// <summary>
/// Provides operations to count the resources in the collection.
/// </summary>
public class CountRequestBuilder : BaseRequestBuilder {
/// <summary>
/// Instantiates a new CountRequestBuilder and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/people/profileCardProperties/$count{?%24search,%24filter}", pathParameters) {
}
/// <summary>
/// Instantiates a new CountRequestBuilder and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/admin/people/profileCardProperties/$count{?%24search,%24filter}", rawUrl) {
}
/// <summary>
/// Get the number of the resource
/// </summary>
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<int?> GetAsync(Action<CountRequestBuilderGetRequestConfiguration>? requestConfiguration = default, CancellationToken cancellationToken = default) {
#nullable restore
#else
public async Task<int?> GetAsync(Action<CountRequestBuilderGetRequestConfiguration> requestConfiguration = default, CancellationToken cancellationToken = default) {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>> {
{"4XX", ODataError.CreateFromDiscriminatorValue},
{"5XX", ODataError.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendPrimitiveAsync<int?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the number of the resource
/// </summary>
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<CountRequestBuilderGetRequestConfiguration>? requestConfiguration = default) {
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<CountRequestBuilderGetRequestConfiguration> requestConfiguration = default) {
#endif
var requestInfo = new RequestInformation {
HttpMethod = Method.GET,
UrlTemplate = UrlTemplate,
PathParameters = PathParameters,
};
requestInfo.Headers.Add("Accept", "text/plain");
if (requestConfiguration != null) {
var requestConfig = new CountRequestBuilderGetRequestConfiguration();
requestConfiguration.Invoke(requestConfig);
requestInfo.AddQueryParameters(requestConfig.QueryParameters);
requestInfo.AddRequestOptions(requestConfig.Options);
requestInfo.AddHeaders(requestConfig.Headers);
}
return requestInfo;
}
/// <summary>
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public CountRequestBuilder WithUrl(string rawUrl) {
return new CountRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Get the number of the resource
/// </summary>
public class CountRequestBuilderGetQueryParameters {
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24filter")]
public string? Filter { get; set; }
#nullable restore
#else
[QueryParameter("%24filter")]
public string Filter { get; set; }
#endif
/// <summary>Search items by search phrases</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("%24search")]
public string? Search { get; set; }
#nullable restore
#else
[QueryParameter("%24search")]
public string Search { get; set; }
#endif
}
/// <summary>
/// Configuration for the request such as headers, query parameters, and middleware options.
/// </summary>
public class CountRequestBuilderGetRequestConfiguration {
/// <summary>Request headers</summary>
public RequestHeaders Headers { get; set; }
/// <summary>Request options</summary>
public IList<IRequestOption> Options { get; set; }
/// <summary>Request query parameters</summary>
public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters();
/// <summary>
/// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values.
/// </summary>
public CountRequestBuilderGetRequestConfiguration() {
Options = new List<IRequestOption>();
Headers = new RequestHeaders();
}
}
}
}
Loading

0 comments on commit a9f6568

Please sign in to comment.