diff --git a/.github/workflows/validatePullRequest.yml b/.github/workflows/validatePullRequest.yml index 7abd7404872..67570d8622e 100644 --- a/.github/workflows/validatePullRequest.yml +++ b/.github/workflows/validatePullRequest.yml @@ -13,7 +13,7 @@ jobs: env: solutionName: Microsoft.Graph.sln steps: - - uses: actions/checkout@v3.3.0 + - uses: actions/checkout@v3.4.0 - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 97c4363350e..75cda74c30c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ and this project does adheres to [Semantic Versioning](https://semver.org/spec/v ## [Unreleased] +## [5.3.0] - 2023-03-21 + +### Added + +- Allows checking for status codes without parsing request bodies in batch requests (https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/pull/626) +- Updates kiota abstraction library dependencies to fix serialization errors. +- Metadata fixes for missing expand clauses for messages,calendar and mailfolder endpoints +- Latest metadata updates from 21st March 2023 + ## [5.2.0] - 2023-03-14 ### Added diff --git a/docs/errors.md b/docs/errors.md index 7f7e4789065..48e84678967 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -1,22 +1,44 @@ Handling errors in the Microsoft Graph .NET Client Library ===== -Errors in the Microsoft Graph .NET Client Library behave like errors returned from the Microsoft Graph service. You can read more about them [here](https://graph.microsoft.io/en-us/docs/overview/errors). +Errors in the Microsoft Graph .NET Client Library behave like errors returned from the Microsoft Graph service. You can read more about them [here](https://learn.microsoft.com/en-us/graph/errors). -Anytime you make a request against the service there is the potential for an error. In the case of an error, the request will throw a `ServiceException` object with an inner `Error` object that contains the service error details. +Anytime you make a request against the service there is the potential for an error. In the case of an error, the request will throw a `ODataError` exception that contains the service error details and can be handled as below. -## Checking the error +```cs +try +{ + await graphServiceClient.Me.PatchAsync(user); +} +catch (ODataError odataError) +{ + Console.WriteLine(odataError.Error?.Code); + Console.WriteLine(odataError.Error?.Message); + throw; +} +``` + + +## Checking the error status code -There are a few different types of errors that can occur during a network call. These error codes are defined in [GraphErrorCode.cs](../src/Microsoft.Graph/Enums/GraphErrorCode.cs). +You can check the status code that caused the error as below. + +```csharp +catch (ODataError odataError) when (odataError.ResponseStatusCode.Equals(HttpStatusCode.NotFound)) +{ + // Handle 404 status code +} +``` + +## Checking the error -### Checking the error code -You can easily check if an error has a specific code by calling `IsMatch` on the error code value. `IsMatch` is not case sensitive: +There are a few different types of errors that can occur during a network call. These most common error codes are defined in [GraphErrorCode.cs](../src/Microsoft.Graph/Enums/GraphErrorCode.cs). These can be checked by matching with the error code value as below. ```csharp -if (exception.IsMatch(GraphErrorCode.AccessDenied.ToString()) +catch (ODataError odataError) when (odataError.Error.Code.Equals(GraphErrorCode.AccessDenied.ToString())) { // Handle access denied error } ``` -Each error object has a `Message` property as well as code. This message is for debugging purposes and is not be meant to be displayed to the user. Common error codes are defined in [GraphErrorCode.cs](../src/Microsoft.Graph/Enums/GraphErrorCode.cs). \ No newline at end of file +Each error object has a `Message` property as well as code. This message is for debugging purposes and is not be meant to be displayed to the user. Common error codes are defined in [GraphErrorCode.cs](../src/Microsoft.Graph/Enums/GraphErrorCode.cs). diff --git a/docs/upgrade-to-v4.md b/docs/upgrade-to-v4.md index 3d4e1b272a8..7a280a1e56b 100644 --- a/docs/upgrade-to-v4.md +++ b/docs/upgrade-to-v4.md @@ -126,6 +126,63 @@ var device = await graphClient.DeviceManagement.ManagedDevices["1"].Request().Ge Assert.Equal("1",device.Id); ``` +### Collection responses do not have @odata.nextLink in the AdditionalData + +Response for collection types are now deserialized into the NextLink property in the collection response object(example [here](https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/23e9386538993ebe08ba88c084831b6163304e27/src/Microsoft.Graph/Generated/requests/AccessPackageAssignmentFilterByCurrentUserCollectionResponse.cs#L31)) and are not available in the additionalData bag. The property is then used to automatically initialize the nextPage request for the collection page and can be accessed as below. + +```cs +var users = await graphServiceClient.Users.Request().GetAsync(); +var nextLink = users.NextPageRequest.GetHttpRequestMessage().RequestUri.OriginalString; +``` + +#### Note +It is recommended to use the PageIterator when paging through collections as this allows for advance functionality such as configuring pausing, managing state and access to the DeltaLink and NextLink if needed. An example of using the PageIterator with delta is shown below. + +```cs + int count = 0; + int pauseAfter = 25; + + var messages = await graphClient.Me.Messages + .Request() + .Select(e => new { + e.Sender, + e.Subject + }) + .Top(10) + .GetAsync(); + + var pageIterator = PageIterator + .CreatePageIterator( + graphClient, + messages, + (m) => + { + Console.WriteLine(m.Subject); + count++; + // If we've iterated over the limit, + // stop the iteration by returning false + return count < pauseAfter; + } + ); + + await pageIterator.IterateAsync(); + + while (pageIterator.State != PagingState.Complete) + { + if (pageIterator.State == PagingState.Delta) + { + string deltaLink = pageIterator.Deltalink; + Console.WriteLine($"Paged through results and found deltaLink : {deltaLink}"); + } + + Console.WriteLine("Iteration paused for 5 seconds..."); + await Task.Delay(5000); + // Reset count + count = 0; + await pageIterator.ResumeAsync(); + } +``` + ## New capabilities ### Azure Identity diff --git a/src/Microsoft.Graph/Enums/GraphErrorCode.cs b/src/Microsoft.Graph/Enums/GraphErrorCode.cs index 92dfe964c4c..755da2b1c78 100644 --- a/src/Microsoft.Graph/Enums/GraphErrorCode.cs +++ b/src/Microsoft.Graph/Enums/GraphErrorCode.cs @@ -80,6 +80,8 @@ public enum GraphErrorCode NameAlreadyExists, /// The action is not allowed by the system. NotAllowed, + /// The requested item is not not found. + NotFound, /// The request is not supported by the system. NotSupported, /// Parameter Exceeds Maximum Length. diff --git a/src/Microsoft.Graph/Extensions/PlannerAssignment.cs b/src/Microsoft.Graph/Extensions/PlannerAssignment.cs new file mode 100644 index 00000000000..9e9acc28176 --- /dev/null +++ b/src/Microsoft.Graph/Extensions/PlannerAssignment.cs @@ -0,0 +1,85 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +// ------------------------------------------------------------------------------ + +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System; +using System.Collections.Generic; + +namespace Microsoft.Graph.Models; + +public class PlannerAssignment: IAdditionalDataHolder, IBackedModel, IParsable +{ + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OrderHint { + get { return BackingStore?.Get("orderHint"); } + set { BackingStore?.Set("orderHint", value); } + } +#nullable restore +#else + public string OrderHint { + get { return BackingStore?.Get("orderHint"); } + set { BackingStore?.Set("orderHint", value); } + } +#endif + /// + /// Instantiates a new auditActivityInitiator and sets the default values. + /// + public PlannerAssignment() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + OdataType = "#microsoft.graph.plannerAssignment"; + OrderHint = "!"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static PlannerAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PlannerAssignment(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"orderHint", n => { OrderHint = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("orderHint", OrderHint); + writer.WriteAdditionalData(AdditionalData); + } +} diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 09ee8ba4ce3..70e3d04f403 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs index fbbe2d0cc6b..0058385cf63 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index bc7d5a44363..2376ffa7d1a 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -47,8 +47,8 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. - /// Find more info here + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -69,7 +69,7 @@ public async Task PostAsync(InvitePostRequestBody b return await RequestAdapter.SendAsync(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..da7485fd971 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..2bee08794bf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Contacts.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 90c593a64c6..4ab3069d575 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Contacts.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Contacts.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Contacts.Item.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.orgContact entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..26f91610758 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/MemberOfRequestBuilder.cs index d6ff3592ca7..7b5d37611ab 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Contacts.Item.MemberOf.Count; +using Microsoft.Graph.Contacts.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Contacts.Item.MemberOf.GraphGroup; using Microsoft.Graph.Contacts.Item.MemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..36d35fc7da5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..f454ec6b075 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 56331dcc7ab..917e1b65ec4 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.orgContact entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..8a45ac14069 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/contacts/{orgContact%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 286079d7d38..87e9e0d7489 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Contacts.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b70c031f7b4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..a830ced5f62 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Devices.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 8d099eb669d..878e330faf1 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Devices.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Devices.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Devices.Item.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.device entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..ce6c2da93f6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/MemberOfRequestBuilder.cs index 4d205a496e7..1d3d622d5ed 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Devices.Item.MemberOf.Count; +using Microsoft.Graph.Devices.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Devices.Item.MemberOf.GraphGroup; using Microsoft.Graph.Devices.Item.MemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e8e7d9b2fd3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..1efe100a202 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 71286949fa8..ffb38c8ca23 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Devices.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Devices.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Devices.Item.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.device entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..137d2617656 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Devices.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/devices/{device%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 3df4e71814c..ff6d5a31d81 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Devices.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Devices.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Devices.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs index 2aaf860694d..f02af7d9b8b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs @@ -70,7 +70,7 @@ public NamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of nameditem objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs index 83613ec74a0..7f4fd72ed46 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs @@ -66,7 +66,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of table objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs index b8bdd7ca23d..9fa6fb2145d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs @@ -67,7 +67,7 @@ public ChartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of chart objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs index 8a5495f11e4..9aab7cf5141 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs @@ -60,8 +60,8 @@ public PointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Retrieve a list of chartpoints objects. - /// Find more info here + /// Retrieve a list of chartpoint objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -110,7 +110,7 @@ public async Task PostAsync(WorkbookChartPoint body, Action< return await RequestAdapter.SendAsync(requestInfo, WorkbookChartPoint.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of chartpoints objects. + /// Retrieve a list of chartpoint objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -164,7 +164,7 @@ public RequestInformation ToPostRequestInformation(WorkbookChartPoint body, Acti return requestInfo; } /// - /// Retrieve a list of chartpoints objects. + /// Retrieve a list of chartpoint objects. /// public class PointsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs index 1635ab4491c..8d0f0e535ed 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs @@ -65,7 +65,7 @@ public WorksheetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of worksheet objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs index ee13628ae72..6d7d1f6ef52 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs index 2e5f4e794ca..1a1a0c6723d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/groups/{group%2Did}/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs index 5491728eaf0..f0e09ef81e3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs index 2c5b251b7a2..3af5576760b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 3985d188370..f4f2c0be81e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7095dbd8fdb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..c2609718265 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Groups.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 048ea24e735..eaf00a2e8bf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Groups.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Groups.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Groups.Item.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.group entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..c0c3313dd7c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/MemberOfRequestBuilder.cs index cbd74d115a1..05323b4f7b0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Groups.Item.MemberOf.Count; +using Microsoft.Graph.Groups.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Groups.Item.MemberOf.GraphGroup; using Microsoft.Graph.Groups.Item.MemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs index dd5c3732613..b79760f0256 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 139362326d6..e2a1bf6244b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs index d7ff1202c41..d380635a674 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs index 1fd9338c8ec..b2fb06ed4dc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index e1dde8e2d21..65f50367538 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs index d2bb77f0104..5084116ce07 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs index fb8cd8acbec..3ea3caae2ea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs index 8ddd95da100..f6cdad5177f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 9c9b7398ad1..941a7caf891 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -46,8 +46,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..92d4f9474a1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..4c7ce4aceac --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 5b97870a6a0..234151cc73f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Groups.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Groups.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Groups.Item.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.group entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..727d229dc92 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Groups.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/groups/{group%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index bb897eeb453..47646bb62ba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Groups.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Groups.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Groups.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs index 96664748ce8..8ad4f63476e 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs @@ -59,8 +59,8 @@ public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Get the riskyUserHistoryItems from the history navigation property. - /// Find more info here + /// Read the properties and relationships of a riskyUserHistoryItem object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -100,7 +100,7 @@ public async Task PostAsync(RiskyUserHistoryItem body, Act return await RequestAdapter.SendAsync(requestInfo, RiskyUserHistoryItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get the riskyUserHistoryItems from the history navigation property. + /// Read the properties and relationships of a riskyUserHistoryItem object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(RiskyUserHistoryItem body, Ac return requestInfo; } /// - /// Get the riskyUserHistoryItems from the history navigation property. + /// Read the properties and relationships of a riskyUserHistoryItem object. /// public class HistoryRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs index 968bf9320af..1f20851ce9e 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs @@ -47,7 +47,8 @@ public ResetPasswordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter RequestAdapter = requestAdapter; } /// - /// Invoke action resetPassword + /// Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a **Location** header with a link where the caller can periodically check for the status of the reset operation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +69,7 @@ public async Task PostAsync(ResetPasswordPostRequestBody return await RequestAdapter.SendAsync(requestInfo, PasswordResetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Invoke action resetPassword + /// Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a **Location** header with a link where the caller can periodically check for the status of the reset operation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs index c1606737c31..e71dfe3315c 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs index 6ec30b00fd4..1c04e0d2e0c 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs index f3a30294f34..e37eb4f969a 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index 63a6235eeb9..07d486bc94f 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/CalendarView/CalendarViewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarView/CalendarViewRequestBuilder.cs index e620e659083..ea80cf17159 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarView/CalendarViewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarView/CalendarViewRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public CalendarViewRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public CalendarViewRequestBuilder(Dictionary pathParameters, IRe public CalendarViewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -123,6 +123,16 @@ public class CalendarViewRequestBuilderGetQueryParameters { #nullable restore #else public string EndDateTime { get; set; } +#endif + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Me/CalendarView/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarView/Item/EventItemRequestBuilder.cs index 6c68def83d3..f8774b03a23 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarView/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarView/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"; + UrlTemplate = "{+baseurl}/me/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -167,6 +167,16 @@ public class EventItemRequestBuilderGetQueryParameters { #nullable restore #else public string EndDateTime { get; set; } +#endif + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs index 9539145737a..3eb6ece1363 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index bf74f665d48..a5eeb447095 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 3749bf16077..14829de7beb 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs index 086007b9250..ddf21b1a2b7 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs index 884d3365078..12eb55d994e 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -166,6 +166,16 @@ public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs index 9d7c93301a2..ae793b8434d 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The user's events. Default is to show Events under the Default Calendar. Read-only. Nullable. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 5ce524b8138..1dd3a12e76c 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 023d457c14d..33bd1eb2a3f 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 555bfc073bf..45d66bfb836 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index d84fc4d995f..15084e24200 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 545968fbf49..518219989c1 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index b298e56cd8e..a0db7bebd64 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 5ffa021ad99..da47c6d6297 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs index eb58d3030d4..8decd05995e 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -62,7 +62,7 @@ public class MailFolderItemRequestBuilder { public MailFolderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -75,7 +75,7 @@ public MailFolderItemRequestBuilder(Dictionary pathParameters, I public MailFolderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/mailFolders/{mailFolder%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -238,6 +238,16 @@ public MailFolderItemRequestBuilderDeleteRequestConfiguration() { /// The user's mail folders. Read-only. Nullable. /// public class MailFolderItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 1bc2e2c502c..ea630305e0b 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs index dd417d2a4bd..006dec13078 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs @@ -44,7 +44,7 @@ public MailFolderItemRequestBuilder this[string position] { get { public MailFoldersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public MailFoldersRequestBuilder(Dictionary pathParameters, IReq public MailFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -166,6 +166,16 @@ public class MailFoldersRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index 6523f0d8121..f9089a3d684 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -389,8 +389,8 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - /// Find more info here + /// Retrieve the properties and relationships of user object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -441,7 +441,7 @@ public ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder ReminderViewWi return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -495,7 +495,7 @@ public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.User return requestInfo; } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// public class MeRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9678c082033 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..a33796fab54 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Me.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index ea6d874045c..dd8fa36a7e9 100644 --- a/src/Microsoft.Graph/Generated/Me/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Me.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Me.MemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Me.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.user entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Me/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..f424b5266b6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MemberOf/MemberOfRequestBuilder.cs index 1bedb6c1700..4d0b5a49bb6 100644 --- a/src/Microsoft.Graph/Generated/Me/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Me.MemberOf.Count; +using Microsoft.Graph.Me.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Me.MemberOf.GraphGroup; using Microsoft.Graph.Me.MemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index f073f563ca0..a6d9310a956 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs index 7686255c2ad..725f4efc84f 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs @@ -97,7 +97,7 @@ public class MessageItemRequestBuilder { public MessageItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/messages/{message%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/messages/{message%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -110,7 +110,7 @@ public MessageItemRequestBuilder(Dictionary pathParameters, IReq public MessageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/messages/{message%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/me/messages/{message%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -273,6 +273,16 @@ public MessageItemRequestBuilderDeleteRequestConfiguration() { /// The messages in a mailbox or folder. Read-only. Nullable. /// public class MessageItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs index 1199a91d8e9..8f6af960e30 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs @@ -47,7 +47,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Get media content for the navigation property messages from me - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs index f6f3747b707..79d2e26412d 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs @@ -44,7 +44,7 @@ public MessageItemRequestBuilder this[string position] { get { public MessagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,15 +57,15 @@ public MessagesRequestBuilder(Dictionary pathParameters, IReques public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/me/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/me/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - /// Find more info here + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.Messag return requestInfo; } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: /// public class MessagesRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..4112c14717d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..5153330b957 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Me.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 6a73fdf6c72..28d464189e2 100644 --- a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Me.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Me.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Me.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..dac7a2a0fd6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Me.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/me/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 9bb0cb4788e..efaf34c0a80 100644 --- a/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Me.TransitiveMemberOf.Count; +using Microsoft.Graph.Me.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Me.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Me.TransitiveMemberOf.Item; using Microsoft.Graph.Models; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs index 3a46e032d58..d187c40a3d3 100644 --- a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs @@ -90,7 +90,7 @@ public string Visibility { } #endif /// - /// Instantiates a new administrativeUnit and sets the default values. + /// Instantiates a new AdministrativeUnit and sets the default values. /// public AdministrativeUnit() : base() { OdataType = "#microsoft.graph.administrativeUnit"; diff --git a/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs index 8b48465fbb4..818693970a3 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs @@ -1,10 +1,13 @@ using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; using System; using System.Collections.Generic; using System.IO; using System.Linq; namespace Microsoft.Graph.Models { - public class AgreementCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + public class AgreementCollectionResponse : BaseCollectionPaginationCountResponse, IBackedModel, IParsable { + /// Stores model information. + public IBackingStore BackingStore { get; private set; } /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,6 +22,12 @@ public List Value { set { BackingStore?.Set("value", value); } } #endif + /// + /// Instantiates a new AgreementCollectionResponse and sets the default values. + /// + public AgreementCollectionResponse() : base() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + } /// /// Creates a new instance of the appropriate class based on discriminator value /// diff --git a/src/Microsoft.Graph/Generated/Models/Application.cs b/src/Microsoft.Graph/Generated/Models/Application.cs index 4b3e916fad4..7f1487821dd 100644 --- a/src/Microsoft.Graph/Generated/Models/Application.cs +++ b/src/Microsoft.Graph/Generated/Models/Application.cs @@ -563,7 +563,7 @@ public WebApplication Web { } #endif /// - /// Instantiates a new Application and sets the default values. + /// Instantiates a new application and sets the default values. /// public Application() : base() { OdataType = "#microsoft.graph.application"; diff --git a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs index beb33dc57a8..e1b66f49384 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs @@ -4,6 +4,9 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Models { + /// + /// A class containing the properties for Audit Event. + /// public class AuditEvent : Entity, IParsable { /// Friendly name of the activity. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs index 160b153a8b3..e2967c4fc4b 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs @@ -25,6 +25,11 @@ public Microsoft.Graph.Models.AllowInvitesFrom? AllowInvitesFrom { get { return BackingStore?.Get("allowInvitesFrom"); } set { BackingStore?.Set("allowInvitesFrom", value); } } + /// The allowUserConsentForRiskyApps property + public bool? AllowUserConsentForRiskyApps { + get { return BackingStore?.Get("allowUserConsentForRiskyApps"); } + set { BackingStore?.Set("allowUserConsentForRiskyApps", value); } + } /// To disable the use of MSOL PowerShell set this property to true. This will also disable user-based access to the legacy service endpoint used by MSOL PowerShell. This does not affect Azure AD Connect or Microsoft Graph. public bool? BlockMsolPowerShell { get { return BackingStore?.Get("blockMsolPowerShell"); } @@ -72,6 +77,7 @@ public AuthorizationPolicy() : base() { {"allowedToUseSSPR", n => { AllowedToUseSSPR = n.GetBoolValue(); } }, {"allowEmailVerifiedUsersToJoinOrganization", n => { AllowEmailVerifiedUsersToJoinOrganization = n.GetBoolValue(); } }, {"allowInvitesFrom", n => { AllowInvitesFrom = n.GetEnumValue(); } }, + {"allowUserConsentForRiskyApps", n => { AllowUserConsentForRiskyApps = n.GetBoolValue(); } }, {"blockMsolPowerShell", n => { BlockMsolPowerShell = n.GetBoolValue(); } }, {"defaultUserRolePermissions", n => { DefaultUserRolePermissions = n.GetObjectValue(Microsoft.Graph.Models.DefaultUserRolePermissions.CreateFromDiscriminatorValue); } }, {"guestUserRoleId", n => { GuestUserRoleId = n.GetGuidValue(); } }, @@ -88,6 +94,7 @@ public AuthorizationPolicy() : base() { writer.WriteBoolValue("allowedToUseSSPR", AllowedToUseSSPR); writer.WriteBoolValue("allowEmailVerifiedUsersToJoinOrganization", AllowEmailVerifiedUsersToJoinOrganization); writer.WriteEnumValue("allowInvitesFrom", AllowInvitesFrom); + writer.WriteBoolValue("allowUserConsentForRiskyApps", AllowUserConsentForRiskyApps); writer.WriteBoolValue("blockMsolPowerShell", BlockMsolPowerShell); writer.WriteObjectValue("defaultUserRolePermissions", DefaultUserRolePermissions); writer.WriteGuidValue("guestUserRoleId", GuestUserRoleId); diff --git a/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs b/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs index c8f73b203a6..eeb66d31535 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs @@ -5,7 +5,7 @@ using System.Linq; namespace Microsoft.Graph.Models { public class DeletedTeam : Entity, IParsable { - /// The channels property + /// The channels that are either shared with this deleted team or created in this deleted team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Channels { diff --git a/src/Microsoft.Graph/Generated/Models/Initiator.cs b/src/Microsoft.Graph/Generated/Models/Initiator.cs index 437a8484e6e..7dd2789fc63 100644 --- a/src/Microsoft.Graph/Generated/Models/Initiator.cs +++ b/src/Microsoft.Graph/Generated/Models/Initiator.cs @@ -11,7 +11,7 @@ public Microsoft.Graph.Models.InitiatorType? InitiatorType { set { BackingStore?.Set("initiatorType", value); } } /// - /// Instantiates a new Initiator and sets the default values. + /// Instantiates a new initiator and sets the default values. /// public Initiator() : base() { OdataType = "#microsoft.graph.initiator"; diff --git a/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs b/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs index 547f4b38243..3df0448734c 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs @@ -34,7 +34,7 @@ public string IdentityType { } #endif /// - /// Instantiates a new ProvisionedIdentity and sets the default values. + /// Instantiates a new provisionedIdentity and sets the default values. /// public ProvisionedIdentity() : base() { OdataType = "#microsoft.graph.provisionedIdentity"; diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs index 71d88632d1d..0e5916bd7ed 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs @@ -6,7 +6,7 @@ namespace Microsoft.Graph.Models { public class ProvisioningServicePrincipal : Identity, IParsable { /// - /// Instantiates a new ProvisioningServicePrincipal and sets the default values. + /// Instantiates a new provisioningServicePrincipal and sets the default values. /// public ProvisioningServicePrincipal() : base() { OdataType = "#microsoft.graph.provisioningServicePrincipal"; diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs index 3830fc72c99..72b6652cac8 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs @@ -20,7 +20,7 @@ public DetailsInfo Details { } #endif /// - /// Instantiates a new ProvisioningSystem and sets the default values. + /// Instantiates a new provisioningSystem and sets the default values. /// public ProvisioningSystem() : base() { OdataType = "#microsoft.graph.provisioningSystem"; diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index 33815b1c641..3c54757b0e2 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs @@ -4,6 +4,9 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Models { + /// + /// The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role. + /// public class RoleDefinition : Entity, IParsable { /// Description of the Role definition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs index 91c54730f81..a6a7a5409f1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs @@ -34,7 +34,7 @@ public EdiscoveryIndexOperation LastIndexOperation { } #endif /// - /// Instantiates a new EdiscoveryNoncustodialDataSource and sets the default values. + /// Instantiates a new ediscoveryNoncustodialDataSource and sets the default values. /// public EdiscoveryNoncustodialDataSource() : base() { OdataType = "#microsoft.graph.security.ediscoveryNoncustodialDataSource"; diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs index 605389b6ea5..14e753c515f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs @@ -6,7 +6,7 @@ namespace Microsoft.Graph.Models.Security { public class EdiscoveryReviewSetQuery : Search, IParsable { /// - /// Instantiates a new ediscoveryReviewSetQuery and sets the default values. + /// Instantiates a new EdiscoveryReviewSetQuery and sets the default values. /// public EdiscoveryReviewSetQuery() : base() { OdataType = "#microsoft.graph.security.ediscoveryReviewSetQuery"; diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs index 4caafe54a6c..6c47decaf37 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs @@ -656,7 +656,7 @@ public Microsoft.Graph.Models.VerifiedPublisher VerifiedPublisher { } #endif /// - /// Instantiates a new ServicePrincipal and sets the default values. + /// Instantiates a new servicePrincipal and sets the default values. /// public ServicePrincipal() : base() { OdataType = "#microsoft.graph.servicePrincipal"; diff --git a/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs b/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs index f64a8926020..2002e189158 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs @@ -20,7 +20,7 @@ public string LoginName { } #endif /// - /// Instantiates a new sharePointIdentity and sets the default values. + /// Instantiates a new SharePointIdentity and sets the default values. /// public SharePointIdentity() : base() { OdataType = "#microsoft.graph.sharePointIdentity"; diff --git a/src/Microsoft.Graph/Generated/Models/Teamwork.cs b/src/Microsoft.Graph/Generated/Models/Teamwork.cs index bb9f1c121fe..62c30b7d0d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Teamwork.cs +++ b/src/Microsoft.Graph/Generated/Models/Teamwork.cs @@ -5,7 +5,7 @@ using System.Linq; namespace Microsoft.Graph.Models { public class Teamwork : Entity, IParsable { - /// The deletedTeams property + /// The deleted team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? DeletedTeams { diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs index f181e9c2d72..508f2bb21ae 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs @@ -11,7 +11,7 @@ public TeamworkConversationIdentityType? ConversationIdentityType { set { BackingStore?.Set("conversationIdentityType", value); } } /// - /// Instantiates a new teamworkConversationIdentity and sets the default values. + /// Instantiates a new TeamworkConversationIdentity and sets the default values. /// public TeamworkConversationIdentity() : base() { OdataType = "#microsoft.graph.teamworkConversationIdentity"; diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs index e258a18dead..ec1ec24cca3 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs @@ -5,7 +5,7 @@ using System.Linq; namespace Microsoft.Graph.Models { public class TeamworkTag : Entity, IParsable { - /// The description of the tag as it will appear to the user in Microsoft Teams. + /// The description of the tag as it will appear to the user in Microsoft Teams. A teamworkTag can't have more than 200 teamworkTagMembers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description { diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs index b28d16d4664..43f3b9b9a7a 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Models { - /// - /// A termsAndConditions entity represents the metadata and contents of a given Terms and Conditions (T&C) policy. T&C policies’ contents are presented to users upon their first attempt to enroll into Intune and subsequently upon edits where an administrator has required re-acceptance. They enable administrators to communicate the provisions to which a user must agree in order to have devices enrolled into Intune. - /// public class TermsAndConditions : Entity, IParsable { /// Administrator-supplied explanation of the terms and conditions, typically describing what it means to accept the terms and conditions set out in the T&C policy. This is shown to the user on prompts to accept the T&C policy. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..e24c70a4dc2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..ed667c6b224 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.ServicePrincipals.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index d37c9c215a9..88d8f2e0425 100644 --- a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.ServicePrincipals.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.ServicePrincipals.Item.MemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.ServicePrincipals.Item.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.servicePrincipal entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..660acdbf892 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/MemberOfRequestBuilder.cs index 20f5e101560..98f5476362c 100644 --- a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.ServicePrincipals.Item.MemberOf.Count; +using Microsoft.Graph.ServicePrincipals.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.ServicePrincipals.Item.MemberOf.GraphGroup; using Microsoft.Graph.ServicePrincipals.Item.MemberOf.Item; using Microsoft.Kiota.Abstractions; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9b772b8a9f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..01087bd4932 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index f458cafa315..4fb126141e2 100644 --- a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.servicePrincipal entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..ebc453b1cf6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index f1beea2fa15..1853b0767b9 100644 --- a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf.Item; using Microsoft.Kiota.Abstractions; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 273efdf90e4..a178e15e9a6 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 00a6a9a945b..94159cf8cda 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index d28a23dbcbb..3b7819d330f 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index 8a18b677932..7b81a82f0f1 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 4fb6da221bf..1fc62d08e06 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 1a72f915592..8a216e23d56 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/DeletedTeamsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/DeletedTeamsRequestBuilder.cs index c08e5fe7dc9..ec48ef6cbbf 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/DeletedTeamsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/DeletedTeamsRequestBuilder.cs @@ -64,7 +64,8 @@ public DeletedTeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Get deletedTeams from teamwork + /// Get a list of the deletedTeam objects and their properties. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -104,7 +105,7 @@ public async Task PostAsync(DeletedTeam body, Action(requestInfo, DeletedTeam.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get deletedTeams from teamwork + /// Get a list of the deletedTeam objects and their properties. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -158,7 +159,7 @@ public RequestInformation ToPostRequestInformation(DeletedTeam body, Action - /// Get deletedTeams from teamwork + /// Get a list of the deletedTeam objects and their properties. /// public class DeletedTeamsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/ChannelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/ChannelsRequestBuilder.cs index 6f9c9d423a8..b84deba74fa 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/ChannelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/ChannelsRequestBuilder.cs @@ -64,7 +64,7 @@ public ChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -104,7 +104,7 @@ public async Task PostAsync(Channel body, Action(requestInfo, Channel.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(Channel body, Action - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// public class ChannelsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/ChannelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/ChannelItemRequestBuilder.cs index b990885fa5c..0adb4ad8125 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/ChannelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/ChannelItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -175,7 +175,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -245,7 +245,7 @@ public ChannelItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get channels from teamwork + /// The channels that are either shared with this deleted team or created in this deleted team. /// public class ChannelItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 265a175567d..99d5a64114a 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 98901a5b889..781542a94ee 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 41d007b70a9..852650d9df2 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/DeletedTeamItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/DeletedTeamItemRequestBuilder.cs index fac08b68934..7ad535798c2 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/DeletedTeamItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/DeletedTeamItemRequestBuilder.cs @@ -71,7 +71,7 @@ public async Task DeleteAsync(Action - /// Get deletedTeams from teamwork + /// The deleted team. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get deletedTeams from teamwork + /// The deleted team. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -205,7 +205,7 @@ public DeletedTeamItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get deletedTeams from teamwork + /// The deleted team. /// public class DeletedTeamItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Users/Item/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs index 5e4b12cf1a8..80aec63b42c 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs @@ -47,7 +47,8 @@ public ResetPasswordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter RequestAdapter = requestAdapter; } /// - /// Invoke action resetPassword + /// Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a **Location** header with a link where the caller can periodically check for the status of the reset operation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +69,7 @@ public async Task PostAsync(ResetPasswordPostRequestBody return await RequestAdapter.SendAsync(requestInfo, PasswordResetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Invoke action resetPassword + /// Reset a user's password, represented by a password authentication method object. This can only be done by an administrator with appropriate permissions and cannot be performed on a user's own account. This flow writes the new password to Azure Active Directory and pushes it to on-premises Active Directory if configured using password writeback. The admin can either provide a new password or have the system generate one. The user is prompted to change their password on their next sign in. This reset is a long-running operation and will return a **Location** header with a link where the caller can periodically check for the status of the reset operation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/EventsRequestBuilder.cs index f3fdad4e768..ac842e31e80 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/Item/EventItemRequestBuilder.cs index 73d8dab8078..259932e2df4 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Calendar/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendar/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs index e024284c498..503ec6e4199 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index 029291e51d0..4063442a805 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarGroups/{calendarGroup%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/CalendarView/CalendarViewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/CalendarView/CalendarViewRequestBuilder.cs index 4346a48e146..24961b8dd3c 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/CalendarView/CalendarViewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/CalendarView/CalendarViewRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public CalendarViewRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public CalendarViewRequestBuilder(Dictionary pathParameters, IRe public CalendarViewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView{?startDateTime*,endDateTime*,%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -123,6 +123,16 @@ public class CalendarViewRequestBuilderGetQueryParameters { #nullable restore #else public string EndDateTime { get; set; } +#endif + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Users/Item/CalendarView/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/CalendarView/Item/EventItemRequestBuilder.cs index d9a8fd4a7a6..f03b2c20c29 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/CalendarView/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/CalendarView/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendarView/{event%2Did}{?startDateTime*,endDateTime*,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -167,6 +167,16 @@ public class EventItemRequestBuilderGetQueryParameters { #nullable restore #else public string EndDateTime { get; set; } +#endif + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/EventsRequestBuilder.cs index 04bc7e92eea..4c612788c29 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,14 +57,14 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -106,7 +106,7 @@ public async Task PostAsync(Event body, Action(requestInfo, Event.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Event body, Action - /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. + /// Retrieve a list of events in a calendar. The calendar can be one for a user, or the default calendar of a Microsoft 365 group. The list of events contains single instance meetings and series masters. To get expanded event instances, you can get the calendar view, or get the instances of an event. /// public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index 5f0af833ab7..d6fc5a20528 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/calendars/{calendar%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The events in the calendar. Navigation property. Read-only. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index c33fd5bada5..74602f36b52 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs index 8480d25d41c..7056be0ce1e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Events/EventsRequestBuilder.cs index f23c80d1af8..c3573c6788a 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Events/EventsRequestBuilder.cs @@ -44,7 +44,7 @@ public EventItemRequestBuilder this[string position] { get { public EventsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public EventsRequestBuilder(Dictionary pathParameters, IRequestA public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/events{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -166,6 +166,16 @@ public class EventsRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Events/Item/EventItemRequestBuilder.cs index c1f332ccf3a..96684ec8097 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Events/Item/EventItemRequestBuilder.cs @@ -92,7 +92,7 @@ public class EventItemRequestBuilder { public EventItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -105,7 +105,7 @@ public EventItemRequestBuilder(Dictionary pathParameters, IReque public EventItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/events/{event%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/events/{event%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -268,6 +268,16 @@ public EventItemRequestBuilderDeleteRequestConfiguration() { /// The user's events. Default is to show Events under the Default Calendar. Read-only. Nullable. /// public class EventItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs index 7e3a3486453..2668f599401 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index e9eef2e3446..fb65a2ea4fb 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 5e56d1947e3..fef891f1b2e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs index f9e6d09c412..7f5be2daee2 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ConversationMemberCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. - /// Find more info here + /// Add a conversationMember to a channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Add a conversationMember to a channel. This operation is allowed only for channels with a **membershipType** value of `private` or `shared`. + /// Add a conversationMember to a channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 03152464241..002ad7345e2 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Send a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new reply to a chatMessage in a specified channel. + /// Send a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index b3fc6044faf..d1f966a191e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index cc3bce3eb45..6fd4d1ef3e2 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs index a35aecb7657..637faf195df 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -62,7 +62,7 @@ public class MailFolderItemRequestBuilder { public MailFolderItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -75,7 +75,7 @@ public MailFolderItemRequestBuilder(Dictionary pathParameters, I public MailFolderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders/{mailFolder%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -238,6 +238,16 @@ public MailFolderItemRequestBuilderDeleteRequestConfiguration() { /// The user's mail folders. Read-only. Nullable. /// public class MailFolderItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 51dfc801703..2b9876e5a3b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/MailFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/MailFoldersRequestBuilder.cs index 26dff58c19a..ab3ada824e4 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/MailFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/MailFoldersRequestBuilder.cs @@ -44,7 +44,7 @@ public MailFolderItemRequestBuilder this[string position] { get { public MailFoldersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,7 +57,7 @@ public MailFoldersRequestBuilder(Dictionary pathParameters, IReq public MailFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/mailFolders{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -166,6 +166,16 @@ public class MailFoldersRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c88599cb329 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.MemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..8da4eed59f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Users.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.MemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 0ff79e2910b..393a535b3ab 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Users.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Users.Item.MemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Users.Item.MemberOf.Item { /// Provides operations to manage the memberOf property of the microsoft.graph.user entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..836a9ae5220 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.MemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs index b56fee1a9d0..3e46d3a0601 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Users.Item.MemberOf.Count; +using Microsoft.Graph.Users.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Users.Item.MemberOf.GraphGroup; using Microsoft.Graph.Users.Item.MemberOf.Item; using Microsoft.Kiota.Abstractions; @@ -20,6 +21,10 @@ public class MemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 7d8e521a6de..d214105188b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -64,8 +64,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Retrieve a list of attachment objects attached to a message. - /// Find more info here + /// Retrieve a list of attachment objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task PostAsync(Attachment body, Action(requestInfo, Attachment.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Attachment body, Action - /// Retrieve a list of attachment objects attached to a message. + /// Retrieve a list of attachment objects. /// public class AttachmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs index 9b268580e48..cfe3cc4d0a7 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -97,7 +97,7 @@ public class MessageItemRequestBuilder { public MessageItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/messages/{message%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/messages/{message%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -110,7 +110,7 @@ public MessageItemRequestBuilder(Dictionary pathParameters, IReq public MessageItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/messages/{message%2Did}{?%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/messages/{message%2Did}{?%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; @@ -273,6 +273,16 @@ public MessageItemRequestBuilderDeleteRequestConfiguration() { /// The messages in a mailbox or folder. Read-only. Nullable. /// public class MessageItemRequestBuilderGetQueryParameters { + /// Expand related entities +#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 /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs index 952a7862f7e..e4dd3788b7b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/Value/ContentRequestBuilder.cs @@ -47,7 +47,7 @@ public ContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Get media content for the navigation property messages from users - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs index b1d69bb8fa4..27860fd7092 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs @@ -44,7 +44,7 @@ public MessageItemRequestBuilder this[string position] { get { public MessagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(pathParameters); PathParameters = urlTplParams; RequestAdapter = requestAdapter; @@ -57,15 +57,15 @@ public MessagesRequestBuilder(Dictionary pathParameters, IReques public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); - UrlTemplate = "{+baseurl}/users/{user%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select}"; + UrlTemplate = "{+baseurl}/users/{user%2Did}/messages{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; var urlTplParams = new Dictionary(); if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); PathParameters = urlTplParams; RequestAdapter = requestAdapter; } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. - /// Find more info here + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -160,12 +160,22 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.Messag return requestInfo; } /// - /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + /// Get the messages in the signed-in user's mailbox (including the Deleted Items and Clutter folders). Depending on the page size and mailbox data, getting messages from a mailbox can incur multiple requests. The default page size is 10 messages. Use `$top` to customize the page size, within the range of 1 and 1000. To improve the operation response time, use `$select` to specify the exact properties you need; see example 1 below. Fine-tune the values for `$select` and `$top`, especially when you must use a larger page size, as returning a page with hundreds of messages each with a full response payload may trigger the gateway timeout (HTTP 504). To get the next page of messages, simply apply the entire URL returned in `@odata.nextLink` to the next get-messages request. This URL includes any query parameters you may have specified in the initial request. Do not try to extract the `$skip` value from the `@odata.nextLink` URL to manipulate responses. This API uses the `$skip` value to keep count of all the items it has gone through in the user's mailbox to return a page of message-type items. It's therefore possible that even in the initial response, the `$skip` value is larger than the page size. For more information, see Paging Microsoft Graph data in your app. Currently, this operation returns message bodies in only HTML format. There are two scenarios where an app can get messages in another user's mail folder: /// public class MessagesRequestBuilderGetQueryParameters { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#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 /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..008cf743f0f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/graph.administrativeUnit/$count{?%24search,%24filter}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#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 + /// Search items by search phrases +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..32969fb86cf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Users.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.TransitiveMemberOf.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AdministrativeUnitCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#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 + /// Filter items by property values +#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 + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#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 + /// Select properties to be returned +#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 + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index bedc437d702..802448b44e0 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Users.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Users.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Users.Item.TransitiveMemberOf.Item { /// Provides operations to manage the transitiveMemberOf property of the microsoft.graph.user entity. /// public class DirectoryObjectItemRequestBuilder { + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..c1a6fff27f6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Models; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +namespace Microsoft.Graph.Users.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit { + /// + /// Casts the previous resource to administrativeUnit. + /// + public class GraphAdministrativeUnitRequestBuilder { + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new GraphAdministrativeUnitRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public GraphAdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/graph.administrativeUnit{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.AdministrativeUnit.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action 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 GraphAdministrativeUnitRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit + /// + public class GraphAdministrativeUnitRequestBuilderGetQueryParameters { + /// Expand related entities +#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 + /// Select properties to be returned +#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 + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class GraphAdministrativeUnitRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public GraphAdministrativeUnitRequestBuilderGetQueryParameters QueryParameters { get; set; } = new GraphAdministrativeUnitRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new graphAdministrativeUnitRequestBuilderGetRequestConfiguration and sets the default values. + /// + public GraphAdministrativeUnitRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 8954a0aad9f..a22db01e48b 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Models; using Microsoft.Graph.Models.ODataErrors; using Microsoft.Graph.Users.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Users.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Users.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Users.Item.TransitiveMemberOf.Item; using Microsoft.Kiota.Abstractions; @@ -20,6 +21,10 @@ public class TransitiveMemberOfRequestBuilder { public CountRequestBuilder Count { get => new CountRequestBuilder(PathParameters, RequestAdapter); } + /// Casts the previous resource to administrativeUnit. + public GraphAdministrativeUnitRequestBuilder GraphAdministrativeUnit { get => + new GraphAdministrativeUnitRequestBuilder(PathParameters, RequestAdapter); + } /// Casts the previous resource to group. public GraphGroupRequestBuilder GraphGroup { get => new GraphGroupRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs index 70258d9c047..8533d7250db 100644 --- a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs @@ -79,8 +79,8 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Retrieve a list of user objects. - /// Find more info here + /// Retrieve the properties and relationships of user object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -121,7 +121,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve a list of user objects. + /// Retrieve the properties and relationships of user object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -175,7 +175,7 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.User b return requestInfo; } /// - /// Retrieve a list of user objects. + /// Retrieve the properties and relationships of user object. /// public class UsersRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/kiota-lock.json b/src/Microsoft.Graph/Generated/kiota-lock.json index d6fa33d236b..eb4c7e2bb4a 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "B08E4D90552B759FCD56CDA61A9BF680612F028186B108A7CCB33359BFA23D6C018F86231CF9832CF7125203CC2AC2ADED7A7C5A6D68003FEE6FC6CDFDF44382", + "descriptionHash": "E11F6A43E19F94CA2E02004B8B540678D1F1C41CEB0177ABC53E9A0043E8C8FF8680A3E21360D807C7B6AC5C7A71FACB9BB2D08BF97DB836D11E1C8C9C496274", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.0.1", diff --git a/src/Microsoft.Graph/Microsoft.Graph.csproj b/src/Microsoft.Graph/Microsoft.Graph.csproj index adbf299004c..a469287047d 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.csproj @@ -21,13 +21,13 @@ false 35MSSharedLib1024.snk true - 5.2.0 + 5.3.0 -- Latest metadata updates from 14th March 2023 +https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/CHANGELOG.md true true diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs index 57e4705c286..40a6ae8748e 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs @@ -1,4 +1,4 @@ -// ------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ @@ -9,6 +9,7 @@ namespace Microsoft.Graph.DotnetCore.Test.Models using Microsoft.Graph.Models; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Serialization.Json; + using System.Collections.Generic; using System.IO; using System.Text; @@ -159,7 +160,7 @@ public void SerializeAndDeserializeKnownEnumValue() Assert.Null(itemBody.AdditionalData); } - [Fact(Skip = "TODO fix pending odata.type bug")] + [Fact] public void SerializeDateValue() { var now = DateTimeOffset.UtcNow; @@ -198,5 +199,31 @@ public void TestEtagHelper() Assert.Equal(userId, user.Id); //Assert.Equal(testEtag, user.GetEtag()); } + [Fact] + public void TestPlannerAssigmentSerialization() + { + var planTask = new PlannerTask + { + PlanId = "PLAN_ID", + BucketId = "BUCKET_ID", + Title = "My Planner Task", + Assignments = new PlannerAssignments + { + AdditionalData = new Dictionary + { + {"USER_ID", new PlannerAssignment()} + } + } + }; + + string expectedSerializedString = "{\"assignments\":{\"USER_ID\":{\"@odata.type\":\"#microsoft.graph.plannerAssignment\",\"orderHint\":\"!\"}},\"bucketId\":\"BUCKET_ID\",\"planId\":\"PLAN_ID\",\"title\":\"My Planner Task\"}"; + using var jsonSerializerWriter = new JsonSerializationWriter(); + jsonSerializerWriter.WriteObjectValue(string.Empty, planTask); + var serializedStream = jsonSerializerWriter.GetSerializedContent(); + + // Assert + var streamReader = new StreamReader(serializedStream); + Assert.Equal(expectedSerializedString, streamReader.ReadToEnd()); + } } }