diff --git a/CHANGELOG.md b/CHANGELOG.md index a01edeb3f56..014de41f9af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project does NOT adhere to [Semantic Versioning](https://semver.org/spe ## [Unreleased] +## [5.23.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. +- Latest metadata updates from 21st March 2023 + ## [5.22.0] - 2023-03-14 ### Added diff --git a/src/Microsoft.Graph/Enums/GraphErrorCode.cs b/src/Microsoft.Graph/Enums/GraphErrorCode.cs index 205ba9b62df..1ba64469300 100644 --- a/src/Microsoft.Graph/Enums/GraphErrorCode.cs +++ b/src/Microsoft.Graph/Enums/GraphErrorCode.cs @@ -2,7 +2,7 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ -namespace Microsoft.Graph +namespace Microsoft.Graph.Beta { /// /// Graph error codes diff --git a/src/Microsoft.Graph/Extensions/PlannerAssignment.cs b/src/Microsoft.Graph/Extensions/PlannerAssignment.cs new file mode 100644 index 00000000000..964f8be4984 --- /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.Beta.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/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index 6d1596b461c..aca3274c7fe 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -47,8 +47,8 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// 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 + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// 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); } /// - /// 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. + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index 00614da8a5b..289c0aa795a 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -52,8 +52,8 @@ public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. - /// Find more info here + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -114,7 +114,7 @@ public async Task PatchAsync(MeetingRegistration body, Acti return await RequestAdapter.SendAsync(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs index d1e1527b4ea..2ab378c6c87 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs @@ -67,8 +67,7 @@ public async Task GetAsync(Action(requestInfo, StringCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Assign a tokenLifetimePolicy to an application or servicePrincipal. - /// Find more info here + /// Create new navigation property ref to tokenLifetimePolicies for applications /// /// The request body /// Cancellation token to use when cancelling requests @@ -115,7 +114,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Assign a tokenLifetimePolicy to an application or servicePrincipal. + /// Create new navigation property ref to tokenLifetimePolicies for applications /// /// 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 dc79ee15261..8d3fa6f2513 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 5f419c197c4..fc5eda4ba3d 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; } /// - /// 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 + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// 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); } /// - /// 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. + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index d3aa5518da2..d536ec86c6d 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -52,8 +52,8 @@ public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. - /// Find more info here + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -114,7 +114,7 @@ public async Task PatchAsync(MeetingRegistration body, Acti return await RequestAdapter.SendAsync(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER 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..8e1455ebe21 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..c7a5c6d02d3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Contacts.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 cdb45767022..0aaa289536f 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.Beta.Contacts.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Contacts.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..a21a6c6ebb0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 4063e422272..e335fcf5eda 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.Beta.Contacts.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Contacts.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Contacts.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Contacts.Item.MemberOf.Item; using Microsoft.Graph.Beta.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..ac1b262f80c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..f0b66376f17 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 4a3230be027..e31c3d59bcb 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.Beta.Contacts.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Contacts.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..bd0c0be4ed3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Contacts/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 80fb0ad943e..bfbfe6a8961 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.Beta.Contacts.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Contacts.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Contacts.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Contacts.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Beta.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/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index bd97a2e0268..1e36755468c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -47,7 +47,7 @@ public DeviceManagementConfigurationSettingDefinitionItemRequestBuilder(string r RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -66,7 +66,7 @@ public async Task GetAsync(Actio return await RequestAdapter.SendAsync(requestInfo, DeviceManagementConfigurationSettingDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -92,7 +92,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class DeviceManagementConfigurationSettingDefinitionItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index bebc226fb96..b62caea1329 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -59,7 +59,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -78,7 +78,7 @@ public async Task(requestInfo, DeviceManagementConfigurationSettingDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -104,7 +104,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class SettingDefinitionsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 9da4ea4f281..a362906c8c7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -47,7 +47,7 @@ public DeviceManagementConfigurationSettingDefinitionItemRequestBuilder(string r RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -66,7 +66,7 @@ public async Task GetAsync(Actio return await RequestAdapter.SendAsync(requestInfo, DeviceManagementConfigurationSettingDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -92,7 +92,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class DeviceManagementConfigurationSettingDefinitionItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 836e709d8c0..2727b29de93 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -59,7 +59,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -78,7 +78,7 @@ public async Task(requestInfo, DeviceManagementConfigurationSettingDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -104,7 +104,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class SettingDefinitionsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 6ad55992e57..5bc5e01aea2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -47,7 +47,7 @@ public DeviceManagementConfigurationSettingDefinitionItemRequestBuilder(string r RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -66,7 +66,7 @@ public async Task GetAsync(Actio return await RequestAdapter.SendAsync(requestInfo, DeviceManagementConfigurationSettingDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -92,7 +92,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class DeviceManagementConfigurationSettingDefinitionItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index c62393e4038..f0d352cd52c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -59,7 +59,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd RequestAdapter = requestAdapter; } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -78,7 +78,7 @@ public async Task(requestInfo, DeviceManagementConfigurationSettingDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -104,7 +104,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions /// public class SettingDefinitionsRequestBuilderGetQueryParameters { /// Include count of items 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..2e5735789fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..dfc18fea99e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Devices.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 262d49aebb6..7c6b86cb692 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.Beta.Devices.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Devices.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..433287ac7c4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 9350e05f8b5..61f59bfd6b1 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.Beta.Devices.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Devices.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Devices.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Devices.Item.MemberOf.Item; using Microsoft.Graph.Beta.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..a144751ecfc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..f277986c84d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 8b5477f5ef9..3ac20cdb78d 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.Beta.Devices.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Devices.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..3579e06dafa --- /dev/null +++ b/src/Microsoft.Graph/Generated/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 c7c946302ea..1e540d1f69e 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.Beta.Devices.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Devices.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Devices.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Beta.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/Tables/Item/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs index c51a0f72539..08b076e1c69 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs @@ -66,7 +66,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of tablerow 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 ba8c278d10f..53c4023e0cf 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/SeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs index 33540a1f872..6c5c2eceb49 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs @@ -61,7 +61,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of chartseries 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/Tables/Item/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs index 5338c15a009..8d5b8b182be 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs @@ -66,7 +66,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// /// Retrieve a list of tablerow 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/WorksheetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs index b5242c99352..bf20b5c0f55 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/External/ExternalRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs index 72ab61340da..18db4b96573 100644 --- a/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Beta.External.Connections; +using Microsoft.Graph.Beta.External.IndustryData; using Microsoft.Graph.Beta.Models.ExternalConnectors; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -18,6 +19,10 @@ public class ExternalRequestBuilder { public ConnectionsRequestBuilder Connections { get => new ConnectionsRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the industryData property of the microsoft.graph.externalConnectors.external entity. + public IndustryDataRequestBuilder IndustryData { get => + new IndustryDataRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c19a9219df8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.DataConnectors.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}/external/industryData/dataConnectors/$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}/external/industryData/dataConnectors/$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/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs new file mode 100644 index 00000000000..a90a0b14b32 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs @@ -0,0 +1,256 @@ +using Microsoft.Graph.Beta.External.IndustryData.DataConnectors.Count; +using Microsoft.Graph.Beta.External.IndustryData.DataConnectors.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.DataConnectors { + /// + /// Provides operations to manage the dataConnectors property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class DataConnectorsRequestBuilder { + /// 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; } + /// Provides operations to manage the dataConnectors property of the microsoft.graph.industryData.industryDataRoot entity. + public IndustryDataConnectorItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("industryDataConnector%2Did", position); + return new IndustryDataConnectorItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DataConnectorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DataConnectorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new DataConnectorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DataConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors{?%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 a list of the azureDataLakeConnector 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. +#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, IndustryDataConnectorCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new industryDataConnector object. + /// Find more info here + /// + /// The request body + /// 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 PostAsync(IndustryDataConnector body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(IndustryDataConnector body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, IndustryDataConnector.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the azureDataLakeConnector 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 +#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 DataConnectorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new industryDataConnector object. + /// + /// The request body + /// 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 ToPostRequestInformation(IndustryDataConnector body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(IndustryDataConnector body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DataConnectorsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the azureDataLakeConnector objects and their properties. + /// + public class DataConnectorsRequestBuilderGetQueryParameters { + /// 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 DataConnectorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DataConnectorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DataConnectorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new dataConnectorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DataConnectorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DataConnectorsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new dataConnectorsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DataConnectorsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs new file mode 100644 index 00000000000..7116ee00e1c --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs @@ -0,0 +1,272 @@ +using Microsoft.Graph.Beta.External.IndustryData.DataConnectors.Item.IndustryDataValidate; +using Microsoft.Graph.Beta.External.IndustryData.DataConnectors.Item.SourceSystem; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.DataConnectors.Item { + /// + /// Provides operations to manage the dataConnectors property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class IndustryDataConnectorItemRequestBuilder { + /// Provides operations to call the validate method. + public IndustryDataValidateRequestBuilder IndustryDataValidate { get => + new IndustryDataValidateRequestBuilder(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; } + /// Provides operations to manage the sourceSystem property of the microsoft.graph.industryData.industryDataConnector entity. + public SourceSystemRequestBuilder SourceSystem { get => + new SourceSystemRequestBuilder(PathParameters, RequestAdapter); + } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// + /// Instantiates a new IndustryDataConnectorItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataConnectorItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataConnectorItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataConnectorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property dataConnectors for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of connectors for importing data from source systems. + /// + /// 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, IndustryDataConnector.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property dataConnectors in external + /// + /// The request body + /// 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 PatchAsync(IndustryDataConnector body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(IndustryDataConnector body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, IndustryDataConnector.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property dataConnectors for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new IndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of connectors for importing data from source systems. + /// + /// 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 IndustryDataConnectorItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property dataConnectors in external + /// + /// The request body + /// 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 ToPatchRequestInformation(IndustryDataConnector body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(IndustryDataConnector body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new IndustryDataConnectorItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public IndustryDataConnectorItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of connectors for importing data from source systems. + /// + public class IndustryDataConnectorItemRequestBuilderGetQueryParameters { + /// 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 IndustryDataConnectorItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndustryDataConnectorItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndustryDataConnectorItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IndustryDataConnectorItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataConnectorItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IndustryDataConnectorItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new IndustryDataConnectorItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public IndustryDataConnectorItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataValidate/IndustryDataValidateRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataValidate/IndustryDataValidateRequestBuilder.cs new file mode 100644 index 00000000000..b8f187f5f8b --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataValidate/IndustryDataValidateRequestBuilder.cs @@ -0,0 +1,109 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.DataConnectors.Item.IndustryDataValidate { + /// + /// Provides operations to call the validate method. + /// + public class IndustryDataValidateRequestBuilder { + /// 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 IndustryDataValidateRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataValidateRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}/industryData.validate"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataValidateRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataValidateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}/industryData.validate"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Perform validations applicable for the specific instance of the data connector. + /// Find more info here + /// + /// 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 PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Perform validations applicable for the specific instance of the data connector. + /// + /// 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 ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new IndustryDataValidateRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IndustryDataValidateRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new industryDataValidateRequestBuilderPostRequestConfiguration and sets the default values. + /// + public IndustryDataValidateRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/SourceSystem/SourceSystemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/SourceSystem/SourceSystemRequestBuilder.cs new file mode 100644 index 00000000000..d3d54eebb34 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/SourceSystem/SourceSystemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.DataConnectors.Item.SourceSystem { + /// + /// Provides operations to manage the sourceSystem property of the microsoft.graph.industryData.industryDataConnector entity. + /// + public class SourceSystemRequestBuilder { + /// 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 SourceSystemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SourceSystemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}/sourceSystem{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new SourceSystemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SourceSystemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/dataConnectors/{industryDataConnector%2Did}/sourceSystem{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The sourceSystemDefinition this connector is connected to. + /// + /// 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, SourceSystemDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The sourceSystemDefinition this connector is connected to. + /// + /// 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 SourceSystemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The sourceSystemDefinition this connector is connected to. + /// + public class SourceSystemRequestBuilderGetQueryParameters { + /// 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 SourceSystemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SourceSystemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SourceSystemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new sourceSystemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SourceSystemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..dbb0fcb0102 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.InboundFlows.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}/external/industryData/inboundFlows/$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}/external/industryData/inboundFlows/$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/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs new file mode 100644 index 00000000000..4290fd229f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs @@ -0,0 +1,256 @@ +using Microsoft.Graph.Beta.External.IndustryData.InboundFlows.Count; +using Microsoft.Graph.Beta.External.IndustryData.InboundFlows.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.InboundFlows { + /// + /// Provides operations to manage the inboundFlows property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class InboundFlowsRequestBuilder { + /// 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; } + /// Provides operations to manage the inboundFlows property of the microsoft.graph.industryData.industryDataRoot entity. + public InboundFlowItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("inboundFlow%2Did", position); + return new InboundFlowItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new InboundFlowsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InboundFlowsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new InboundFlowsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InboundFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows{?%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 a list of the inboundFileFlow 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. +#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, InboundFlowCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new inboundFileFlow object. The following prerequisite resources are required when you create an **inboundFileFlow**: + /// Find more info here + /// + /// The request body + /// 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 PostAsync(InboundFlow body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(InboundFlow body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, InboundFlow.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the inboundFileFlow 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 +#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 InboundFlowsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new inboundFileFlow object. The following prerequisite resources are required when you create an **inboundFileFlow**: + /// + /// The request body + /// 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 ToPostRequestInformation(InboundFlow body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(InboundFlow body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new InboundFlowsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the inboundFileFlow objects and their properties. + /// + public class InboundFlowsRequestBuilderGetQueryParameters { + /// 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 InboundFlowsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public InboundFlowsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new InboundFlowsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new inboundFlowsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public InboundFlowsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class InboundFlowsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new inboundFlowsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public InboundFlowsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/DataConnector/DataConnectorRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/DataConnector/DataConnectorRequestBuilder.cs new file mode 100644 index 00000000000..f895bd2d485 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/DataConnector/DataConnectorRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.InboundFlows.Item.DataConnector { + /// + /// Provides operations to manage the dataConnector property of the microsoft.graph.industryData.inboundFlow entity. + /// + public class DataConnectorRequestBuilder { + /// 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 DataConnectorRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DataConnectorRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}/dataConnector{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new DataConnectorRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DataConnectorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}/dataConnector{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The data connector in the context of which this flow pulls in data from a source system. + /// + /// 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, IndustryDataConnector.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The data connector in the context of which this flow pulls in data from a source system. + /// + /// 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 DataConnectorRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The data connector in the context of which this flow pulls in data from a source system. + /// + public class DataConnectorRequestBuilderGetQueryParameters { + /// 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 DataConnectorRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DataConnectorRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DataConnectorRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new dataConnectorRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DataConnectorRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs new file mode 100644 index 00000000000..ace090ae6af --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs @@ -0,0 +1,272 @@ +using Microsoft.Graph.Beta.External.IndustryData.InboundFlows.Item.DataConnector; +using Microsoft.Graph.Beta.External.IndustryData.InboundFlows.Item.Year; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.InboundFlows.Item { + /// + /// Provides operations to manage the inboundFlows property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class InboundFlowItemRequestBuilder { + /// Provides operations to manage the dataConnector property of the microsoft.graph.industryData.inboundFlow entity. + public DataConnectorRequestBuilder DataConnector { get => + new DataConnectorRequestBuilder(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; } + /// Provides operations to manage the year property of the microsoft.graph.industryData.inboundFlow entity. + public YearRequestBuilder Year { get => + new YearRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new InboundFlowItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public InboundFlowItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new InboundFlowItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public InboundFlowItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property inboundFlows for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of data import flow activities to bring data into the canonical store via a connector. + /// + /// 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, InboundFlow.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property inboundFlows in external + /// + /// The request body + /// 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 PatchAsync(InboundFlow body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(InboundFlow body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, InboundFlow.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property inboundFlows for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new InboundFlowItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of data import flow activities to bring data into the canonical store via a connector. + /// + /// 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 InboundFlowItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property inboundFlows in external + /// + /// The request body + /// 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 ToPatchRequestInformation(InboundFlow body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(InboundFlow body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new InboundFlowItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class InboundFlowItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new InboundFlowItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public InboundFlowItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of data import flow activities to bring data into the canonical store via a connector. + /// + public class InboundFlowItemRequestBuilderGetQueryParameters { + /// 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 InboundFlowItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public InboundFlowItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new InboundFlowItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new InboundFlowItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public InboundFlowItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class InboundFlowItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new InboundFlowItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public InboundFlowItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/Year/YearRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/Year/YearRequestBuilder.cs new file mode 100644 index 00000000000..a94dffd67ec --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/Year/YearRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.InboundFlows.Item.Year { + /// + /// Provides operations to manage the year property of the microsoft.graph.industryData.inboundFlow entity. + /// + public class YearRequestBuilder { + /// 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 YearRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public YearRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}/year{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new YearRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public YearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/inboundFlows/{inboundFlow%2Did}/year{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The year that the data brought in via this flow applies to. + /// + /// 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, YearTimePeriodDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The year that the data brought in via this flow applies to. + /// + /// 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 YearRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The year that the data brought in via this flow applies to. + /// + public class YearRequestBuilderGetQueryParameters { + /// 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 YearRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public YearRequestBuilderGetQueryParameters QueryParameters { get; set; } = new YearRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new yearRequestBuilderGetRequestConfiguration and sets the default values. + /// + public YearRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/IndustryDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/IndustryDataRequestBuilder.cs new file mode 100644 index 00000000000..b404ca75296 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/IndustryDataRequestBuilder.cs @@ -0,0 +1,178 @@ +using Microsoft.Graph.Beta.External.IndustryData.DataConnectors; +using Microsoft.Graph.Beta.External.IndustryData.InboundFlows; +using Microsoft.Graph.Beta.External.IndustryData.Operations; +using Microsoft.Graph.Beta.External.IndustryData.ReferenceDefinitions; +using Microsoft.Graph.Beta.External.IndustryData.RoleGroups; +using Microsoft.Graph.Beta.External.IndustryData.Runs; +using Microsoft.Graph.Beta.External.IndustryData.SourceSystems; +using Microsoft.Graph.Beta.External.IndustryData.Years; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData { + /// + /// Provides operations to manage the industryData property of the microsoft.graph.externalConnectors.external entity. + /// + public class IndustryDataRequestBuilder { + /// Provides operations to manage the dataConnectors property of the microsoft.graph.industryData.industryDataRoot entity. + public DataConnectorsRequestBuilder DataConnectors { get => + new DataConnectorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the inboundFlows property of the microsoft.graph.industryData.industryDataRoot entity. + public InboundFlowsRequestBuilder InboundFlows { get => + new InboundFlowsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the operations property of the microsoft.graph.industryData.industryDataRoot entity. + public OperationsRequestBuilder Operations { get => + new OperationsRequestBuilder(PathParameters, RequestAdapter); + } + /// Path parameters for the request + private Dictionary PathParameters { get; set; } + /// Provides operations to manage the referenceDefinitions property of the microsoft.graph.industryData.industryDataRoot entity. + public ReferenceDefinitionsRequestBuilder ReferenceDefinitions { get => + new ReferenceDefinitionsRequestBuilder(PathParameters, RequestAdapter); + } + /// The request adapter to use to execute the requests. + private IRequestAdapter RequestAdapter { get; set; } + /// Provides operations to manage the roleGroups property of the microsoft.graph.industryData.industryDataRoot entity. + public RoleGroupsRequestBuilder RoleGroups { get => + new RoleGroupsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the runs property of the microsoft.graph.industryData.industryDataRoot entity. + public RunsRequestBuilder Runs { get => + new RunsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the sourceSystems property of the microsoft.graph.industryData.industryDataRoot entity. + public SourceSystemsRequestBuilder SourceSystems { get => + new SourceSystemsRequestBuilder(PathParameters, RequestAdapter); + } + /// Url template to use to build the URL for the current request builder + private string UrlTemplate { get; set; } + /// Provides operations to manage the years property of the microsoft.graph.industryData.industryDataRoot entity. + public YearsRequestBuilder Years { get => + new YearsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new IndustryDataRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Get industryData from external + /// + /// 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, IndustryDataRoot.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get industryData from external + /// + /// 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 IndustryDataRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get industryData from external + /// + public class IndustryDataRequestBuilderGetQueryParameters { + /// 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 IndustryDataRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndustryDataRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndustryDataRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new industryDataRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..cd8107d633d --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Operations.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}/external/industryData/operations/$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}/external/industryData/operations/$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/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs new file mode 100644 index 00000000000..ea1a60a98ef --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Operations.Item { + /// + /// Provides operations to manage the operations property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class LongRunningOperationItemRequestBuilder { + /// 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 LongRunningOperationItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public LongRunningOperationItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/operations/{longRunningOperation%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new LongRunningOperationItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public LongRunningOperationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/operations/{longRunningOperation%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property operations for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of ephemeral operations that the system runs currently. Read-only. + /// + /// 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, LongRunningOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property operations in external + /// + /// The request body + /// 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 PatchAsync(LongRunningOperation body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(LongRunningOperation body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, LongRunningOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property operations for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new LongRunningOperationItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of ephemeral operations that the system runs currently. Read-only. + /// + /// 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 LongRunningOperationItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property operations in external + /// + /// The request body + /// 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 ToPatchRequestInformation(LongRunningOperation body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(LongRunningOperation body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new LongRunningOperationItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LongRunningOperationItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LongRunningOperationItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public LongRunningOperationItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of ephemeral operations that the system runs currently. Read-only. + /// + public class LongRunningOperationItemRequestBuilderGetQueryParameters { + /// 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 LongRunningOperationItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public LongRunningOperationItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new LongRunningOperationItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new LongRunningOperationItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public LongRunningOperationItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class LongRunningOperationItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new LongRunningOperationItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public LongRunningOperationItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs new file mode 100644 index 00000000000..6068b887a6d --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs @@ -0,0 +1,255 @@ +using Microsoft.Graph.Beta.External.IndustryData.Operations.Count; +using Microsoft.Graph.Beta.External.IndustryData.Operations.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Operations { + /// + /// Provides operations to manage the operations property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class OperationsRequestBuilder { + /// 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; } + /// Provides operations to manage the operations property of the microsoft.graph.industryData.industryDataRoot entity. + public LongRunningOperationItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("longRunningOperation%2Did", position); + return new LongRunningOperationItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new OperationsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public OperationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new OperationsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/operations{?%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 a list of long-running file validation operations and their statuses. + /// Find more info here + /// + /// 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, LongRunningOperationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to operations for external + /// + /// The request body + /// 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 PostAsync(LongRunningOperation body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(LongRunningOperation body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, LongRunningOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of long-running file validation operations and their statuses. + /// + /// 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 OperationsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to operations for external + /// + /// The request body + /// 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 ToPostRequestInformation(LongRunningOperation body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(LongRunningOperation body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new OperationsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of long-running file validation operations and their statuses. + /// + public class OperationsRequestBuilderGetQueryParameters { + /// 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 OperationsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public OperationsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new OperationsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new operationsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public OperationsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class OperationsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new operationsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public OperationsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8b20c31f58b --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.ReferenceDefinitions.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}/external/industryData/referenceDefinitions/$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}/external/industryData/referenceDefinitions/$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/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..857978a6413 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.ReferenceDefinitions.Item { + /// + /// Provides operations to manage the referenceDefinitions property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class ReferenceDefinitionItemRequestBuilder { + /// 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 ReferenceDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReferenceDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/referenceDefinitions/{referenceDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ReferenceDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReferenceDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/referenceDefinitions/{referenceDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property referenceDefinitions for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of user modifiable system picker types. + /// + /// 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, ReferenceDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property referenceDefinitions in external + /// + /// The request body + /// 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 PatchAsync(ReferenceDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(ReferenceDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ReferenceDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property referenceDefinitions for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new ReferenceDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of user modifiable system picker types. + /// + /// 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 ReferenceDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property referenceDefinitions in external + /// + /// The request body + /// 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 ToPatchRequestInformation(ReferenceDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(ReferenceDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ReferenceDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ReferenceDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ReferenceDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public ReferenceDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of user modifiable system picker types. + /// + public class ReferenceDefinitionItemRequestBuilderGetQueryParameters { + /// 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 ReferenceDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ReferenceDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ReferenceDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new ReferenceDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ReferenceDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ReferenceDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new ReferenceDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public ReferenceDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs new file mode 100644 index 00000000000..a4a32bcb67c --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs @@ -0,0 +1,255 @@ +using Microsoft.Graph.Beta.External.IndustryData.ReferenceDefinitions.Count; +using Microsoft.Graph.Beta.External.IndustryData.ReferenceDefinitions.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.ReferenceDefinitions { + /// + /// Provides operations to manage the referenceDefinitions property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class ReferenceDefinitionsRequestBuilder { + /// 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; } + /// Provides operations to manage the referenceDefinitions property of the microsoft.graph.industryData.industryDataRoot entity. + public ReferenceDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("referenceDefinition%2Did", position); + return new ReferenceDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ReferenceDefinitionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ReferenceDefinitionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/referenceDefinitions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ReferenceDefinitionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ReferenceDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/referenceDefinitions{?%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 a list of the referenceDefinition 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. +#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, ReferenceDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to referenceDefinitions for external + /// + /// The request body + /// 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 PostAsync(ReferenceDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ReferenceDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ReferenceDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the referenceDefinition 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 +#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 ReferenceDefinitionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to referenceDefinitions for external + /// + /// The request body + /// 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 ToPostRequestInformation(ReferenceDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ReferenceDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ReferenceDefinitionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the referenceDefinition objects and their properties. + /// + public class ReferenceDefinitionsRequestBuilderGetQueryParameters { + /// 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 ReferenceDefinitionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ReferenceDefinitionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ReferenceDefinitionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new referenceDefinitionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ReferenceDefinitionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ReferenceDefinitionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new referenceDefinitionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ReferenceDefinitionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2004817cb42 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.RoleGroups.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}/external/industryData/roleGroups/$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}/external/industryData/roleGroups/$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/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs new file mode 100644 index 00000000000..c530e81c15a --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.RoleGroups.Item { + /// + /// Provides operations to manage the roleGroups property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class RoleGroupItemRequestBuilder { + /// 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 RoleGroupItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleGroupItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/roleGroups/{roleGroup%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new RoleGroupItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleGroupItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/roleGroups/{roleGroup%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property roleGroups for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of groups of individual roles that makes role-based admin simpler. + /// + /// 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, RoleGroup.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property roleGroups in external + /// + /// The request body + /// 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 PatchAsync(RoleGroup body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(RoleGroup body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, RoleGroup.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property roleGroups for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new RoleGroupItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of groups of individual roles that makes role-based admin simpler. + /// + /// 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 RoleGroupItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property roleGroups in external + /// + /// The request body + /// 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 ToPatchRequestInformation(RoleGroup body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(RoleGroup body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RoleGroupItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleGroupItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new RoleGroupItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public RoleGroupItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of groups of individual roles that makes role-based admin simpler. + /// + public class RoleGroupItemRequestBuilderGetQueryParameters { + /// 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 RoleGroupItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleGroupItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleGroupItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new RoleGroupItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleGroupItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleGroupItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new RoleGroupItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public RoleGroupItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs new file mode 100644 index 00000000000..f1e53bd735b --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs @@ -0,0 +1,255 @@ +using Microsoft.Graph.Beta.External.IndustryData.RoleGroups.Count; +using Microsoft.Graph.Beta.External.IndustryData.RoleGroups.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.RoleGroups { + /// + /// Provides operations to manage the roleGroups property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class RoleGroupsRequestBuilder { + /// 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; } + /// Provides operations to manage the roleGroups property of the microsoft.graph.industryData.industryDataRoot entity. + public RoleGroupItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("roleGroup%2Did", position); + return new RoleGroupItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new RoleGroupsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RoleGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/roleGroups{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new RoleGroupsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RoleGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/roleGroups{?%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 a list of the roleGroup 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. +#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, RoleGroupCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to roleGroups for external + /// + /// The request body + /// 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 PostAsync(RoleGroup body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RoleGroup body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, RoleGroup.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the roleGroup 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 +#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 RoleGroupsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to roleGroups for external + /// + /// The request body + /// 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 ToPostRequestInformation(RoleGroup body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RoleGroup body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RoleGroupsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the roleGroup objects and their properties. + /// + public class RoleGroupsRequestBuilderGetQueryParameters { + /// 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 RoleGroupsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RoleGroupsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RoleGroupsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new roleGroupsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RoleGroupsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RoleGroupsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new roleGroupsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RoleGroupsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..5bff4fe59c9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.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}/external/industryData/runs/$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}/external/industryData/runs/$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/External/IndustryData/Runs/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs new file mode 100644 index 00000000000..d0839940492 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs @@ -0,0 +1,110 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.IndustryDataGetStatistics { + /// + /// Provides operations to call the getStatistics method. + /// + public class IndustryDataGetStatisticsRequestBuilder { + /// 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 IndustryDataGetStatisticsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataGetStatisticsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/industryData.getStatistics()"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataGetStatisticsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataGetStatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/industryData.getStatistics()"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Invoke function getStatistics + /// + /// 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, IndustryDataRunStatistics.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function getStatistics + /// + /// 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 IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new industryDataGetStatisticsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/ActivitiesRequestBuilder.cs new file mode 100644 index 00000000000..2adb83ee795 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/ActivitiesRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item.Activities.Count; +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item.Activities.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item.Activities { + /// + /// Provides operations to manage the activities property of the microsoft.graph.industryData.industryDataRun entity. + /// + public class ActivitiesRequestBuilder { + /// 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; } + /// Provides operations to manage the activities property of the microsoft.graph.industryData.industryDataRun entity. + public IndustryDataRunActivityItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("industryDataRunActivity%2Did", position); + return new IndustryDataRunActivityItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new ActivitiesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivitiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ActivitiesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities{?%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; + } + /// + /// The set of activities performed during the run. + /// + /// 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, IndustryDataRunActivityCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The set of activities performed during the run. + /// + /// 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 ActivitiesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The set of activities performed during the run. + /// + public class ActivitiesRequestBuilderGetQueryParameters { + /// 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 ActivitiesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ActivitiesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ActivitiesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new activitiesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ActivitiesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3f31253cffa --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item.Activities.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}/external/industryData/runs/{industryDataRun%2Did}/activities/$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}/external/industryData/runs/{industryDataRun%2Did}/activities/$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/External/IndustryData/Runs/Item/Activities/Item/Activity/ActivityRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Item/Activity/ActivityRequestBuilder.cs new file mode 100644 index 00000000000..c422fb4aa17 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Item/Activity/ActivityRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item.Activities.Item.Activity { + /// + /// Provides operations to manage the activity property of the microsoft.graph.industryData.industryDataRunActivity entity. + /// + public class ActivityRequestBuilder { + /// 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 ActivityRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ActivityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities/{industryDataRunActivity%2Did}/activity{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ActivityRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ActivityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities/{industryDataRunActivity%2Did}/activity{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The flow that was run by this activity. + /// + /// 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, IndustryDataActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The flow that was run by this activity. + /// + /// 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 ActivityRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The flow that was run by this activity. + /// + public class ActivityRequestBuilderGetQueryParameters { + /// 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 ActivityRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public ActivityRequestBuilderGetQueryParameters QueryParameters { get; set; } = new ActivityRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new activityRequestBuilderGetRequestConfiguration and sets the default values. + /// + public ActivityRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Item/IndustryDataRunActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Item/IndustryDataRunActivityItemRequestBuilder.cs new file mode 100644 index 00000000000..ec3785fe4fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/Activities/Item/IndustryDataRunActivityItemRequestBuilder.cs @@ -0,0 +1,143 @@ +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item.Activities.Item.Activity; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item.Activities.Item { + /// + /// Provides operations to manage the activities property of the microsoft.graph.industryData.industryDataRun entity. + /// + public class IndustryDataRunActivityItemRequestBuilder { + /// Provides operations to manage the activity property of the microsoft.graph.industryData.industryDataRunActivity entity. + public ActivityRequestBuilder Activity { get => + new ActivityRequestBuilder(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 IndustryDataRunActivityItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataRunActivityItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities/{industryDataRunActivity%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataRunActivityItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataRunActivityItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/activities/{industryDataRunActivity%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The set of activities performed during the run. + /// + /// 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, IndustryDataRunActivity.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The set of activities performed during the run. + /// + /// 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 IndustryDataRunActivityItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The set of activities performed during the run. + /// + public class IndustryDataRunActivityItemRequestBuilderGetQueryParameters { + /// 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 IndustryDataRunActivityItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndustryDataRunActivityItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndustryDataRunActivityItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IndustryDataRunActivityItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataRunActivityItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs new file mode 100644 index 00000000000..ddc5a0f2513 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataGetStatistics/IndustryDataGetStatisticsRequestBuilder.cs @@ -0,0 +1,110 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item.IndustryDataGetStatistics { + /// + /// Provides operations to call the getStatistics method. + /// + public class IndustryDataGetStatisticsRequestBuilder { + /// 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 IndustryDataGetStatisticsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataGetStatisticsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/industryData.getStatistics()"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataGetStatisticsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataGetStatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}/industryData.getStatistics()"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Invoke function getStatistics + /// + /// 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, IndustryDataRunStatistics.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function getStatistics + /// + /// 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 IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new industryDataGetStatisticsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataGetStatisticsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataRunItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataRunItemRequestBuilder.cs new file mode 100644 index 00000000000..997087d20b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/Item/IndustryDataRunItemRequestBuilder.cs @@ -0,0 +1,148 @@ +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item.Activities; +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item.IndustryDataGetStatistics; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs.Item { + /// + /// Provides operations to manage the runs property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class IndustryDataRunItemRequestBuilder { + /// Provides operations to manage the activities property of the microsoft.graph.industryData.industryDataRun entity. + public ActivitiesRequestBuilder Activities { get => + new ActivitiesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the getStatistics method. + public IndustryDataGetStatisticsRequestBuilder IndustryDataGetStatistics { get => + new IndustryDataGetStatisticsRequestBuilder(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 IndustryDataRunItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public IndustryDataRunItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new IndustryDataRunItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public IndustryDataRunItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs/{industryDataRun%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Set of ephemeral runs which present the point-in-time that diagnostic state of activities performed by the system. Read-only. + /// + /// 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, IndustryDataRun.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Set of ephemeral runs which present the point-in-time that diagnostic state of activities performed by the system. Read-only. + /// + /// 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 IndustryDataRunItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of ephemeral runs which present the point-in-time that diagnostic state of activities performed by the system. Read-only. + /// + public class IndustryDataRunItemRequestBuilderGetQueryParameters { + /// 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 IndustryDataRunItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public IndustryDataRunItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new IndustryDataRunItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new IndustryDataRunItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public IndustryDataRunItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Runs/RunsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/RunsRequestBuilder.cs new file mode 100644 index 00000000000..9fd95b0ffa2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Runs/RunsRequestBuilder.cs @@ -0,0 +1,195 @@ +using Microsoft.Graph.Beta.External.IndustryData.Runs.Count; +using Microsoft.Graph.Beta.External.IndustryData.Runs.IndustryDataGetStatistics; +using Microsoft.Graph.Beta.External.IndustryData.Runs.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Runs { + /// + /// Provides operations to manage the runs property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class RunsRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the getStatistics method. + public IndustryDataGetStatisticsRequestBuilder IndustryDataGetStatistics { get => + new IndustryDataGetStatisticsRequestBuilder(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; } + /// Provides operations to manage the runs property of the microsoft.graph.industryData.industryDataRoot entity. + public IndustryDataRunItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("industryDataRun%2Did", position); + return new IndustryDataRunItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new RunsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new RunsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/runs{?%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 a list of the industryDataRun 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. +#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, IndustryDataRunCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the industryDataRun 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 +#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 RunsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the industryDataRun objects and their properties. + /// + public class RunsRequestBuilderGetQueryParameters { + /// 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 RunsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public RunsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new RunsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new runsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public RunsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..17324e80b64 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.SourceSystems.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}/external/industryData/sourceSystems/$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}/external/industryData/sourceSystems/$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/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..14c2fa739fc --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.SourceSystems.Item { + /// + /// Provides operations to manage the sourceSystems property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class SourceSystemDefinitionItemRequestBuilder { + /// 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 SourceSystemDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SourceSystemDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/sourceSystems/{sourceSystemDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new SourceSystemDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SourceSystemDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/sourceSystems/{sourceSystemDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property sourceSystems for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of source definitions that represents real-world external systems. + /// + /// 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, SourceSystemDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property sourceSystems in external + /// + /// The request body + /// 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 PatchAsync(SourceSystemDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SourceSystemDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SourceSystemDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property sourceSystems for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SourceSystemDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of source definitions that represents real-world external systems. + /// + /// 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 SourceSystemDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property sourceSystems in external + /// + /// The request body + /// 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 ToPatchRequestInformation(SourceSystemDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SourceSystemDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SourceSystemDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SourceSystemDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SourceSystemDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SourceSystemDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of source definitions that represents real-world external systems. + /// + public class SourceSystemDefinitionItemRequestBuilderGetQueryParameters { + /// 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 SourceSystemDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SourceSystemDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SourceSystemDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new SourceSystemDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SourceSystemDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SourceSystemDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SourceSystemDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SourceSystemDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs new file mode 100644 index 00000000000..0d24569150b --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs @@ -0,0 +1,256 @@ +using Microsoft.Graph.Beta.External.IndustryData.SourceSystems.Count; +using Microsoft.Graph.Beta.External.IndustryData.SourceSystems.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.SourceSystems { + /// + /// Provides operations to manage the sourceSystems property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class SourceSystemsRequestBuilder { + /// 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; } + /// Provides operations to manage the sourceSystems property of the microsoft.graph.industryData.industryDataRoot entity. + public SourceSystemDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("sourceSystemDefinition%2Did", position); + return new SourceSystemDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new SourceSystemsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SourceSystemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/sourceSystems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new SourceSystemsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SourceSystemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/sourceSystems{?%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 a list of the sourceSystemDefinition 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. +#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, SourceSystemDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new sourceSystemDefinition object. + /// Find more info here + /// + /// The request body + /// 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 PostAsync(SourceSystemDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(SourceSystemDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SourceSystemDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the sourceSystemDefinition 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 +#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 SourceSystemsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new sourceSystemDefinition object. + /// + /// The request body + /// 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 ToPostRequestInformation(SourceSystemDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(SourceSystemDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SourceSystemsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the sourceSystemDefinition objects and their properties. + /// + public class SourceSystemsRequestBuilderGetQueryParameters { + /// 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 SourceSystemsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SourceSystemsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SourceSystemsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new sourceSystemsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SourceSystemsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SourceSystemsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new sourceSystemsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public SourceSystemsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Years/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..1ababa23919 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Years.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}/external/industryData/years/$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}/external/industryData/years/$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/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..addf2831746 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Years.Item { + /// + /// Provides operations to manage the years property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class YearTimePeriodDefinitionItemRequestBuilder { + /// 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 YearTimePeriodDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public YearTimePeriodDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/years/{yearTimePeriodDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new YearTimePeriodDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public YearTimePeriodDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/years/{yearTimePeriodDefinition%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property years for external + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Set of years represented in the system. + /// + /// 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, YearTimePeriodDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property years in external + /// + /// The request body + /// 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 PatchAsync(YearTimePeriodDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(YearTimePeriodDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, YearTimePeriodDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property years for external + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new YearTimePeriodDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Set of years represented in the system. + /// + /// 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 YearTimePeriodDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property years in external + /// + /// The request body + /// 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 ToPatchRequestInformation(YearTimePeriodDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(YearTimePeriodDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new YearTimePeriodDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class YearTimePeriodDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new YearTimePeriodDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public YearTimePeriodDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Set of years represented in the system. + /// + public class YearTimePeriodDefinitionItemRequestBuilderGetQueryParameters { + /// 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 YearTimePeriodDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public YearTimePeriodDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new YearTimePeriodDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new YearTimePeriodDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public YearTimePeriodDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class YearTimePeriodDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new YearTimePeriodDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public YearTimePeriodDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs new file mode 100644 index 00000000000..18cc1226313 --- /dev/null +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs @@ -0,0 +1,256 @@ +using Microsoft.Graph.Beta.External.IndustryData.Years.Count; +using Microsoft.Graph.Beta.External.IndustryData.Years.Item; +using Microsoft.Graph.Beta.Models.IndustryData; +using Microsoft.Graph.Beta.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.Beta.External.IndustryData.Years { + /// + /// Provides operations to manage the years property of the microsoft.graph.industryData.industryDataRoot entity. + /// + public class YearsRequestBuilder { + /// 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; } + /// Provides operations to manage the years property of the microsoft.graph.industryData.industryDataRoot entity. + public YearTimePeriodDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("yearTimePeriodDefinition%2Did", position); + return new YearTimePeriodDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new YearsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public YearsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/years{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new YearsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public YearsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/external/industryData/years{?%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 a list of the yearTimePeriodDefinition 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. +#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, YearTimePeriodDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create a new yearTimePeriodDefinition object. + /// Find more info here + /// + /// The request body + /// 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 PostAsync(YearTimePeriodDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(YearTimePeriodDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, YearTimePeriodDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the yearTimePeriodDefinition 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 +#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 YearsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create a new yearTimePeriodDefinition object. + /// + /// The request body + /// 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 ToPostRequestInformation(YearTimePeriodDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(YearTimePeriodDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new YearsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the yearTimePeriodDefinition objects and their properties. + /// + public class YearsRequestBuilderGetQueryParameters { + /// 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 YearsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public YearsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new YearsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new yearsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public YearsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class YearsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new yearsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public YearsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 1c13681e05f..50b68d92e2e 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; } /// - /// 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 + /// 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// 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. + /// 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. /// /// 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 a50a50b1c77..6c40e54b2a5 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; } /// - /// 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 + /// 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// 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. + /// 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. /// /// 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..5cd02b6cd89 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..11d79245b41 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Groups.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 7a0afabb380..5ca3bdd7397 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.Beta.Groups.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Groups.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..de1e586b374 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 2482fc6454c..0a05c1d7a27 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.Beta.Groups.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Groups.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Groups.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Groups.Item.MemberOf.Item; using Microsoft.Graph.Beta.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/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs index 6de107cc06e..1368547637e 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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 c6e9ada0feb..db358cf865f 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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 b4ce6682a07..e4feba1437f 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; } /// - /// 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 + /// 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// 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. + /// 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. /// /// 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 e7ac896dc25..36cd7964192 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; } /// - /// 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 + /// 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 /// /// The request body /// Cancellation token to use when cancelling requests @@ -68,7 +68,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// 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. + /// 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. /// /// 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..fab52327aaa --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..bec4669d0db --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 035111b59b9..867c85d6d71 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.Beta.Groups.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Groups.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..d3fe05e8b33 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Groups/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 f108d34ee0a..72fc4906b93 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.Beta.Groups.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Groups.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Groups.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Groups.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Beta.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/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index bf8c9faccee..72f1dbac654 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.AccessPackage; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.AccessPackageCatalog; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionHandlers; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -28,6 +29,10 @@ public class AccessPackageAssignmentPolicyItemRequestBuilder { public CustomExtensionHandlersRequestBuilder CustomExtensionHandlers { get => new CustomExtensionHandlersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingsRequestBuilder CustomExtensionStageSettings { get => + new CustomExtensionStageSettingsRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..14e5840af1c --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.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}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs new file mode 100644 index 00000000000..efde989bfd6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingsRequestBuilder { + /// 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; } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customExtensionStageSetting%2Did", position); + return new CustomExtensionStageSettingItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%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; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSettingCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingsRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new customExtensionStageSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs new file mode 100644 index 00000000000..0b9bcac7ff7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingItemRequestBuilder { + /// 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 CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSetting.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingItemRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs index ea26f9967fa..1262ca164eb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Cancel; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Reprocess; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Requestor; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -42,6 +43,10 @@ public class AccessPackageAssignmentRequestItemRequestBuilder { public RequestorRequestBuilder Requestor { get => new RequestorRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to call the resume method. + public ResumeRequestBuilder Resume { get => + new ResumeRequestBuilder(PathParameters, RequestAdapter); + } /// Url template to use to build the URL for the current request builder private string UrlTemplate { get; set; } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs new file mode 100644 index 00000000000..52fd2eeada2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Beta.Models; +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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume { + public class ResumePostRequestBody : 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 data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CustomExtensionData? Data { + get { return BackingStore?.Get("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public CustomExtensionData Data { + get { return BackingStore?.Get("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#nullable restore +#else + public string Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } +#nullable restore +#else + public string Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } +#endif + /// + /// Instantiates a new resumePostRequestBody and sets the default values. + /// + public ResumePostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResumePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"data", n => { Data = n.GetObjectValue(CustomExtensionData.CreateFromDiscriminatorValue); } }, + {"source", n => { Source = n.GetStringValue(); } }, + {"type", n => { Type = 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.WriteObjectValue("data", Data); + writer.WriteStringValue("source", Source); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs new file mode 100644 index 00000000000..003310515e3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs @@ -0,0 +1,114 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume { + /// + /// Provides operations to call the resume method. + /// + public class ResumeRequestBuilder { + /// 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 ResumeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResumeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentRequests/{accessPackageAssignmentRequest%2Did}/resume"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ResumeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResumeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignmentRequests/{accessPackageAssignmentRequest%2Did}/resume"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// In Azure AD entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose **requestStatus** is in a `WaitingForCallback` state. + /// Find more info here + /// + /// The request body + /// 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 PostAsync(ResumePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ResumePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// In Azure AD entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose **requestStatus** is in a `WaitingForCallback` state. + /// + /// The request body + /// 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 ToPostRequestInformation(ResumePostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ResumeRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ResumeRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new resumeRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ResumeRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index 210125cd6c4..4d9b1be41a5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.AccessPackage; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.AccessPackageCatalog; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionHandlers; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -28,6 +29,10 @@ public class AccessPackageAssignmentPolicyItemRequestBuilder { public CustomExtensionHandlersRequestBuilder CustomExtensionHandlers { get => new CustomExtensionHandlersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingsRequestBuilder CustomExtensionStageSettings { get => + new CustomExtensionStageSettingsRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d49e35841cb --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.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}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs new file mode 100644 index 00000000000..b331948b235 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingsRequestBuilder { + /// 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; } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customExtensionStageSetting%2Did", position); + return new CustomExtensionStageSettingItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%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; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSettingCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingsRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new customExtensionStageSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs new file mode 100644 index 00000000000..910fe267519 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingItemRequestBuilder { + /// 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 CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSetting.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingItemRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs index 644036faa75..b263c954a68 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.AccessPackage; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.AccessPackageCatalog; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionHandlers; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -28,6 +29,10 @@ public class AccessPackageAssignmentPolicyRequestBuilder { public CustomExtensionHandlersRequestBuilder CustomExtensionHandlers { get => new CustomExtensionHandlersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingsRequestBuilder CustomExtensionStageSettings { get => + new CustomExtensionStageSettingsRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..13504d6a383 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings.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}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings/$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}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings/$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/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs new file mode 100644 index 00000000000..5889a7251b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingsRequestBuilder { + /// 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; } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customExtensionStageSetting%2Did", position); + return new CustomExtensionStageSettingItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings{?%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; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSettingCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingsRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new customExtensionStageSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs new file mode 100644 index 00000000000..721f91e94ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentPolicy.CustomExtensionStageSettings.Item { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingItemRequestBuilder { + /// 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 CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentPolicy/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSetting.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingItemRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs index 030580d6444..b4830351d48 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs @@ -3,6 +3,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Cancel; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Reprocess; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Requestor; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -42,6 +43,10 @@ public class AccessPackageAssignmentRequestItemRequestBuilder { public RequestorRequestBuilder Requestor { get => new RequestorRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to call the resume method. + public ResumeRequestBuilder Resume { get => + new ResumeRequestBuilder(PathParameters, RequestAdapter); + } /// Url template to use to build the URL for the current request builder private string UrlTemplate { get; set; } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs new file mode 100644 index 00000000000..f6a01232cd5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Beta.Models; +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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume { + public class ResumePostRequestBody : 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 data property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CustomExtensionData? Data { + get { return BackingStore?.Get("data"); } + set { BackingStore?.Set("data", value); } + } +#nullable restore +#else + public CustomExtensionData Data { + get { return BackingStore?.Get("data"); } + set { BackingStore?.Set("data", value); } + } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#nullable restore +#else + public string Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#endif + /// The type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } +#nullable restore +#else + public string Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } +#endif + /// + /// Instantiates a new resumePostRequestBody and sets the default values. + /// + public ResumePostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ResumePostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"data", n => { Data = n.GetObjectValue(CustomExtensionData.CreateFromDiscriminatorValue); } }, + {"source", n => { Source = n.GetStringValue(); } }, + {"type", n => { Type = 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.WriteObjectValue("data", Data); + writer.WriteStringValue("source", Source); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs new file mode 100644 index 00000000000..8dfb0f9b9df --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs @@ -0,0 +1,114 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume { + /// + /// Provides operations to call the resume method. + /// + public class ResumeRequestBuilder { + /// 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 ResumeRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ResumeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentRequests/{accessPackageAssignmentRequest%2Did}/resume"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new ResumeRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ResumeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackageAssignmentRequests/{accessPackageAssignmentRequest%2Did}/resume"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// In Azure AD entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose **requestStatus** is in a `WaitingForCallback` state. + /// Find more info here + /// + /// The request body + /// 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 PostAsync(ResumePostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ResumePostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// In Azure AD entitlement management, when an access package policy has been enabled to call out a custom extension and the request processing is waiting for the callback from the customer, the customer can initiate a resume action. It is performed on an accessPackageAssignmentRequest object whose **requestStatus** is in a `WaitingForCallback` state. + /// + /// The request body + /// 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 ToPostRequestInformation(ResumePostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ResumePostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ResumeRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ResumeRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new resumeRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ResumeRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs index e08e7c7d13a..adc97f9ef1d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageResourceRoles; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageResources; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageResourceScopes; @@ -18,6 +19,10 @@ namespace Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPa /// Provides operations to manage the accessPackageCatalogs property of the microsoft.graph.entitlementManagement entity. /// public class AccessPackageCatalogItemRequestBuilder { + /// Provides operations to manage the accessPackageCustomWorkflowExtensions property of the microsoft.graph.accessPackageCatalog entity. + public AccessPackageCustomWorkflowExtensionsRequestBuilder AccessPackageCustomWorkflowExtensions { get => + new AccessPackageCustomWorkflowExtensionsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the accessPackageResourceRoles property of the microsoft.graph.accessPackageCatalog entity. public AccessPackageResourceRolesRequestBuilder AccessPackageResourceRoles { get => new AccessPackageResourceRolesRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs new file mode 100644 index 00000000000..1b1804e8b2b --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs @@ -0,0 +1,255 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions { + /// + /// Provides operations to manage the accessPackageCustomWorkflowExtensions property of the microsoft.graph.accessPackageCatalog entity. + /// + public class AccessPackageCustomWorkflowExtensionsRequestBuilder { + /// 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; } + /// Provides operations to manage the accessPackageCustomWorkflowExtensions property of the microsoft.graph.accessPackageCatalog entity. + public CustomCalloutExtensionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customCalloutExtension%2Did", position); + return new CustomCalloutExtensionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new AccessPackageCustomWorkflowExtensionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AccessPackageCustomWorkflowExtensionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new AccessPackageCustomWorkflowExtensionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AccessPackageCustomWorkflowExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions{?%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 a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the **customAccessPackageWorkflowExtension** objects for the catalog that the caller has access to read. Each object includes an `@odata.type` property that indicates whether the object is an **accessPackageAssignmentRequestWorkflowExtension** or an **accessPackageAssignmentWorkflowExtension**. + /// Find more info here + /// + /// 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, CustomCalloutExtensionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to accessPackageCustomWorkflowExtensions for identityGovernance + /// + /// The request body + /// 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 PostAsync(CustomCalloutExtension body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(CustomCalloutExtension body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CustomCalloutExtension.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the **customAccessPackageWorkflowExtension** objects for the catalog that the caller has access to read. Each object includes an `@odata.type` property that indicates whether the object is an **accessPackageAssignmentRequestWorkflowExtension** or an **accessPackageAssignmentWorkflowExtension**. + /// + /// 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 AccessPackageCustomWorkflowExtensionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to accessPackageCustomWorkflowExtensions for identityGovernance + /// + /// The request body + /// 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 ToPostRequestInformation(CustomCalloutExtension body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(CustomCalloutExtension body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AccessPackageCustomWorkflowExtensionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get a list of the accessPackageAssignmentRequestWorkflowExtension and accessPackageAssignmentWorkflowExtension objects and their properties. The resulting list includes all the **customAccessPackageWorkflowExtension** objects for the catalog that the caller has access to read. Each object includes an `@odata.type` property that indicates whether the object is an **accessPackageAssignmentRequestWorkflowExtension** or an **accessPackageAssignmentWorkflowExtension**. + /// + public class AccessPackageCustomWorkflowExtensionsRequestBuilderGetQueryParameters { + /// 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 AccessPackageCustomWorkflowExtensionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AccessPackageCustomWorkflowExtensionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AccessPackageCustomWorkflowExtensionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new accessPackageCustomWorkflowExtensionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AccessPackageCustomWorkflowExtensionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AccessPackageCustomWorkflowExtensionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new accessPackageCustomWorkflowExtensionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AccessPackageCustomWorkflowExtensionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..2025f13b377 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions.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}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions/$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}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions/$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/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs new file mode 100644 index 00000000000..6a9e8303902 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs @@ -0,0 +1,262 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackageCustomWorkflowExtensions.Item { + /// + /// Provides operations to manage the accessPackageCustomWorkflowExtensions property of the microsoft.graph.accessPackageCatalog entity. + /// + public class CustomCalloutExtensionItemRequestBuilder { + /// 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 CustomCalloutExtensionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomCalloutExtensionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions/{customCalloutExtension%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomCalloutExtensionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomCalloutExtensionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackageCustomWorkflowExtensions/{customCalloutExtension%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Delete navigation property accessPackageCustomWorkflowExtensions for identityGovernance + /// + /// 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 DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// The attributes of a logic app, which can be called at various stages of an access package request and assignment cycle. + /// + /// 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, CustomCalloutExtension.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property accessPackageCustomWorkflowExtensions in identityGovernance + /// + /// The request body + /// 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 PatchAsync(CustomCalloutExtension body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(CustomCalloutExtension body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, CustomCalloutExtension.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property accessPackageCustomWorkflowExtensions for identityGovernance + /// + /// 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 ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The attributes of a logic app, which can be called at various stages of an access package request and assignment cycle. + /// + /// 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 CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property accessPackageCustomWorkflowExtensions in identityGovernance + /// + /// The request body + /// 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 ToPatchRequestInformation(CustomCalloutExtension body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(CustomCalloutExtension body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// The attributes of a logic app, which can be called at various stages of an access package request and assignment cycle. + /// + public class CustomCalloutExtensionItemRequestBuilderGetQueryParameters { + /// 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 CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomCalloutExtensionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomCalloutExtensionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index 15dcb77081a..7c18ffe3c34 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.AccessPackage; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.AccessPackageCatalog; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionHandlers; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -28,6 +29,10 @@ public class AccessPackageAssignmentPolicyItemRequestBuilder { public CustomExtensionHandlersRequestBuilder CustomExtensionHandlers { get => new CustomExtensionHandlersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingsRequestBuilder CustomExtensionStageSettings { get => + new CustomExtensionStageSettingsRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..7706c637a08 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.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}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs new file mode 100644 index 00000000000..59b9f598f79 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingsRequestBuilder { + /// 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; } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customExtensionStageSetting%2Did", position); + return new CustomExtensionStageSettingItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%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; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSettingCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingsRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new customExtensionStageSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs new file mode 100644 index 00000000000..8c93ab95ed6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Item.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingItemRequestBuilder { + /// 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 CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalog%2Did}/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSetting.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingItemRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index ee2084a0e13..a8c1c84136e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.AccessPackage; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.AccessPackageCatalog; using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionHandlers; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Kiota.Abstractions; @@ -28,6 +29,10 @@ public class AccessPackageAssignmentPolicyItemRequestBuilder { public CustomExtensionHandlersRequestBuilder CustomExtensionHandlers { get => new CustomExtensionHandlersRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingsRequestBuilder CustomExtensionStageSettings { get => + new CustomExtensionStageSettingsRequestBuilder(PathParameters, RequestAdapter); + } /// Path parameters for the request private Dictionary PathParameters { get; set; } /// The request adapter to use to execute the requests. diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..9dc44c97563 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.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}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/$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/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs new file mode 100644 index 00000000000..8c3cd45d264 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -0,0 +1,189 @@ +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Count; +using Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingsRequestBuilder { + /// 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; } + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + public CustomExtensionStageSettingItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("customExtensionStageSetting%2Did", position); + return new CustomExtensionStageSettingItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings{?%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; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSettingCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingsRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new customExtensionStageSettingsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs new file mode 100644 index 00000000000..522662e7807 --- /dev/null +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.AccessPackageAssignmentPolicies.Item.CustomExtensionStageSettings.Item { + /// + /// Provides operations to manage the customExtensionStageSettings property of the microsoft.graph.accessPackageAssignmentPolicy entity. + /// + public class CustomExtensionStageSettingItemRequestBuilder { + /// 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 CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) { + _ = pathParameters ?? throw new ArgumentNullException(nameof(pathParameters)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(pathParameters); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CustomExtensionStageSettingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { + if(string.IsNullOrEmpty(rawUrl)) throw new ArgumentNullException(nameof(rawUrl)); + _ = requestAdapter ?? throw new ArgumentNullException(nameof(requestAdapter)); + UrlTemplate = "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/accessPackageAssignmentPolicies/{accessPackageAssignmentPolicy%2Did}/customExtensionStageSettings/{customExtensionStageSetting%2Did}{?%24select,%24expand}"; + var urlTplParams = new Dictionary(); + if (!string.IsNullOrWhiteSpace(rawUrl)) urlTplParams.Add("request-raw-url", rawUrl); + PathParameters = urlTplParams; + RequestAdapter = requestAdapter; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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, CustomExtensionStageSetting.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + /// + public class CustomExtensionStageSettingItemRequestBuilderGetQueryParameters { + /// 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 CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CustomExtensionStageSettingItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CustomExtensionStageSettingItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CustomExtensionStageSettingItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} 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 a9d7effd974..5397270e161 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d54ffbed982 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..8c8b5b9e5cc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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/Me/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 394879c0c76..7f76a22c4e9 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.Me.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/Me/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..6a9c04cfb94 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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.Beta.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/Devices/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/MemberOfRequestBuilder.cs index 7670fe20680..260a229bbb3 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Me.Devices.Item.MemberOf.Item; using Microsoft.Graph.Beta.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/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..00348dc2bd3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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/Me/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..4cd32dbe910 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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/Me/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 6195bc954df..d198a16ed7f 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.Me.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/Me/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..0ee06673779 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Me.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}/me/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}/me/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.Beta.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/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 7bc07401e5b..71cfcbe1fc6 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Me.Devices.Item.TransitiveMemberOf.Item; using Microsoft.Graph.Beta.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/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 eae68c6716e..c63e9464e33 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 @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// 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/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index 61fce6c900c..428f1ce73a9 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 @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index 7a8f17c9b44..a9b8a8885cd 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -543,8 +543,8 @@ public FindRoomsWithRoomListRequestBuilder FindRoomsWithRoomList(string roomList return new FindRoomsWithRoomListRequestBuilder(PathParameters, RequestAdapter, roomList); } /// - /// 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. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -595,7 +595,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. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -649,7 +649,7 @@ public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Beta.Models. 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. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. /// 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..c08e1d757b9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..a188ddeac51 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Me.MemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 e7815bae3f4..e2972e9acbe 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.Beta.Me.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.MemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..c04187632f1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 25b6d383f81..9fa9e996825 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.Beta.Me.MemberOf.Count; +using Microsoft.Graph.Beta.Me.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Me.MemberOf.Item; using Microsoft.Graph.Beta.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 315395f514a..3c44d41c0c2 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. 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 8178a73f77e..0230e271060 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 0058d091e41..aa142ad05c9 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs @@ -64,8 +64,8 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { 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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. 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.Beta.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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. 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,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Beta.Models.M 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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. There are two scenarios where an app can get messages in another user's mail folder: /// public class MessagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index 5e0c37391c1..d003ef459ff 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -52,8 +52,8 @@ public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. - /// Find more info here + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -114,7 +114,7 @@ public async Task PatchAsync(MeetingRegistration body, Acti return await RequestAdapter.SendAsync(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER 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..8370fbe7ce5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..aada4d6f55b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Me.TransitiveMemberOf.GraphAdministrativeUnit.Count; +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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 19fc97b27c9..4ed764d25b5 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.Beta.Me.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..47f5cd5746a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Me/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 bc4d8fadbe8..4ae3f3b05e8 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.Beta.Me.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Me.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Me.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Me.TransitiveMemberOf.Item; using Microsoft.Graph.Beta.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/AccessPackageAssignment.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs index 0ca72d2246b..1eac1f83e7b 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs @@ -130,6 +130,20 @@ public string CatalogId { get { return BackingStore?.Get("catalogId"); } set { BackingStore?.Set("catalogId", value); } } +#endif + /// Information about all the custom extension calls that were made during the access package assignment workflow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomExtensionCalloutInstances { + get { return BackingStore?.Get?>("customExtensionCalloutInstances"); } + set { BackingStore?.Set("customExtensionCalloutInstances", value); } + } +#nullable restore +#else + public List CustomExtensionCalloutInstances { + get { return BackingStore?.Get>("customExtensionCalloutInstances"); } + set { BackingStore?.Set("customExtensionCalloutInstances", value); } + } #endif /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? ExpiredDateTime { @@ -205,6 +219,7 @@ public string TargetId { {"assignmentState", n => { AssignmentState = n.GetStringValue(); } }, {"assignmentStatus", n => { AssignmentStatus = n.GetStringValue(); } }, {"catalogId", n => { CatalogId = n.GetStringValue(); } }, + {"customExtensionCalloutInstances", n => { CustomExtensionCalloutInstances = n.GetCollectionOfObjectValues(CustomExtensionCalloutInstance.CreateFromDiscriminatorValue)?.ToList(); } }, {"expiredDateTime", n => { ExpiredDateTime = n.GetDateTimeOffsetValue(); } }, {"isExtended", n => { IsExtended = n.GetBoolValue(); } }, {"schedule", n => { Schedule = n.GetObjectValue(RequestSchedule.CreateFromDiscriminatorValue); } }, @@ -228,6 +243,7 @@ public string TargetId { writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("assignmentStatus", AssignmentStatus); writer.WriteStringValue("catalogId", CatalogId); + writer.WriteCollectionOfObjectValues("customExtensionCalloutInstances", CustomExtensionCalloutInstances); writer.WriteDateTimeOffsetValue("expiredDateTime", ExpiredDateTime); writer.WriteBoolValue("isExtended", IsExtended); writer.WriteObjectValue("schedule", Schedule); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs index 794628eb771..eb6568a75b9 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs @@ -98,6 +98,20 @@ public List CustomExtensionHandlers { get { return BackingStore?.Get>("customExtensionHandlers"); } set { BackingStore?.Set("customExtensionHandlers", value); } } +#endif + /// The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomExtensionStageSettings { + get { return BackingStore?.Get?>("customExtensionStageSettings"); } + set { BackingStore?.Set("customExtensionStageSettings", value); } + } +#nullable restore +#else + public List CustomExtensionStageSettings { + get { return BackingStore?.Get>("customExtensionStageSettings"); } + set { BackingStore?.Set("customExtensionStageSettings", value); } + } #endif /// The description of the policy. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -219,6 +233,7 @@ public Microsoft.Graph.Beta.Models.RequestorSettings RequestorSettings { {"createdBy", n => { CreatedBy = n.GetStringValue(); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, {"customExtensionHandlers", n => { CustomExtensionHandlers = n.GetCollectionOfObjectValues(CustomExtensionHandler.CreateFromDiscriminatorValue)?.ToList(); } }, + {"customExtensionStageSettings", n => { CustomExtensionStageSettings = n.GetCollectionOfObjectValues(CustomExtensionStageSetting.CreateFromDiscriminatorValue)?.ToList(); } }, {"description", n => { Description = n.GetStringValue(); } }, {"displayName", n => { DisplayName = n.GetStringValue(); } }, {"durationInDays", n => { DurationInDays = n.GetIntValue(); } }, @@ -245,6 +260,7 @@ public Microsoft.Graph.Beta.Models.RequestorSettings RequestorSettings { writer.WriteStringValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteCollectionOfObjectValues("customExtensionHandlers", CustomExtensionHandlers); + writer.WriteCollectionOfObjectValues("customExtensionStageSettings", CustomExtensionStageSettings); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteIntValue("durationInDays", DurationInDays); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs index eeadf0e984b..dc3cdfdd3a6 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs @@ -57,6 +57,20 @@ public DateTimeOffset? CreatedDateTime { get { return BackingStore?.Get("createdDateTime"); } set { BackingStore?.Set("createdDateTime", value); } } + /// Information about all the custom extension calls that were made during the access package assignment request workflow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomExtensionCalloutInstances { + get { return BackingStore?.Get?>("customExtensionCalloutInstances"); } + set { BackingStore?.Set("customExtensionCalloutInstances", value); } + } +#nullable restore +#else + public List CustomExtensionCalloutInstances { + get { return BackingStore?.Get>("customExtensionCalloutInstances"); } + set { BackingStore?.Set("customExtensionCalloutInstances", value); } + } +#endif /// A collection of custom workflow extension instances being run on an assignment request. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -183,6 +197,7 @@ public RequestSchedule Schedule { {"answers", n => { Answers = n.GetCollectionOfObjectValues(AccessPackageAnswer.CreateFromDiscriminatorValue)?.ToList(); } }, {"completedDate", n => { CompletedDate = n.GetDateTimeOffsetValue(); } }, {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"customExtensionCalloutInstances", n => { CustomExtensionCalloutInstances = n.GetCollectionOfObjectValues(CustomExtensionCalloutInstance.CreateFromDiscriminatorValue)?.ToList(); } }, {"customExtensionHandlerInstances", n => { CustomExtensionHandlerInstances = n.GetCollectionOfObjectValues(CustomExtensionHandlerInstance.CreateFromDiscriminatorValue)?.ToList(); } }, {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, {"isValidationOnly", n => { IsValidationOnly = n.GetBoolValue(); } }, @@ -206,6 +221,7 @@ public RequestSchedule Schedule { writer.WriteCollectionOfObjectValues("answers", Answers); writer.WriteDateTimeOffsetValue("completedDate", CompletedDate); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteCollectionOfObjectValues("customExtensionCalloutInstances", CustomExtensionCalloutInstances); writer.WriteCollectionOfObjectValues("customExtensionHandlerInstances", CustomExtensionHandlerInstances); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteBoolValue("isValidationOnly", IsValidationOnly); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs new file mode 100644 index 00000000000..b258d480873 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs @@ -0,0 +1,93 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AccessPackageAssignmentRequestCallbackData : CustomExtensionData, IParsable { + /// Details for the callback. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomExtensionStageInstanceDetail { + get { return BackingStore?.Get("customExtensionStageInstanceDetail"); } + set { BackingStore?.Set("customExtensionStageInstanceDetail", value); } + } +#nullable restore +#else + public string CustomExtensionStageInstanceDetail { + get { return BackingStore?.Get("customExtensionStageInstanceDetail"); } + set { BackingStore?.Set("customExtensionStageInstanceDetail", value); } + } +#endif + /// Unique identifier of the callout to the custom extension. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomExtensionStageInstanceId { + get { return BackingStore?.Get("customExtensionStageInstanceId"); } + set { BackingStore?.Set("customExtensionStageInstanceId", value); } + } +#nullable restore +#else + public string CustomExtensionStageInstanceId { + get { return BackingStore?.Get("customExtensionStageInstanceId"); } + set { BackingStore?.Set("customExtensionStageInstanceId", value); } + } +#endif + /// Indicates the stage at which the custom callout extension will be executed. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. + public AccessPackageCustomExtensionStage? Stage { + get { return BackingStore?.Get("stage"); } + set { BackingStore?.Set("stage", value); } + } + /// Allow the extension to be able to deny or cancel the request submitted by the requestor. The supported values are Denied and Canceled. This property can only be set for an assignmentRequestCreated stage. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } +#nullable restore +#else + public string State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } +#endif + /// + /// Instantiates a new AccessPackageAssignmentRequestCallbackData and sets the default values. + /// + public AccessPackageAssignmentRequestCallbackData() : base() { + OdataType = "#microsoft.graph.accessPackageAssignmentRequestCallbackData"; + } + /// + /// 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 new AccessPackageAssignmentRequestCallbackData CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessPackageAssignmentRequestCallbackData(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"customExtensionStageInstanceDetail", n => { CustomExtensionStageInstanceDetail = n.GetStringValue(); } }, + {"customExtensionStageInstanceId", n => { CustomExtensionStageInstanceId = n.GetStringValue(); } }, + {"stage", n => { Stage = n.GetEnumValue(); } }, + {"state", n => { State = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("customExtensionStageInstanceDetail", CustomExtensionStageInstanceDetail); + writer.WriteStringValue("customExtensionStageInstanceId", CustomExtensionStageInstanceId); + writer.WriteEnumValue("stage", Stage); + writer.WriteStringValue("state", State); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs new file mode 100644 index 00000000000..bca5f7abb5f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AccessPackageAssignmentRequestWorkflowExtension : CustomCalloutExtension, IParsable { + /// The callback configuration for a custom extension. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CustomExtensionCallbackConfiguration? CallbackConfiguration { + get { return BackingStore?.Get("callbackConfiguration"); } + set { BackingStore?.Set("callbackConfiguration", value); } + } +#nullable restore +#else + public CustomExtensionCallbackConfiguration CallbackConfiguration { + get { return BackingStore?.Get("callbackConfiguration"); } + set { BackingStore?.Set("callbackConfiguration", value); } + } +#endif + /// The userPrincipalName of the user or identity of the subject that created this resource. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedBy { + get { return BackingStore?.Get("createdBy"); } + set { BackingStore?.Set("createdBy", value); } + } +#nullable restore +#else + public string CreatedBy { + get { return BackingStore?.Get("createdBy"); } + set { BackingStore?.Set("createdBy", value); } + } +#endif + /// When the object was created. + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// The userPrincipalName of the identity that last modified the object. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#nullable restore +#else + public string LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#endif + /// When the object was last modified. + public DateTimeOffset? LastModifiedDateTime { + get { return BackingStore?.Get("lastModifiedDateTime"); } + set { BackingStore?.Set("lastModifiedDateTime", value); } + } + /// + /// Instantiates a new AccessPackageAssignmentRequestWorkflowExtension and sets the default values. + /// + public AccessPackageAssignmentRequestWorkflowExtension() : base() { + OdataType = "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension"; + } + /// + /// 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 new AccessPackageAssignmentRequestWorkflowExtension CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessPackageAssignmentRequestWorkflowExtension(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"callbackConfiguration", n => { CallbackConfiguration = n.GetObjectValue(CustomExtensionCallbackConfiguration.CreateFromDiscriminatorValue); } }, + {"createdBy", n => { CreatedBy = n.GetStringValue(); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastModifiedBy", n => { LastModifiedBy = n.GetStringValue(); } }, + {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("callbackConfiguration", CallbackConfiguration); + writer.WriteStringValue("createdBy", CreatedBy); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteStringValue("lastModifiedBy", LastModifiedBy); + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse.cs new file mode 100644 index 00000000000..1afafa100f0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessPackageAssignmentRequestWorkflowExtensionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AccessPackageAssignmentRequestWorkflowExtension.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs new file mode 100644 index 00000000000..11b8060b3b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AccessPackageAssignmentWorkflowExtension : CustomCalloutExtension, IParsable { + /// The callback configuration for a custom extension. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CustomExtensionCallbackConfiguration? CallbackConfiguration { + get { return BackingStore?.Get("callbackConfiguration"); } + set { BackingStore?.Set("callbackConfiguration", value); } + } +#nullable restore +#else + public CustomExtensionCallbackConfiguration CallbackConfiguration { + get { return BackingStore?.Get("callbackConfiguration"); } + set { BackingStore?.Set("callbackConfiguration", value); } + } +#endif + /// The userPrincipalName of the user or identity of the subject that created this resource. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CreatedBy { + get { return BackingStore?.Get("createdBy"); } + set { BackingStore?.Set("createdBy", value); } + } +#nullable restore +#else + public string CreatedBy { + get { return BackingStore?.Get("createdBy"); } + set { BackingStore?.Set("createdBy", value); } + } +#endif + /// When the entity was created. + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// The userPrincipalName of the identity that last modified the entity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#nullable restore +#else + public string LastModifiedBy { + get { return BackingStore?.Get("lastModifiedBy"); } + set { BackingStore?.Set("lastModifiedBy", value); } + } +#endif + /// When the entity was last modified. + public DateTimeOffset? LastModifiedDateTime { + get { return BackingStore?.Get("lastModifiedDateTime"); } + set { BackingStore?.Set("lastModifiedDateTime", value); } + } + /// + /// Instantiates a new AccessPackageAssignmentWorkflowExtension and sets the default values. + /// + public AccessPackageAssignmentWorkflowExtension() : base() { + OdataType = "#microsoft.graph.accessPackageAssignmentWorkflowExtension"; + } + /// + /// 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 new AccessPackageAssignmentWorkflowExtension CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessPackageAssignmentWorkflowExtension(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"callbackConfiguration", n => { CallbackConfiguration = n.GetObjectValue(CustomExtensionCallbackConfiguration.CreateFromDiscriminatorValue); } }, + {"createdBy", n => { CreatedBy = n.GetStringValue(); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"lastModifiedBy", n => { LastModifiedBy = n.GetStringValue(); } }, + {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("callbackConfiguration", CallbackConfiguration); + writer.WriteStringValue("createdBy", CreatedBy); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteStringValue("lastModifiedBy", LastModifiedBy); + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtensionCollectionResponse.cs new file mode 100644 index 00000000000..ac5404b1132 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtensionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AccessPackageAssignmentWorkflowExtensionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new AccessPackageAssignmentWorkflowExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AccessPackageAssignmentWorkflowExtensionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AccessPackageAssignmentWorkflowExtension.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs index 890eb5cbe31..cd300c97f34 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs @@ -5,6 +5,20 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models { public class AccessPackageCatalog : Entity, IParsable { + /// The attributes of a logic app, which can be called at various stages of an access package request and assignment cycle. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AccessPackageCustomWorkflowExtensions { + get { return BackingStore?.Get?>("accessPackageCustomWorkflowExtensions"); } + set { BackingStore?.Set("accessPackageCustomWorkflowExtensions", value); } + } +#nullable restore +#else + public List AccessPackageCustomWorkflowExtensions { + get { return BackingStore?.Get>("accessPackageCustomWorkflowExtensions"); } + set { BackingStore?.Set("accessPackageCustomWorkflowExtensions", value); } + } +#endif /// The roles in each resource in a catalog. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -187,6 +201,7 @@ public DateTimeOffset? ModifiedDateTime { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"accessPackageCustomWorkflowExtensions", n => { AccessPackageCustomWorkflowExtensions = n.GetCollectionOfObjectValues(CustomCalloutExtension.CreateFromDiscriminatorValue)?.ToList(); } }, {"accessPackageResourceRoles", n => { AccessPackageResourceRoles = n.GetCollectionOfObjectValues(AccessPackageResourceRole.CreateFromDiscriminatorValue)?.ToList(); } }, {"accessPackageResources", n => { AccessPackageResources = n.GetCollectionOfObjectValues(AccessPackageResource.CreateFromDiscriminatorValue)?.ToList(); } }, {"accessPackageResourceScopes", n => { AccessPackageResourceScopes = n.GetCollectionOfObjectValues(AccessPackageResourceScope.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -210,6 +225,7 @@ public DateTimeOffset? ModifiedDateTime { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteCollectionOfObjectValues("accessPackageCustomWorkflowExtensions", AccessPackageCustomWorkflowExtensions); writer.WriteCollectionOfObjectValues("accessPackageResourceRoles", AccessPackageResourceRoles); writer.WriteCollectionOfObjectValues("accessPackageResources", AccessPackageResources); writer.WriteCollectionOfObjectValues("accessPackageResourceScopes", AccessPackageResourceScopes); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs index 1b111164ce2..afba7f54b48 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs @@ -4,12 +4,7 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - public class AccessReviewCollectionResponse : BaseCollectionPaginationCountResponse, IAdditionalDataHolder, 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); } - } + public class AccessReviewCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -24,12 +19,6 @@ public List Value { set { BackingStore?.Set("value", value); } } #endif - /// - /// Instantiates a new AccessReviewCollectionResponse and sets the default values. - /// - public AccessReviewCollectionResponse() : base() { - AdditionalData = new Dictionary(); - } /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,7 +43,6 @@ public AccessReviewCollectionResponse() : base() { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); - writer.WriteAdditionalData(AdditionalData); } } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs b/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs new file mode 100644 index 00000000000..be77b29cdc4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class AzureAdPopTokenAuthentication : CustomExtensionAuthenticationConfiguration, IParsable { + /// + /// Instantiates a new AzureAdPopTokenAuthentication and sets the default values. + /// + public AzureAdPopTokenAuthentication() : base() { + OdataType = "#microsoft.graph.azureAdPopTokenAuthentication"; + } + /// + /// 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 new AzureAdPopTokenAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AzureAdPopTokenAuthentication(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs index 5e765ba5351..65f092fd355 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs @@ -16,7 +16,7 @@ public DateTimeOffset? LastModifiedDateTime { set { BackingStore?.Set("lastModifiedDateTime", value); } } /// - /// Instantiates a new customAccessPackageWorkflowExtension and sets the default values. + /// Instantiates a new CustomAccessPackageWorkflowExtension and sets the default values. /// public CustomAccessPackageWorkflowExtension() : base() { OdataType = "#microsoft.graph.customAccessPackageWorkflowExtension"; diff --git a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs index 4e71e3b4d31..c9ef7dd9903 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs @@ -84,6 +84,8 @@ public CustomExtensionEndpointConfiguration EndpointConfiguration { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { + "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension" => new AccessPackageAssignmentRequestWorkflowExtension(), + "#microsoft.graph.accessPackageAssignmentWorkflowExtension" => new AccessPackageAssignmentWorkflowExtension(), "#microsoft.graph.customAccessPackageWorkflowExtension" => new CustomAccessPackageWorkflowExtension(), "#microsoft.graph.customAuthenticationExtension" => new CustomAuthenticationExtension(), "#microsoft.graph.identityGovernance.customTaskExtension" => new CustomTaskExtension(), diff --git a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs new file mode 100644 index 00000000000..d6786a5a024 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class CustomCalloutExtensionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new CustomCalloutExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CustomCalloutExtensionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(CustomCalloutExtension.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs index da280fa24e0..37fc4e73b63 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs @@ -42,6 +42,7 @@ public static CustomExtensionAuthenticationConfiguration CreateFromDiscriminator _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { + "#microsoft.graph.azureAdPopTokenAuthentication" => new AzureAdPopTokenAuthentication(), "#microsoft.graph.azureAdTokenAuthentication" => new AzureAdTokenAuthentication(), _ => new CustomExtensionAuthenticationConfiguration(), }; diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs index 2c93f9de299..1c1f84c3c83 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs @@ -28,7 +28,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Callback time out in ISO 8601 time duration. Accepted time durations are between five minutes to three hours. For example, PT5M for five minutes and PT3H for three hours. + /// The maximum duration in ISO 8601 format that Azure AD will wait for a resume action for the callout it sent to the logic app. The valid range for custom extensions in lifecycle workflows is five minutes to three hours. The valid range for custom extensions in entitlement management is between 5 minutes and 14 days. For example, PT3H refers to three hours, P3D refers to three days, PT10M refers to ten minutes. public TimeSpan? TimeoutDuration { get { return BackingStore?.Get("timeoutDuration"); } set { BackingStore?.Set("timeoutDuration", value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs new file mode 100644 index 00000000000..44856869f7f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs @@ -0,0 +1,134 @@ +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.Beta.Models { + public class CustomExtensionCalloutInstance : 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; } + /// Identification of the custom extension that was triggered at this instance. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CustomExtensionId { + get { return BackingStore?.Get("customExtensionId"); } + set { BackingStore?.Set("customExtensionId", value); } + } +#nullable restore +#else + public string CustomExtensionId { + get { return BackingStore?.Get("customExtensionId"); } + set { BackingStore?.Set("customExtensionId", value); } + } +#endif + /// Details provided by the logic app during the callback of the request instance. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Detail { + get { return BackingStore?.Get("detail"); } + set { BackingStore?.Set("detail", value); } + } +#nullable restore +#else + public string Detail { + get { return BackingStore?.Get("detail"); } + set { BackingStore?.Set("detail", value); } + } +#endif + /// The unique run identifier for the logic app. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ExternalCorrelationId { + get { return BackingStore?.Get("externalCorrelationId"); } + set { BackingStore?.Set("externalCorrelationId", value); } + } +#nullable restore +#else + public string ExternalCorrelationId { + get { return BackingStore?.Get("externalCorrelationId"); } + set { BackingStore?.Set("externalCorrelationId", value); } + } +#endif + /// Unique identifier for the callout instance. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#nullable restore +#else + public string Id { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#endif + /// 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 status of the request to the custom extension. The possible values are: calloutSent, callbackReceived, calloutFailed, callbackTimedOut, waitingForCallback, unknownFutureValue. + public CustomExtensionCalloutInstanceStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// Instantiates a new customExtensionCalloutInstance and sets the default values. + /// + public CustomExtensionCalloutInstance() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 CustomExtensionCalloutInstance CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CustomExtensionCalloutInstance(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"customExtensionId", n => { CustomExtensionId = n.GetStringValue(); } }, + {"detail", n => { Detail = n.GetStringValue(); } }, + {"externalCorrelationId", n => { ExternalCorrelationId = n.GetStringValue(); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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("customExtensionId", CustomExtensionId); + writer.WriteStringValue("detail", Detail); + writer.WriteStringValue("externalCorrelationId", ExternalCorrelationId); + writer.WriteStringValue("id", Id); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceCollectionResponse.cs new file mode 100644 index 00000000000..06f3fa65fa4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class CustomExtensionCalloutInstanceCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new CustomExtensionCalloutInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CustomExtensionCalloutInstanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(CustomExtensionCalloutInstance.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceStatus.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceStatus.cs new file mode 100644 index 00000000000..2d7ba58330c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstanceStatus.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Graph.Beta.Models { + public enum CustomExtensionCalloutInstanceStatus { + CalloutSent, + CallbackReceived, + CalloutFailed, + CallbackTimedOut, + WaitingForCallback, + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs index 0c100ddc7fc..a5a1424c4d3 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs @@ -43,6 +43,7 @@ public static CustomExtensionData CreateFromDiscriminatorValue(IParseNode parseN _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { + "#microsoft.graph.accessPackageAssignmentRequestCallbackData" => new AccessPackageAssignmentRequestCallbackData(), "#microsoft.graph.identityGovernance.customTaskExtensionCallbackData" => new CustomTaskExtensionCallbackData(), "#microsoft.graph.identityGovernance.customTaskExtensionCalloutData" => new CustomTaskExtensionCalloutData(), _ => new CustomExtensionData(), diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs new file mode 100644 index 00000000000..c6ca2aa0255 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs @@ -0,0 +1,55 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class CustomExtensionStageSetting : Entity, IParsable { + /// Indicates the custom workflow extension that will be executed at this stage. Nullable. Supports $expand. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public CustomCalloutExtension? CustomExtension { + get { return BackingStore?.Get("customExtension"); } + set { BackingStore?.Set("customExtension", value); } + } +#nullable restore +#else + public CustomCalloutExtension CustomExtension { + get { return BackingStore?.Get("customExtension"); } + set { BackingStore?.Set("customExtension", value); } + } +#endif + /// The stage property + public AccessPackageCustomExtensionStage? Stage { + get { return BackingStore?.Get("stage"); } + set { BackingStore?.Set("stage", value); } + } + /// + /// 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 new CustomExtensionStageSetting CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CustomExtensionStageSetting(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"customExtension", n => { CustomExtension = n.GetObjectValue(CustomCalloutExtension.CreateFromDiscriminatorValue); } }, + {"stage", n => { Stage = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("customExtension", CustomExtension); + writer.WriteEnumValue("stage", Stage); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs new file mode 100644 index 00000000000..a1e707b62a4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class CustomExtensionStageSettingCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new CustomExtensionStageSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CustomExtensionStageSettingCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(CustomExtensionStageSetting.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs index 2fabc5de6d4..c0e49645de0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// The Base Class of Device Enrollment Configuration - /// public class DeviceEnrollmentConfiguration : Entity, IParsable { /// The list of group assignments for the device configuration profile #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs index 4783c24088f..08770101f24 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs @@ -8,7 +8,7 @@ namespace Microsoft.Graph.Beta.Models { /// Setting instance within policy /// public class DeviceManagementConfigurationSetting : Entity, IParsable { - /// List of related Setting Definitions. This property is read-only. + /// List of related Setting Definitions #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? SettingDefinitions { diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs index 8d0bf2b97ef..695b87fdc41 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs @@ -5,12 +5,12 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models { public class DeviceManagementConfigurationSimpleSettingCollectionDefinition : DeviceManagementConfigurationSimpleSettingDefinition, IParsable { - /// Maximum number of simple settings in the collection. Valid values 1 to 100 + /// Maximum number of simple settings in the collection public int? MaximumCount { get { return BackingStore?.Get("maximumCount"); } set { BackingStore?.Set("maximumCount", value); } } - /// Minimum number of simple settings in the collection. Valid values 1 to 100 + /// Minimum number of simple settings in the collection public int? MinimumCount { get { return BackingStore?.Get("minimumCount"); } set { BackingStore?.Set("minimumCount", value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs index 751496fab2a..d3a52ea1bec 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// Event representing an general failure. - /// public class DeviceManagementTroubleshootingEvent : Entity, IParsable { /// A set of string key and string value pairs which provides additional information on the Troubleshooting event #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs index e112851678a..e3db8ce4ea9 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs @@ -20,7 +20,7 @@ public Microsoft.Graph.Beta.Models.Site Site { } #endif /// - /// Instantiates a new siteSource and sets the default values. + /// Instantiates a new SiteSource and sets the default values. /// public SiteSource() : base() { OdataType = "#microsoft.graph.ediscovery.siteSource"; diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs index 8b1763cfc97..dd3f31117c4 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs @@ -25,7 +25,7 @@ public SourceType? IncludedSources { set { BackingStore?.Set("includedSources", value); } } /// - /// Instantiates a new unifiedGroupSource and sets the default values. + /// Instantiates a new UnifiedGroupSource and sets the default values. /// public UnifiedGroupSource() : base() { OdataType = "#microsoft.graph.ediscovery.unifiedGroupSource"; diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs index 50ff284df5c..8aabfd0262e 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs @@ -39,7 +39,7 @@ public string SiteWebUrl { } #endif /// - /// Instantiates a new userSource and sets the default values. + /// Instantiates a new UserSource and sets the default values. /// public UserSource() : base() { OdataType = "#microsoft.graph.ediscovery.userSource"; diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs index 36146a87ee3..b64b4d824b3 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// The enrollmentProfile resource represents a collection of configurations which must be provided pre-enrollment to enable enrolling certain devices whose identities have been pre-staged. Pre-staged device identities are assigned to this type of profile to apply the profile's configurations at enrollment of the corresponding device. - /// public class EnrollmentProfile : Entity, IParsable { /// Configuration endpoint url to use for Enrollment #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/Entity.cs b/src/Microsoft.Graph/Generated/Models/Entity.cs index 33020f37b9f..35b0a986eb7 100644 --- a/src/Microsoft.Graph/Generated/Models/Entity.cs +++ b/src/Microsoft.Graph/Generated/Models/Entity.cs @@ -3,6 +3,7 @@ using Microsoft.Graph.Beta.Models.Ediscovery; using Microsoft.Graph.Beta.Models.ExternalConnectors; using Microsoft.Graph.Beta.Models.IdentityGovernance; +using Microsoft.Graph.Beta.Models.IndustryData; using Microsoft.Graph.Beta.Models.ManagedTenants; using Microsoft.Graph.Beta.Models.Search; using Microsoft.Graph.Beta.Models.Security; @@ -72,7 +73,9 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.accessPackageAssignment" => new AccessPackageAssignment(), "#microsoft.graph.accessPackageAssignmentPolicy" => new AccessPackageAssignmentPolicy(), "#microsoft.graph.accessPackageAssignmentRequest" => new AccessPackageAssignmentRequest(), + "#microsoft.graph.accessPackageAssignmentRequestWorkflowExtension" => new AccessPackageAssignmentRequestWorkflowExtension(), "#microsoft.graph.accessPackageAssignmentResourceRole" => new AccessPackageAssignmentResourceRole(), + "#microsoft.graph.accessPackageAssignmentWorkflowExtension" => new AccessPackageAssignmentWorkflowExtension(), "#microsoft.graph.accessPackageCatalog" => new AccessPackageCatalog(), "#microsoft.graph.accessPackageResource" => new AccessPackageResource(), "#microsoft.graph.accessPackageResourceEnvironment" => new AccessPackageResourceEnvironment(), @@ -365,6 +368,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.customerPayment" => new CustomerPayment(), "#microsoft.graph.customerPaymentJournal" => new CustomerPaymentJournal(), "#microsoft.graph.customExtensionHandler" => new CustomExtensionHandler(), + "#microsoft.graph.customExtensionStageSetting" => new CustomExtensionStageSetting(), "#microsoft.graph.customSecurityAttributeDefinition" => new CustomSecurityAttributeDefinition(), "#microsoft.graph.dataClassificationService" => new DataClassificationService(), "#microsoft.graph.dataLossPreventionPolicy" => new DataLossPreventionPolicy(), @@ -711,6 +715,23 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.importedDeviceIdentityResult" => new ImportedDeviceIdentityResult(), "#microsoft.graph.importedWindowsAutopilotDeviceIdentity" => new ImportedWindowsAutopilotDeviceIdentity(), "#microsoft.graph.importedWindowsAutopilotDeviceIdentityUpload" => new ImportedWindowsAutopilotDeviceIdentityUpload(), + "#microsoft.graph.industryData.azureDataLakeConnector" => new AzureDataLakeConnector(), + "#microsoft.graph.industryData.fileDataConnector" => new FileDataConnector(), + "#microsoft.graph.industryData.fileValidateOperation" => new FileValidateOperation(), + "#microsoft.graph.industryData.inboundFileFlow" => new InboundFileFlow(), + "#microsoft.graph.industryData.inboundFlow" => new InboundFlow(), + "#microsoft.graph.industryData.inboundFlowActivity" => new InboundFlowActivity(), + "#microsoft.graph.industryData.industryDataActivity" => new IndustryDataActivity(), + "#microsoft.graph.industryData.industryDataConnector" => new IndustryDataConnector(), + "#microsoft.graph.industryData.industryDataRoot" => new IndustryDataRoot(), + "#microsoft.graph.industryData.industryDataRun" => new IndustryDataRun(), + "#microsoft.graph.industryData.industryDataRunActivity" => new IndustryDataRunActivity(), + "#microsoft.graph.industryData.outboundFlowActivity" => new OutboundFlowActivity(), + "#microsoft.graph.industryData.referenceDefinition" => new ReferenceDefinition(), + "#microsoft.graph.industryData.roleGroup" => new RoleGroup(), + "#microsoft.graph.industryData.sourceSystemDefinition" => new SourceSystemDefinition(), + "#microsoft.graph.industryData.validateOperation" => new ValidateOperation(), + "#microsoft.graph.industryData.yearTimePeriodDefinition" => new YearTimePeriodDefinition(), "#microsoft.graph.inferenceClassification" => new InferenceClassification(), "#microsoft.graph.inferenceClassificationOverride" => new InferenceClassificationOverride(), "#microsoft.graph.informationProtection" => new InformationProtection(), diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs index ffa88a7a2e3..66edb6d6304 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Beta.Models.IndustryData; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions.Store; using System; @@ -26,6 +27,20 @@ public List Connections { get { return BackingStore?.Get>("connections"); } set { BackingStore?.Set("connections", value); } } +#endif + /// The industryData property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataRoot? IndustryData { + get { return BackingStore?.Get("industryData"); } + set { BackingStore?.Set("industryData", value); } + } +#nullable restore +#else + public IndustryDataRoot IndustryData { + get { return BackingStore?.Get("industryData"); } + set { BackingStore?.Set("industryData", value); } + } #endif /// The OdataType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -62,6 +77,7 @@ public static External CreateFromDiscriminatorValue(IParseNode parseNode) { public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"connections", n => { Connections = n.GetCollectionOfObjectValues(ExternalConnection.CreateFromDiscriminatorValue)?.ToList(); } }, + {"industryData", n => { IndustryData = n.GetObjectValue(IndustryDataRoot.CreateFromDiscriminatorValue); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, }; } @@ -72,6 +88,7 @@ public IDictionary> GetFieldDeserializers() { public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("connections", Connections); + writer.WriteObjectValue("industryData", IndustryData); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Group.cs b/src/Microsoft.Graph/Generated/Models/Group.cs index a29fad94035..3aa96050882 100644 --- a/src/Microsoft.Graph/Generated/Models/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/Group.cs @@ -909,7 +909,7 @@ public GroupWritebackConfiguration WritebackConfiguration { } #endif /// - /// Instantiates a new Group and sets the default values. + /// Instantiates a new group and sets the default values. /// public Group() : base() { OdataType = "#microsoft.graph.group"; diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs index 26425c8a96e..4ee7ce2cf65 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs @@ -5,6 +5,20 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models.IdentityGovernance { public class CustomTaskExtensionCallbackConfiguration : CustomExtensionCallbackConfiguration, IParsable { + /// The authorizedApps property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AuthorizedApps { + get { return BackingStore?.Get?>("authorizedApps"); } + set { BackingStore?.Set("authorizedApps", value); } + } +#nullable restore +#else + public List AuthorizedApps { + get { return BackingStore?.Get>("authorizedApps"); } + set { BackingStore?.Set("authorizedApps", value); } + } +#endif /// /// Instantiates a new CustomTaskExtensionCallbackConfiguration and sets the default values. /// @@ -24,6 +38,7 @@ public CustomTaskExtensionCallbackConfiguration() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"authorizedApps", n => { AuthorizedApps = n.GetCollectionOfObjectValues(Microsoft.Graph.Beta.Models.Application.CreateFromDiscriminatorValue)?.ToList(); } }, }; } /// @@ -33,6 +48,7 @@ public CustomTaskExtensionCallbackConfiguration() : base() { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteCollectionOfObjectValues("authorizedApps", AuthorizedApps); } } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs index e8d1831fcd9..aed33637974 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs @@ -43,6 +43,20 @@ public DateTimeOffset? NextScheduleRunDateTime { get { return BackingStore?.Get("nextScheduleRunDateTime"); } set { BackingStore?.Set("nextScheduleRunDateTime", value); } } + /// 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 runs property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -105,7 +119,7 @@ public List Versions { } #endif /// - /// Instantiates a new Workflow and sets the default values. + /// Instantiates a new workflow and sets the default values. /// public Workflow() : base() { OdataType = "#microsoft.graph.identityGovernance.workflow"; @@ -127,6 +141,7 @@ public Workflow() : base() { {"executionScope", n => { ExecutionScope = n.GetCollectionOfObjectValues(Microsoft.Graph.Beta.Models.User.CreateFromDiscriminatorValue)?.ToList(); } }, {"id", n => { Id = n.GetStringValue(); } }, {"nextScheduleRunDateTime", n => { NextScheduleRunDateTime = n.GetDateTimeOffsetValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, {"runs", n => { Runs = n.GetCollectionOfObjectValues(Run.CreateFromDiscriminatorValue)?.ToList(); } }, {"taskReports", n => { TaskReports = n.GetCollectionOfObjectValues(TaskReport.CreateFromDiscriminatorValue)?.ToList(); } }, {"userProcessingResults", n => { UserProcessingResults = n.GetCollectionOfObjectValues(UserProcessingResult.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -145,6 +160,7 @@ public Workflow() : base() { writer.WriteCollectionOfObjectValues("executionScope", ExecutionScope); writer.WriteStringValue("id", Id); writer.WriteDateTimeOffsetValue("nextScheduleRunDateTime", NextScheduleRunDateTime); + writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("runs", Runs); writer.WriteCollectionOfObjectValues("taskReports", TaskReports); writer.WriteCollectionOfObjectValues("userProcessingResults", UserProcessingResults); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs index 10dd71dde2d..f9d3d6b364e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs @@ -5,6 +5,20 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models.IdentityGovernance { public class WorkflowVersion : WorkflowBase, IParsable { + /// 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 version of the workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. public int? VersionNumber { get { return BackingStore?.Get("versionNumber"); } @@ -29,6 +43,7 @@ public WorkflowVersion() : base() { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, {"versionNumber", n => { VersionNumber = n.GetIntValue(); } }, }; } @@ -39,6 +54,7 @@ public WorkflowVersion() : base() { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("versionNumber", VersionNumber); } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentitySet.cs b/src/Microsoft.Graph/Generated/Models/IdentitySet.cs index c3b1fd80ac9..b8e8c361bc4 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentitySet.cs @@ -11,7 +11,7 @@ public IDictionary AdditionalData { get { return BackingStore?.Get>("additionalData"); } set { BackingStore?.Set("additionalData", value); } } - /// Optional. The application associated with this action. + /// The Identity of the Application. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Identity? Application { @@ -27,7 +27,7 @@ public Identity Application { #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// Optional. The device associated with this action. + /// The Identity of the Device. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Identity? Device { @@ -55,7 +55,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Optional. The user associated with this action. + /// The Identity of the User. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Identity? User { diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs new file mode 100644 index 00000000000..97dc6e8a4bf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs @@ -0,0 +1,129 @@ +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.Beta.Models.IndustryData { + public class AggregatedInboundStatistics : 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 aggregate count of errors encountered by activities during this run. + public int? Errors { + get { return BackingStore?.Get("errors"); } + set { BackingStore?.Set("errors", value); } + } + /// The aggregate count of active inbound groups processed during the run. + public int? Groups { + get { return BackingStore?.Get("groups"); } + set { BackingStore?.Set("groups", value); } + } + /// The aggregate count of active people matched to an Azure Active Directory user, by role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MatchedPeopleByRole { + get { return BackingStore?.Get?>("matchedPeopleByRole"); } + set { BackingStore?.Set("matchedPeopleByRole", value); } + } +#nullable restore +#else + public List MatchedPeopleByRole { + get { return BackingStore?.Get>("matchedPeopleByRole"); } + set { BackingStore?.Set("matchedPeopleByRole", value); } + } +#endif + /// The aggregate count of active inbound memberships processed during the run. + public int? Memberships { + get { return BackingStore?.Get("memberships"); } + set { BackingStore?.Set("memberships", value); } + } + /// 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 aggregate count of active inbound organizations processed during the run. + public int? Organizations { + get { return BackingStore?.Get("organizations"); } + set { BackingStore?.Set("organizations", value); } + } + /// The aggregate count of active inbound people processed during the run. + public int? People { + get { return BackingStore?.Get("people"); } + set { BackingStore?.Set("people", value); } + } + /// The aggregate count of active people not matched to an Azure Active Directory user, by role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UnmatchedPeopleByRole { + get { return BackingStore?.Get?>("unmatchedPeopleByRole"); } + set { BackingStore?.Set("unmatchedPeopleByRole", value); } + } +#nullable restore +#else + public List UnmatchedPeopleByRole { + get { return BackingStore?.Get>("unmatchedPeopleByRole"); } + set { BackingStore?.Set("unmatchedPeopleByRole", value); } + } +#endif + /// The aggregate count of warnings generated by activities during this run. + public int? Warnings { + get { return BackingStore?.Get("warnings"); } + set { BackingStore?.Set("warnings", value); } + } + /// + /// Instantiates a new aggregatedInboundStatistics and sets the default values. + /// + public AggregatedInboundStatistics() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 AggregatedInboundStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AggregatedInboundStatistics(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"errors", n => { Errors = n.GetIntValue(); } }, + {"groups", n => { Groups = n.GetIntValue(); } }, + {"matchedPeopleByRole", n => { MatchedPeopleByRole = n.GetCollectionOfObjectValues(IndustryDataRunRoleCountMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + {"memberships", n => { Memberships = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"organizations", n => { Organizations = n.GetIntValue(); } }, + {"people", n => { People = n.GetIntValue(); } }, + {"unmatchedPeopleByRole", n => { UnmatchedPeopleByRole = n.GetCollectionOfObjectValues(IndustryDataRunRoleCountMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + {"warnings", n => { Warnings = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs new file mode 100644 index 00000000000..e92414f647e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class AzureDataLakeConnector : FileDataConnector, IParsable { + /// + /// Instantiates a new AzureDataLakeConnector and sets the default values. + /// + public AzureDataLakeConnector() : base() { + OdataType = "#microsoft.graph.industryData.azureDataLakeConnector"; + } + /// + /// 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 new AzureDataLakeConnector CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AzureDataLakeConnector(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnectorCollectionResponse.cs new file mode 100644 index 00000000000..5e0bae310af --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnectorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class AzureDataLakeConnectorCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new AzureDataLakeConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AzureDataLakeConnectorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AzureDataLakeConnector.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs new file mode 100644 index 00000000000..bc62e46c8fc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs @@ -0,0 +1,42 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class FileDataConnector : IndustryDataConnector, IParsable { + /// + /// Instantiates a new FileDataConnector and sets the default values. + /// + public FileDataConnector() : base() { + OdataType = "#microsoft.graph.industryData.fileDataConnector"; + } + /// + /// 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 new FileDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.azureDataLakeConnector" => new AzureDataLakeConnector(), + _ => new FileDataConnector(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnectorCollectionResponse.cs new file mode 100644 index 00000000000..f84d25016b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnectorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class FileDataConnectorCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new FileDataConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FileDataConnectorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FileDataConnector.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs new file mode 100644 index 00000000000..ab43d469ab8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs @@ -0,0 +1,53 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class FileValidateOperation : ValidateOperation, IParsable { + /// Set of files validated by the validate operation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ValidatedFiles { + get { return BackingStore?.Get?>("validatedFiles"); } + set { BackingStore?.Set("validatedFiles", value); } + } +#nullable restore +#else + public List ValidatedFiles { + get { return BackingStore?.Get>("validatedFiles"); } + set { BackingStore?.Set("validatedFiles", value); } + } +#endif + /// + /// Instantiates a new FileValidateOperation and sets the default values. + /// + public FileValidateOperation() : base() { + OdataType = "#microsoft.graph.industryData.fileValidateOperation"; + } + /// + /// 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 new FileValidateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FileValidateOperation(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"validatedFiles", n => { ValidatedFiles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperationCollectionResponse.cs new file mode 100644 index 00000000000..aadb9ac20a0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperationCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class FileValidateOperationCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new FileValidateOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FileValidateOperationCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FileValidateOperation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs new file mode 100644 index 00000000000..b23be259037 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IdentifierTypeReferenceValue : ReferenceValue, IParsable { + /// + /// Instantiates a new IdentifierTypeReferenceValue and sets the default values. + /// + public IdentifierTypeReferenceValue() : base() { + OdataType = "#microsoft.graph.industryData.identifierTypeReferenceValue"; + } + /// + /// 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 new IdentifierTypeReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IdentifierTypeReferenceValue(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs new file mode 100644 index 00000000000..607851f6730 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs @@ -0,0 +1,140 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundActivityResults : IndustryDataActivityStatistics, IParsable { + /// Number of errors encountered while processing the inbound flow. + public int? Errors { + get { return BackingStore?.Get("errors"); } + set { BackingStore?.Set("errors", value); } + } + /// Counts of active and inactive groups processed by the inbound flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataRunEntityCountMetric? Groups { + get { return BackingStore?.Get("groups"); } + set { BackingStore?.Set("groups", value); } + } +#nullable restore +#else + public IndustryDataRunEntityCountMetric Groups { + get { return BackingStore?.Get("groups"); } + set { BackingStore?.Set("groups", value); } + } +#endif + /// Number of people matched to an Azure Active Directory user, by role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MatchedPeopleByRole { + get { return BackingStore?.Get?>("matchedPeopleByRole"); } + set { BackingStore?.Set("matchedPeopleByRole", value); } + } +#nullable restore +#else + public List MatchedPeopleByRole { + get { return BackingStore?.Get>("matchedPeopleByRole"); } + set { BackingStore?.Set("matchedPeopleByRole", value); } + } +#endif + /// Counts of active and inactive memberships processed by the inbound flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataRunEntityCountMetric? Memberships { + get { return BackingStore?.Get("memberships"); } + set { BackingStore?.Set("memberships", value); } + } +#nullable restore +#else + public IndustryDataRunEntityCountMetric Memberships { + get { return BackingStore?.Get("memberships"); } + set { BackingStore?.Set("memberships", value); } + } +#endif + /// Counts of active and inactive organizations processed by the inbound flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataRunEntityCountMetric? Organizations { + get { return BackingStore?.Get("organizations"); } + set { BackingStore?.Set("organizations", value); } + } +#nullable restore +#else + public IndustryDataRunEntityCountMetric Organizations { + get { return BackingStore?.Get("organizations"); } + set { BackingStore?.Set("organizations", value); } + } +#endif + /// Counts of active and inactive people processed by the inbound flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataRunEntityCountMetric? People { + get { return BackingStore?.Get("people"); } + set { BackingStore?.Set("people", value); } + } +#nullable restore +#else + public IndustryDataRunEntityCountMetric People { + get { return BackingStore?.Get("people"); } + set { BackingStore?.Set("people", value); } + } +#endif + /// Number of people not matched to an Azure Active Directory user, by role. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UnmatchedPeopleByRole { + get { return BackingStore?.Get?>("unmatchedPeopleByRole"); } + set { BackingStore?.Set("unmatchedPeopleByRole", value); } + } +#nullable restore +#else + public List UnmatchedPeopleByRole { + get { return BackingStore?.Get>("unmatchedPeopleByRole"); } + set { BackingStore?.Set("unmatchedPeopleByRole", value); } + } +#endif + /// Number of warnings encountered while processing the inbound flow. + public int? Warnings { + get { return BackingStore?.Get("warnings"); } + set { BackingStore?.Set("warnings", value); } + } + /// + /// Instantiates a new InboundActivityResults and sets the default values. + /// + public InboundActivityResults() : base() { + OdataType = "#microsoft.graph.industryData.inboundActivityResults"; + } + /// + /// 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 new InboundActivityResults CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundActivityResults(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"errors", n => { Errors = n.GetIntValue(); } }, + {"groups", n => { Groups = n.GetObjectValue(IndustryDataRunEntityCountMetric.CreateFromDiscriminatorValue); } }, + {"matchedPeopleByRole", n => { MatchedPeopleByRole = n.GetCollectionOfObjectValues(IndustryDataRunRoleCountMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + {"memberships", n => { Memberships = n.GetObjectValue(IndustryDataRunEntityCountMetric.CreateFromDiscriminatorValue); } }, + {"organizations", n => { Organizations = n.GetObjectValue(IndustryDataRunEntityCountMetric.CreateFromDiscriminatorValue); } }, + {"people", n => { People = n.GetObjectValue(IndustryDataRunEntityCountMetric.CreateFromDiscriminatorValue); } }, + {"unmatchedPeopleByRole", n => { UnmatchedPeopleByRole = n.GetCollectionOfObjectValues(IndustryDataRunRoleCountMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + {"warnings", n => { Warnings = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundDomain.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundDomain.cs new file mode 100644 index 00000000000..922ed2b8d54 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundDomain.cs @@ -0,0 +1,6 @@ +namespace Microsoft.Graph.Beta.Models.IndustryData { + public enum InboundDomain { + EducationRostering, + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs new file mode 100644 index 00000000000..a404bcb73aa --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFileFlow : InboundFlow, IParsable { + /// + /// Instantiates a new InboundFileFlow and sets the default values. + /// + public InboundFileFlow() : base() { + OdataType = "#microsoft.graph.industryData.inboundFileFlow"; + } + /// + /// 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 new InboundFileFlow CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundFileFlow(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlowCollectionResponse.cs new file mode 100644 index 00000000000..75e7f157e18 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlowCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFileFlowCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new InboundFileFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundFileFlowCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(InboundFileFlow.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs new file mode 100644 index 00000000000..8d16de69abb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFlow : IndustryDataActivity, IParsable { + /// The dataConnector property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataConnector? DataConnector { + get { return BackingStore?.Get("dataConnector"); } + set { BackingStore?.Set("dataConnector", value); } + } +#nullable restore +#else + public IndustryDataConnector DataConnector { + get { return BackingStore?.Get("dataConnector"); } + set { BackingStore?.Set("dataConnector", value); } + } +#endif + /// The dataDomain property + public InboundDomain? DataDomain { + get { return BackingStore?.Get("dataDomain"); } + set { BackingStore?.Set("dataDomain", value); } + } + /// The start of the time window when the flow is allowed to run. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? EffectiveDateTime { + get { return BackingStore?.Get("effectiveDateTime"); } + set { BackingStore?.Set("effectiveDateTime", value); } + } + /// The end of the time window when the flow is allowed to run. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? ExpirationDateTime { + get { return BackingStore?.Get("expirationDateTime"); } + set { BackingStore?.Set("expirationDateTime", value); } + } + /// The year property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public YearTimePeriodDefinition? Year { + get { return BackingStore?.Get("year"); } + set { BackingStore?.Set("year", value); } + } +#nullable restore +#else + public YearTimePeriodDefinition Year { + get { return BackingStore?.Get("year"); } + set { BackingStore?.Set("year", value); } + } +#endif + /// + /// Instantiates a new InboundFlow and sets the default values. + /// + public InboundFlow() : base() { + OdataType = "#microsoft.graph.industryData.inboundFlow"; + } + /// + /// 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 new InboundFlow CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.inboundFileFlow" => new InboundFileFlow(), + _ => new InboundFlow(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"dataConnector", n => { DataConnector = n.GetObjectValue(IndustryDataConnector.CreateFromDiscriminatorValue); } }, + {"dataDomain", n => { DataDomain = n.GetEnumValue(); } }, + {"effectiveDateTime", n => { EffectiveDateTime = n.GetDateTimeOffsetValue(); } }, + {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + {"year", n => { Year = n.GetObjectValue(YearTimePeriodDefinition.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("dataConnector", DataConnector); + writer.WriteEnumValue("dataDomain", DataDomain); + writer.WriteDateTimeOffsetValue("effectiveDateTime", EffectiveDateTime); + writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); + writer.WriteObjectValue("year", Year); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs new file mode 100644 index 00000000000..fdc3a5748a7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFlowActivity : IndustryDataRunActivity, IParsable { + /// + /// Instantiates a new InboundFlowActivity and sets the default values. + /// + public InboundFlowActivity() : base() { + OdataType = "#microsoft.graph.industryData.inboundFlowActivity"; + } + /// + /// 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 new InboundFlowActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundFlowActivity(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivityCollectionResponse.cs new file mode 100644 index 00000000000..b0d03ec6c7e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivityCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFlowActivityCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new InboundFlowActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundFlowActivityCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(InboundFlowActivity.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs new file mode 100644 index 00000000000..91ad69d53c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class InboundFlowCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new InboundFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new InboundFlowCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(InboundFlow.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs new file mode 100644 index 00000000000..4d39b02d46b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs @@ -0,0 +1,60 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataActivity : Entity, IParsable { + /// The name of the activity. Maximum supported length is 100 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The readinessStatus property + public Microsoft.Graph.Beta.Models.IndustryData.ReadinessStatus? ReadinessStatus { + get { return BackingStore?.Get("readinessStatus"); } + set { BackingStore?.Set("readinessStatus", value); } + } + /// + /// 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 new IndustryDataActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.inboundFileFlow" => new InboundFileFlow(), + "#microsoft.graph.industryData.inboundFlow" => new InboundFlow(), + _ => new IndustryDataActivity(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"readinessStatus", n => { ReadinessStatus = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteEnumValue("readinessStatus", ReadinessStatus); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs new file mode 100644 index 00000000000..a7b696df3ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs @@ -0,0 +1,104 @@ +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.Beta.Models.IndustryData { + public class IndustryDataActivityStatistics : IAdditionalDataHolder, IBackedModel, IParsable { + /// The identifier for the activity that is being reported on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActivityId { + get { return BackingStore?.Get("activityId"); } + set { BackingStore?.Set("activityId", value); } + } +#nullable restore +#else + public string ActivityId { + get { return BackingStore?.Get("activityId"); } + set { BackingStore?.Set("activityId", value); } + } +#endif + /// 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 display name of the underlying flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// 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 status property + public IndustryDataActivityStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// Instantiates a new industryDataActivityStatistics and sets the default values. + /// + public IndustryDataActivityStatistics() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 IndustryDataActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.inboundActivityResults" => new InboundActivityResults(), + _ => new IndustryDataActivityStatistics(), + }; + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"activityId", n => { ActivityId = n.GetStringValue(); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatisticsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatisticsCollectionResponse.cs new file mode 100644 index 00000000000..7be1864fc0c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatisticsCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataActivityStatisticsCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new IndustryDataActivityStatisticsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataActivityStatisticsCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IndustryDataActivityStatistics.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatus.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatus.cs new file mode 100644 index 00000000000..30babfcce35 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatus.cs @@ -0,0 +1,11 @@ +namespace Microsoft.Graph.Beta.Models.IndustryData { + public enum IndustryDataActivityStatus { + InProgress, + Skipped, + Failed, + Completed, + CompletedWithErrors, + CompletedWithWarnings, + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs new file mode 100644 index 00000000000..774b3072256 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs @@ -0,0 +1,69 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataConnector : Entity, IParsable { + /// The name of the data connector. Maximum supported length is 100 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The sourceSystem property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SourceSystemDefinition? SourceSystem { + get { return BackingStore?.Get("sourceSystem"); } + set { BackingStore?.Set("sourceSystem", value); } + } +#nullable restore +#else + public SourceSystemDefinition SourceSystem { + get { return BackingStore?.Get("sourceSystem"); } + set { BackingStore?.Set("sourceSystem", value); } + } +#endif + /// + /// 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 new IndustryDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.azureDataLakeConnector" => new AzureDataLakeConnector(), + "#microsoft.graph.industryData.fileDataConnector" => new FileDataConnector(), + _ => new IndustryDataConnector(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"sourceSystem", n => { SourceSystem = n.GetObjectValue(SourceSystemDefinition.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteObjectValue("sourceSystem", SourceSystem); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs new file mode 100644 index 00000000000..11f89568263 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataConnectorCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new IndustryDataConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataConnectorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IndustryDataConnector.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs new file mode 100644 index 00000000000..e92ee3616ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs @@ -0,0 +1,160 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRoot : Entity, IParsable { + /// Set of connectors for importing data from source systems. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? DataConnectors { + get { return BackingStore?.Get?>("dataConnectors"); } + set { BackingStore?.Set("dataConnectors", value); } + } +#nullable restore +#else + public List DataConnectors { + get { return BackingStore?.Get>("dataConnectors"); } + set { BackingStore?.Set("dataConnectors", value); } + } +#endif + /// Set of data import flow activities to bring data into the canonical store via a connector. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? InboundFlows { + get { return BackingStore?.Get?>("inboundFlows"); } + set { BackingStore?.Set("inboundFlows", value); } + } +#nullable restore +#else + public List InboundFlows { + get { return BackingStore?.Get>("inboundFlows"); } + set { BackingStore?.Set("inboundFlows", value); } + } +#endif + /// Set of ephemeral operations that the system runs currently. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Operations { + get { return BackingStore?.Get?>("operations"); } + set { BackingStore?.Set("operations", value); } + } +#nullable restore +#else + public List Operations { + get { return BackingStore?.Get>("operations"); } + set { BackingStore?.Set("operations", value); } + } +#endif + /// Set of user modifiable system picker types. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ReferenceDefinitions { + get { return BackingStore?.Get?>("referenceDefinitions"); } + set { BackingStore?.Set("referenceDefinitions", value); } + } +#nullable restore +#else + public List ReferenceDefinitions { + get { return BackingStore?.Get>("referenceDefinitions"); } + set { BackingStore?.Set("referenceDefinitions", value); } + } +#endif + /// Set of groups of individual roles that makes role-based admin simpler. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? RoleGroups { + get { return BackingStore?.Get?>("roleGroups"); } + set { BackingStore?.Set("roleGroups", value); } + } +#nullable restore +#else + public List RoleGroups { + get { return BackingStore?.Get>("roleGroups"); } + set { BackingStore?.Set("roleGroups", value); } + } +#endif + /// Set of ephemeral runs which present the point-in-time that diagnostic state of activities performed by the system. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Runs { + get { return BackingStore?.Get?>("runs"); } + set { BackingStore?.Set("runs", value); } + } +#nullable restore +#else + public List Runs { + get { return BackingStore?.Get>("runs"); } + set { BackingStore?.Set("runs", value); } + } +#endif + /// Set of source definitions that represents real-world external systems. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SourceSystems { + get { return BackingStore?.Get?>("sourceSystems"); } + set { BackingStore?.Set("sourceSystems", value); } + } +#nullable restore +#else + public List SourceSystems { + get { return BackingStore?.Get>("sourceSystems"); } + set { BackingStore?.Set("sourceSystems", value); } + } +#endif + /// Set of years represented in the system. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Years { + get { return BackingStore?.Get?>("years"); } + set { BackingStore?.Set("years", value); } + } +#nullable restore +#else + public List Years { + get { return BackingStore?.Get>("years"); } + set { BackingStore?.Set("years", value); } + } +#endif + /// + /// 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 new IndustryDataRoot CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRoot(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"dataConnectors", n => { DataConnectors = n.GetCollectionOfObjectValues(IndustryDataConnector.CreateFromDiscriminatorValue)?.ToList(); } }, + {"inboundFlows", n => { InboundFlows = n.GetCollectionOfObjectValues(InboundFlow.CreateFromDiscriminatorValue)?.ToList(); } }, + {"operations", n => { Operations = n.GetCollectionOfObjectValues(Microsoft.Graph.Beta.Models.LongRunningOperation.CreateFromDiscriminatorValue)?.ToList(); } }, + {"referenceDefinitions", n => { ReferenceDefinitions = n.GetCollectionOfObjectValues(ReferenceDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + {"roleGroups", n => { RoleGroups = n.GetCollectionOfObjectValues(RoleGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + {"runs", n => { Runs = n.GetCollectionOfObjectValues(IndustryDataRun.CreateFromDiscriminatorValue)?.ToList(); } }, + {"sourceSystems", n => { SourceSystems = n.GetCollectionOfObjectValues(SourceSystemDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + {"years", n => { Years = n.GetCollectionOfObjectValues(YearTimePeriodDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("dataConnectors", DataConnectors); + writer.WriteCollectionOfObjectValues("inboundFlows", InboundFlows); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("referenceDefinitions", ReferenceDefinitions); + writer.WriteCollectionOfObjectValues("roleGroups", RoleGroups); + writer.WriteCollectionOfObjectValues("runs", Runs); + writer.WriteCollectionOfObjectValues("sourceSystems", SourceSystems); + writer.WriteCollectionOfObjectValues("years", Years); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs new file mode 100644 index 00000000000..860902592e6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs @@ -0,0 +1,97 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRun : Entity, IParsable { + /// The set of activities performed during the run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Activities { + get { return BackingStore?.Get?>("activities"); } + set { BackingStore?.Set("activities", value); } + } +#nullable restore +#else + public List Activities { + get { return BackingStore?.Get>("activities"); } + set { BackingStore?.Set("activities", value); } + } +#endif + /// An error object to diagnose critical failures in the run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Beta.Models.PublicError? BlockingError { + get { return BackingStore?.Get("blockingError"); } + set { BackingStore?.Set("blockingError", value); } + } +#nullable restore +#else + public Microsoft.Graph.Beta.Models.PublicError BlockingError { + get { return BackingStore?.Get("blockingError"); } + set { BackingStore?.Set("blockingError", value); } + } +#endif + /// The name of the run for rendering in a user interface. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The date and time when the run finished or null if the run is still in-progress. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? EndDateTime { + get { return BackingStore?.Get("endDateTime"); } + set { BackingStore?.Set("endDateTime", value); } + } + /// The date and time when the run started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? StartDateTime { + get { return BackingStore?.Get("startDateTime"); } + set { BackingStore?.Set("startDateTime", value); } + } + /// The status property + public IndustryDataRunStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// 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 new IndustryDataRun CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRun(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activities", n => { Activities = n.GetCollectionOfObjectValues(IndustryDataRunActivity.CreateFromDiscriminatorValue)?.ToList(); } }, + {"blockingError", n => { BlockingError = n.GetObjectValue(Microsoft.Graph.Beta.Models.PublicError.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("activities", Activities); + writer.WriteEnumValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs new file mode 100644 index 00000000000..a816b4a826c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs @@ -0,0 +1,90 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRunActivity : Entity, IParsable { + /// The flow that was run by this activity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IndustryDataActivity? Activity { + get { return BackingStore?.Get("activity"); } + set { BackingStore?.Set("activity", value); } + } +#nullable restore +#else + public IndustryDataActivity Activity { + get { return BackingStore?.Get("activity"); } + set { BackingStore?.Set("activity", value); } + } +#endif + /// An error object to diagnose critical failures in an activity. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Beta.Models.PublicError? BlockingError { + get { return BackingStore?.Get("blockingError"); } + set { BackingStore?.Set("blockingError", value); } + } +#nullable restore +#else + public Microsoft.Graph.Beta.Models.PublicError BlockingError { + get { return BackingStore?.Get("blockingError"); } + set { BackingStore?.Set("blockingError", value); } + } +#endif + /// The name of the running flow. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The status property + public IndustryDataActivityStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// 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 new IndustryDataRunActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.inboundFlowActivity" => new InboundFlowActivity(), + "#microsoft.graph.industryData.outboundFlowActivity" => new OutboundFlowActivity(), + _ => new IndustryDataRunActivity(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"activity", n => { Activity = n.GetObjectValue(IndustryDataActivity.CreateFromDiscriminatorValue); } }, + {"blockingError", n => { BlockingError = n.GetObjectValue(Microsoft.Graph.Beta.Models.PublicError.CreateFromDiscriminatorValue); } }, + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("activity", Activity); + writer.WriteEnumValue("status", Status); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs new file mode 100644 index 00000000000..2ee2f837058 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRunActivityCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new IndustryDataRunActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunActivityCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IndustryDataRunActivity.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs new file mode 100644 index 00000000000..10533f186eb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRunCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new IndustryDataRunCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IndustryDataRun.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs new file mode 100644 index 00000000000..f4cc6a45195 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs @@ -0,0 +1,81 @@ +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.Beta.Models.IndustryData { + public class IndustryDataRunEntityCountMetric : IAdditionalDataHolder, IBackedModel, IParsable { + /// The count of entries for the entity marked as Active. + public int? Active { + get { return BackingStore?.Get("active"); } + set { BackingStore?.Set("active", value); } + } + /// 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 count of entries for the entity marked as Inactive. + public int? Inactive { + get { return BackingStore?.Get("inactive"); } + set { BackingStore?.Set("inactive", value); } + } + /// 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 + /// Total count of the entity. + public int? Total { + get { return BackingStore?.Get("total"); } + set { BackingStore?.Set("total", value); } + } + /// + /// Instantiates a new industryDataRunEntityCountMetric and sets the default values. + /// + public IndustryDataRunEntityCountMetric() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 IndustryDataRunEntityCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunEntityCountMetric(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"active", n => { Active = n.GetIntValue(); } }, + {"inactive", n => { Inactive = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs new file mode 100644 index 00000000000..36858702939 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs @@ -0,0 +1,84 @@ +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.Beta.Models.IndustryData { + public class IndustryDataRunRoleCountMetric : 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 number of people in this role. + public int? Count { + get { return BackingStore?.Get("count"); } + set { BackingStore?.Set("count", value); } + } + /// 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 role that is being measured. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Role { + get { return BackingStore?.Get("role"); } + set { BackingStore?.Set("role", value); } + } +#nullable restore +#else + public string Role { + get { return BackingStore?.Get("role"); } + set { BackingStore?.Set("role", value); } + } +#endif + /// + /// Instantiates a new industryDataRunRoleCountMetric and sets the default values. + /// + public IndustryDataRunRoleCountMetric() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 IndustryDataRunRoleCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunRoleCountMetric(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"count", n => { Count = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"role", n => { Role = 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.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetricCollectionResponse.cs new file mode 100644 index 00000000000..5964742c34e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetricCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class IndustryDataRunRoleCountMetricCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new IndustryDataRunRoleCountMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunRoleCountMetricCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(IndustryDataRunRoleCountMetric.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs new file mode 100644 index 00000000000..010d9d655c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs @@ -0,0 +1,115 @@ +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.Beta.Models.IndustryData { + public class IndustryDataRunStatistics : IAdditionalDataHolder, IBackedModel, IParsable { + /// The collection of statistics for each activity included in this run. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ActivityStatistics { + get { return BackingStore?.Get?>("activityStatistics"); } + set { BackingStore?.Set("activityStatistics", value); } + } +#nullable restore +#else + public List ActivityStatistics { + get { return BackingStore?.Get>("activityStatistics"); } + set { BackingStore?.Set("activityStatistics", value); } + } +#endif + /// 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 aggregate statistics for all inbound flows. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AggregatedInboundStatistics? InboundTotals { + get { return BackingStore?.Get("inboundTotals"); } + set { BackingStore?.Set("inboundTotals", value); } + } +#nullable restore +#else + public AggregatedInboundStatistics InboundTotals { + get { return BackingStore?.Get("inboundTotals"); } + set { BackingStore?.Set("inboundTotals", value); } + } +#endif + /// 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 ID of the underlying run for the statistics. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunId { + get { return BackingStore?.Get("runId"); } + set { BackingStore?.Set("runId", value); } + } +#nullable restore +#else + public string RunId { + get { return BackingStore?.Get("runId"); } + set { BackingStore?.Set("runId", value); } + } +#endif + /// The status property + public IndustryDataRunStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// + /// Instantiates a new industryDataRunStatistics and sets the default values. + /// + public IndustryDataRunStatistics() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 IndustryDataRunStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new IndustryDataRunStatistics(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"activityStatistics", n => { ActivityStatistics = n.GetCollectionOfObjectValues(IndustryDataActivityStatistics.CreateFromDiscriminatorValue)?.ToList(); } }, + {"inboundTotals", n => { InboundTotals = n.GetObjectValue(AggregatedInboundStatistics.CreateFromDiscriminatorValue); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"runId", n => { RunId = n.GetStringValue(); } }, + {"status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatus.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatus.cs new file mode 100644 index 00000000000..7bf75994e4f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatus.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Graph.Beta.Models.IndustryData { + public enum IndustryDataRunStatus { + Running, + Failed, + Completed, + CompletedWithErrors, + CompletedWithWarnings, + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs new file mode 100644 index 00000000000..96673edea38 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class OutboundFlowActivity : IndustryDataRunActivity, IParsable { + /// + /// Instantiates a new OutboundFlowActivity and sets the default values. + /// + public OutboundFlowActivity() : base() { + OdataType = "#microsoft.graph.industryData.outboundFlowActivity"; + } + /// + /// 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 new OutboundFlowActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OutboundFlowActivity(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivityCollectionResponse.cs new file mode 100644 index 00000000000..2164e188594 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivityCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class OutboundFlowActivityCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new OutboundFlowActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OutboundFlowActivityCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(OutboundFlowActivity.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReadinessStatus.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReadinessStatus.cs new file mode 100644 index 00000000000..5c2c6437d6e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReadinessStatus.cs @@ -0,0 +1,10 @@ +namespace Microsoft.Graph.Beta.Models.IndustryData { + public enum ReadinessStatus { + NotReady, + Ready, + Failed, + Disabled, + Expired, + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs new file mode 100644 index 00000000000..7a656bfebdf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs @@ -0,0 +1,105 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class ReferenceDefinition : Entity, IParsable { + /// The code value for the definition that must be unique within the referenceType. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// The date and time when the definition was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? CreatedDateTime { + get { return BackingStore?.Get("createdDateTime"); } + set { BackingStore?.Set("createdDateTime", value); } + } + /// Indicates whether the definition has been disabled. + public bool? IsDisabled { + get { return BackingStore?.Get("isDisabled"); } + set { BackingStore?.Set("isDisabled", value); } + } + /// The date and time when the definition was most recently changed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastModifiedDateTime { + get { return BackingStore?.Get("lastModifiedDateTime"); } + set { BackingStore?.Set("lastModifiedDateTime", value); } + } + /// The categorical type for a collection of enumerated values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferenceType { + get { return BackingStore?.Get("referenceType"); } + set { BackingStore?.Set("referenceType", value); } + } +#nullable restore +#else + public string ReferenceType { + get { return BackingStore?.Get("referenceType"); } + set { BackingStore?.Set("referenceType", value); } + } +#endif + /// The ordering index to present the definitions within a type consistently in user interfaces. + public int? SortIndex { + get { return BackingStore?.Get("sortIndex"); } + set { BackingStore?.Set("sortIndex", value); } + } + /// The standards body or organization source which defined the code. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#nullable restore +#else + public string Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#endif + /// + /// 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 new ReferenceDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ReferenceDefinition(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"code", n => { Code = n.GetStringValue(); } }, + {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + {"isDisabled", n => { IsDisabled = n.GetBoolValue(); } }, + {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + {"referenceType", n => { ReferenceType = n.GetStringValue(); } }, + {"sortIndex", n => { SortIndex = n.GetIntValue(); } }, + {"source", n => { Source = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("code", Code); + writer.WriteBoolValue("isDisabled", IsDisabled); + writer.WriteStringValue("referenceType", ReferenceType); + writer.WriteIntValue("sortIndex", SortIndex); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs new file mode 100644 index 00000000000..85179e502de --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class ReferenceDefinitionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new ReferenceDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ReferenceDefinitionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(ReferenceDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs new file mode 100644 index 00000000000..b18119061d1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs @@ -0,0 +1,102 @@ +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.Beta.Models.IndustryData { + public class ReferenceValue : 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 code of the desired referenceDefinition entry. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// 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 value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ReferenceDefinition? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public ReferenceDefinition Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new referenceValue and sets the default values. + /// + public ReferenceValue() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 ReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.identifierTypeReferenceValue" => new IdentifierTypeReferenceValue(), + "#microsoft.graph.industryData.roleReferenceValue" => new RoleReferenceValue(), + "#microsoft.graph.industryData.userMatchTargetReferenceValue" => new UserMatchTargetReferenceValue(), + "#microsoft.graph.industryData.yearReferenceValue" => new YearReferenceValue(), + _ => new ReferenceValue(), + }; + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"code", n => { Code = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetObjectValue(ReferenceDefinition.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// 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("code", Code); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs new file mode 100644 index 00000000000..963c519bfa3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs @@ -0,0 +1,64 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class RoleGroup : Entity, IParsable { + /// The name of the role group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The set of roles included in the role group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Roles { + get { return BackingStore?.Get?>("roles"); } + set { BackingStore?.Set("roles", value); } + } +#nullable restore +#else + public List Roles { + get { return BackingStore?.Get>("roles"); } + set { BackingStore?.Set("roles", value); } + } +#endif + /// + /// 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 new RoleGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleGroup(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"roles", n => { Roles = n.GetCollectionOfObjectValues(RoleReferenceValue.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteCollectionOfObjectValues("roles", Roles); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs new file mode 100644 index 00000000000..428dc5fb5bc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class RoleGroupCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new RoleGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleGroupCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(RoleGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs new file mode 100644 index 00000000000..5b926fc664a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class RoleReferenceValue : ReferenceValue, IParsable { + /// + /// Instantiates a new RoleReferenceValue and sets the default values. + /// + public RoleReferenceValue() : base() { + OdataType = "#microsoft.graph.industryData.roleReferenceValue"; + } + /// + /// 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 new RoleReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleReferenceValue(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValueCollectionResponse.cs new file mode 100644 index 00000000000..bbef5650603 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValueCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class RoleReferenceValueCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new RoleReferenceValueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RoleReferenceValueCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(RoleReferenceValue.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs new file mode 100644 index 00000000000..b66917b51e6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs @@ -0,0 +1,80 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class SourceSystemDefinition : Entity, IParsable { + /// The name of the source system. Maximum supported length is 100 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// A collection of user matching settings by roleGroup. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? UserMatchingSettings { + get { return BackingStore?.Get?>("userMatchingSettings"); } + set { BackingStore?.Set("userMatchingSettings", value); } + } +#nullable restore +#else + public List UserMatchingSettings { + get { return BackingStore?.Get>("userMatchingSettings"); } + set { BackingStore?.Set("userMatchingSettings", value); } + } +#endif + /// The name of the vendor who supplies the source system. Maximum supported length is 100 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Vendor { + get { return BackingStore?.Get("vendor"); } + set { BackingStore?.Set("vendor", value); } + } +#nullable restore +#else + public string Vendor { + get { return BackingStore?.Get("vendor"); } + set { BackingStore?.Set("vendor", value); } + } +#endif + /// + /// 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 new SourceSystemDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SourceSystemDefinition(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"userMatchingSettings", n => { UserMatchingSettings = n.GetCollectionOfObjectValues(UserMatchingSetting.CreateFromDiscriminatorValue)?.ToList(); } }, + {"vendor", n => { Vendor = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteCollectionOfObjectValues("userMatchingSettings", UserMatchingSettings); + writer.WriteStringValue("vendor", Vendor); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs new file mode 100644 index 00000000000..3e963ea8950 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class SourceSystemDefinitionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new SourceSystemDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SourceSystemDefinitionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(SourceSystemDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs new file mode 100644 index 00000000000..fe3a63365ac --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class UserMatchTargetReferenceValue : ReferenceValue, IParsable { + /// + /// Instantiates a new UserMatchTargetReferenceValue and sets the default values. + /// + public UserMatchTargetReferenceValue() : base() { + OdataType = "#microsoft.graph.industryData.userMatchTargetReferenceValue"; + } + /// + /// 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 new UserMatchTargetReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserMatchTargetReferenceValue(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs new file mode 100644 index 00000000000..ebf3738d2ce --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs @@ -0,0 +1,118 @@ +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.Beta.Models.IndustryData { + public class UserMatchingSetting : 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 RefUserMatchTarget for matching a user from the source with an Azure Active Directory user object. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public UserMatchTargetReferenceValue? MatchTarget { + get { return BackingStore?.Get("matchTarget"); } + set { BackingStore?.Set("matchTarget", value); } + } +#nullable restore +#else + public UserMatchTargetReferenceValue MatchTarget { + get { return BackingStore?.Get("matchTarget"); } + set { BackingStore?.Set("matchTarget", value); } + } +#endif + /// 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 priority order to apply when a user has multiple RefRole codes assigned. + public int? PriorityOrder { + get { return BackingStore?.Get("priorityOrder"); } + set { BackingStore?.Set("priorityOrder", value); } + } + /// The roleGroup property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Beta.Models.IndustryData.RoleGroup? RoleGroup { + get { return BackingStore?.Get("roleGroup"); } + set { BackingStore?.Set("roleGroup", value); } + } +#nullable restore +#else + public Microsoft.Graph.Beta.Models.IndustryData.RoleGroup RoleGroup { + get { return BackingStore?.Get("roleGroup"); } + set { BackingStore?.Set("roleGroup", value); } + } +#endif + /// The sourceIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public IdentifierTypeReferenceValue? SourceIdentifier { + get { return BackingStore?.Get("sourceIdentifier"); } + set { BackingStore?.Set("sourceIdentifier", value); } + } +#nullable restore +#else + public IdentifierTypeReferenceValue SourceIdentifier { + get { return BackingStore?.Get("sourceIdentifier"); } + set { BackingStore?.Set("sourceIdentifier", value); } + } +#endif + /// + /// Instantiates a new userMatchingSetting and sets the default values. + /// + public UserMatchingSetting() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// 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 UserMatchingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserMatchingSetting(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"matchTarget", n => { MatchTarget = n.GetObjectValue(UserMatchTargetReferenceValue.CreateFromDiscriminatorValue); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"priorityOrder", n => { PriorityOrder = n.GetIntValue(); } }, + {"roleGroup", n => { RoleGroup = n.GetObjectValue(Microsoft.Graph.Beta.Models.IndustryData.RoleGroup.CreateFromDiscriminatorValue); } }, + {"sourceIdentifier", n => { SourceIdentifier = n.GetObjectValue(IdentifierTypeReferenceValue.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// 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.WriteObjectValue("matchTarget", MatchTarget); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("priorityOrder", PriorityOrder); + writer.WriteObjectValue("roleGroup", RoleGroup); + writer.WriteObjectValue("sourceIdentifier", SourceIdentifier); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSettingCollectionResponse.cs new file mode 100644 index 00000000000..5d3e09ef999 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSettingCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class UserMatchingSettingCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new UserMatchingSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new UserMatchingSettingCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(UserMatchingSetting.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs new file mode 100644 index 00000000000..11cc31175b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs @@ -0,0 +1,66 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class ValidateOperation : LongRunningOperation, IParsable { + /// Set of errors discovered through validation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { + get { return BackingStore?.Get?>("errors"); } + set { BackingStore?.Set("errors", value); } + } +#nullable restore +#else + public List Errors { + get { return BackingStore?.Get>("errors"); } + set { BackingStore?.Set("errors", value); } + } +#endif + /// Set of warnings discovered through validation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Warnings { + get { return BackingStore?.Get?>("warnings"); } + set { BackingStore?.Set("warnings", value); } + } +#nullable restore +#else + public List Warnings { + get { return BackingStore?.Get>("warnings"); } + set { BackingStore?.Set("warnings", value); } + } +#endif + /// + /// 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 new ValidateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch { + "#microsoft.graph.industryData.fileValidateOperation" => new FileValidateOperation(), + _ => new ValidateOperation(), + }; + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"errors", n => { Errors = n.GetCollectionOfObjectValues(Microsoft.Graph.Beta.Models.PublicError.CreateFromDiscriminatorValue)?.ToList(); } }, + {"warnings", n => { Warnings = n.GetCollectionOfObjectValues(Microsoft.Graph.Beta.Models.PublicError.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperationCollectionResponse.cs new file mode 100644 index 00000000000..1a712113716 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperationCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class ValidateOperationCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new ValidateOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ValidateOperationCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(ValidateOperation.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs new file mode 100644 index 00000000000..f4e834f68fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs @@ -0,0 +1,38 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class YearReferenceValue : ReferenceValue, IParsable { + /// + /// Instantiates a new YearReferenceValue and sets the default values. + /// + public YearReferenceValue() : base() { + OdataType = "#microsoft.graph.industryData.yearReferenceValue"; + } + /// + /// 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 new YearReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new YearReferenceValue(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs new file mode 100644 index 00000000000..acbd960f539 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class YearTimePeriodDefinition : Entity, IParsable { + /// The name of the year. Maximum supported length is 100 characters. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The last day of the year using ISO 8601 format for date. + public Date? EndDate { + get { return BackingStore?.Get("endDate"); } + set { BackingStore?.Set("endDate", value); } + } + /// The first day of the year using ISO 8601 format for date. + public Date? StartDate { + get { return BackingStore?.Get("startDate"); } + set { BackingStore?.Set("startDate", value); } + } + /// The year property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public YearReferenceValue? Year { + get { return BackingStore?.Get("year"); } + set { BackingStore?.Set("year", value); } + } +#nullable restore +#else + public YearReferenceValue Year { + get { return BackingStore?.Get("year"); } + set { BackingStore?.Set("year", value); } + } +#endif + /// + /// 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 new YearTimePeriodDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new YearTimePeriodDefinition(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"displayName", n => { DisplayName = n.GetStringValue(); } }, + {"endDate", n => { EndDate = n.GetDateValue(); } }, + {"startDate", n => { StartDate = n.GetDateValue(); } }, + {"year", n => { Year = n.GetObjectValue(YearReferenceValue.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteDateValue("endDate", EndDate); + writer.WriteDateValue("startDate", StartDate); + writer.WriteObjectValue("year", Year); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs new file mode 100644 index 00000000000..d1de76989c6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models.IndustryData { + public class YearTimePeriodDefinitionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new YearTimePeriodDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new YearTimePeriodDefinitionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(YearTimePeriodDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/KeyValue.cs b/src/Microsoft.Graph/Generated/Models/KeyValue.cs index 9f69aa7fc15..b98dc8f57a8 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyValue.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyValue.cs @@ -13,7 +13,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// Contains the name of the field that a value is associated with. When a sign in or domain hint is included in the sign-in request, corresponding fields are included as key-value pairs. Possible keys: Login hint present, Domain hint present. + /// Key. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Key { @@ -41,7 +41,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// Contains the corresponding value for the specified key. The value is true if a sign in hint was included in the sign-in request; otherwise false. The value is true if a domain hint was included in the sign-in request; otherwise false. + /// Value. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Value { diff --git a/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs b/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs index acc79056c8e..f345c107863 100644 --- a/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs @@ -46,6 +46,20 @@ public string SubscriptionId { get { return BackingStore?.Get("subscriptionId"); } set { BackingStore?.Set("subscriptionId", value); } } +#endif + /// The URL to the logic app endpoint that will be triggered. Only required for app-only token scenarios where app is creating a customCalloutExtension without a signed-in user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#nullable restore +#else + public string Url { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } #endif /// /// Instantiates a new LogicAppTriggerEndpointConfiguration and sets the default values. @@ -69,6 +83,7 @@ public LogicAppTriggerEndpointConfiguration() : base() { {"logicAppWorkflowName", n => { LogicAppWorkflowName = n.GetStringValue(); } }, {"resourceGroupName", n => { ResourceGroupName = n.GetStringValue(); } }, {"subscriptionId", n => { SubscriptionId = n.GetStringValue(); } }, + {"url", n => { Url = n.GetStringValue(); } }, }; } /// @@ -81,6 +96,7 @@ public LogicAppTriggerEndpointConfiguration() : base() { writer.WriteStringValue("logicAppWorkflowName", LogicAppWorkflowName); writer.WriteStringValue("resourceGroupName", ResourceGroupName); writer.WriteStringValue("subscriptionId", SubscriptionId); + writer.WriteStringValue("url", Url); } } } diff --git a/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs b/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs index 0fbdc98d8f4..afd7bf51aa1 100644 --- a/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs @@ -1,3 +1,4 @@ +using Microsoft.Graph.Beta.Models.IndustryData; using Microsoft.Kiota.Abstractions.Serialization; using System; using System.Collections.Generic; @@ -57,6 +58,8 @@ public string StatusDetail { var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { "#microsoft.graph.attackSimulationOperation" => new AttackSimulationOperation(), + "#microsoft.graph.industryData.fileValidateOperation" => new FileValidateOperation(), + "#microsoft.graph.industryData.validateOperation" => new ValidateOperation(), "#microsoft.graph.richLongRunningOperation" => new RichLongRunningOperation(), _ => new LongRunningOperation(), }; diff --git a/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs index e98c91c3a6d..c444d182389 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs @@ -5,7 +5,7 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models { public class MacOsLobAppAssignmentSettings : MobileAppAssignmentSettings, IParsable { - /// When TRUE, indicates that the app should be uninstalled when the device is removed from Intune. When FALSE, indicates that the app will not be uninstalled when the device is removed from Intune. + /// Whether or not to uninstall the app when device is removed from Intune. public bool? UninstallOnDeviceRemoval { get { return BackingStore?.Get("uninstallOnDeviceRemoval"); } set { BackingStore?.Set("uninstallOnDeviceRemoval", value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs index 4a17515947d..bb361519da1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// The ManagedAppEntity is the base entity type for all other entity types under app management workflow. - /// public class ManagedAppRegistration : Entity, IParsable { /// The app package Identifier #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs index b013be9c764..7568775622a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// Devices that are managed or pre-enrolled through Intune - /// public class ManagedDevice : Entity, IParsable { /// Whether the device is Azure Active Directory registered. This property is read-only. public bool? AadRegistered { diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs index 730751b3122..bb7b1ea4865 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// An abstract class for Mobile app configuration for enrolled devices. - /// public class ManagedDeviceMobileAppConfiguration : Entity, IParsable { /// The list of group assignemenets for app configration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/Message.cs b/src/Microsoft.Graph/Generated/Models/Message.cs index c9078f77b10..0c8f63d66e2 100644 --- a/src/Microsoft.Graph/Generated/Models/Message.cs +++ b/src/Microsoft.Graph/Generated/Models/Message.cs @@ -392,7 +392,7 @@ public string WebLink { } #endif /// - /// Instantiates a new message and sets the default values. + /// Instantiates a new Message and sets the default values. /// public Message() : base() { OdataType = "#microsoft.graph.message"; diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs index d162c3785ff..eeb6844a6b3 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// MobileApp Intent and Install State for a given device. - /// public class MobileAppIntentAndState : Entity, IParsable { /// Device identifier created or collected by Intune. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTask.cs b/src/Microsoft.Graph/Generated/Models/OutlookTask.cs index e4659096c97..949eb0d7cf0 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTask.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTask.cs @@ -213,7 +213,7 @@ public string Subject { } #endif /// - /// Instantiates a new outlookTask and sets the default values. + /// Instantiates a new OutlookTask and sets the default values. /// public OutlookTask() : base() { OdataType = "#microsoft.graph.outlookTask"; diff --git a/src/Microsoft.Graph/Generated/Models/PublicErrorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PublicErrorCollectionResponse.cs new file mode 100644 index 00000000000..7896dba4f37 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/PublicErrorCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +namespace Microsoft.Graph.Beta.Models { + public class PublicErrorCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// 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 new PublicErrorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new PublicErrorCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(PublicError.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index 6d04bf3106e..cd7598e211d 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.Beta.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/EdiscoveryExportOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs index 3142908104c..12275a230a6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs @@ -5,7 +5,7 @@ using System.Linq; namespace Microsoft.Graph.Beta.Models.Security { public class EdiscoveryExportOperation : CaseOperation, IParsable { - /// The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. + /// The azureBlobContainer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AzureBlobContainer { @@ -19,7 +19,7 @@ public string AzureBlobContainer { set { BackingStore?.Set("azureBlobContainer", value); } } #endif - /// The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. + /// The azureBlobToken property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AzureBlobToken { @@ -61,7 +61,7 @@ public List ExportFileM set { BackingStore?.Set("exportFileMetadata", value); } } #endif - /// The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. + /// The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. The fileInfo member is deprecated and will stop returning data on April 30th, 2023. Going forward, the summary and load file are always included. public Microsoft.Graph.Beta.Models.Security.ExportOptions? ExportOptions { get { return BackingStore?.Get("exportOptions"); } set { BackingStore?.Set("exportOptions", value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs index 4bbb3618c6d..bdb30aeac9f 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/Site.cs b/src/Microsoft.Graph/Generated/Models/Site.cs index 7510ca41f1d..bd618e87b53 100644 --- a/src/Microsoft.Graph/Generated/Models/Site.cs +++ b/src/Microsoft.Graph/Generated/Models/Site.cs @@ -301,7 +301,7 @@ public Store TermStore { } #endif /// - /// Instantiates a new site and sets the default values. + /// Instantiates a new Site and sets the default values. /// public Site() : base() { OdataType = "#microsoft.graph.site"; diff --git a/src/Microsoft.Graph/Generated/Models/SitePage.cs b/src/Microsoft.Graph/Generated/Models/SitePage.cs index 41581619253..a94b90c6f69 100644 --- a/src/Microsoft.Graph/Generated/Models/SitePage.cs +++ b/src/Microsoft.Graph/Generated/Models/SitePage.cs @@ -138,7 +138,7 @@ public List WebParts { } #endif /// - /// Instantiates a new SitePage and sets the default values. + /// Instantiates a new sitePage and sets the default values. /// public SitePage() : base() { OdataType = "#microsoft.graph.sitePage"; diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs index b4075fb4eb4..eee7d350581 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.Beta.Models { public class TeamworkTag : Entity, IParsable { - /// Tag description as it will appear to the user in Microsoft Teams. + /// Tag description 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/User.cs b/src/Microsoft.Graph/Generated/Models/User.cs index ec909a3f021..792c18ba7b9 100644 --- a/src/Microsoft.Graph/Generated/Models/User.cs +++ b/src/Microsoft.Graph/Generated/Models/User.cs @@ -1686,7 +1686,7 @@ public bool? ShowInAddressList { get { return BackingStore?.Get("showInAddressList"); } set { BackingStore?.Set("showInAddressList", value); } } - /// Get the last signed-in date and request ID of the sign-in for a given user. Read-only.Returned only on $select. Supports $filter (eq, ne, not, ge, le) but, not with any other filterable properties. Note: Details for this property require an Azure AD Premium P1/P2 license and the AuditLog.Read.All permission.Note: There's a known issue with retrieving this property.This property is not returned for a user who has never signed in or last signed in before April 2020. + /// Get the last signed-in date and request ID of the sign-in for a given user. Read-only.Returned only on $select. Supports $filter (eq, ne, not, ge, le) but not with any other filterable properties. Note: Details for this property require an Azure AD Premium P1/P2 license and the AuditLog.Read.All permission.There's a known issue with retrieving this property.This property is not returned for a user who has never signed in or last signed in before April 2020. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public Microsoft.Graph.Beta.Models.SignInActivity? SignInActivity { @@ -1888,7 +1888,7 @@ public List WindowsInformationPr } #endif /// - /// Instantiates a new user and sets the default values. + /// Instantiates a new User and sets the default values. /// public User() : base() { OdataType = "#microsoft.graph.user"; diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs index 85f61161cdb..56b740bf5a0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs @@ -4,6 +4,9 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { + /// + /// Windows Autopilot Deployment Profile + /// public class WindowsAutopilotDeploymentProfile : Entity, IParsable { /// The list of assigned devices for the profile. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs index cdca62fa3bf..0451f0f3609 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs @@ -4,9 +4,6 @@ using System.IO; using System.Linq; namespace Microsoft.Graph.Beta.Models { - /// - /// Represents device registration records for Bring-Your-Own-Device(BYOD) Windows devices. - /// public class WindowsInformationProtectionDeviceRegistration : Entity, IParsable { /// Device Mac address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs index 168881edc39..b22971460c2 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs @@ -79,8 +79,8 @@ public async Task GetAsync(Action(requestInfo, ConnectorGroupCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create a connectorGroup object. - /// Find more info here + /// Create a new connectorGroup. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -127,7 +127,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a connectorGroup object. + /// Create a new connectorGroup. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 4e2318748d4..7014da06ee4 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -59,8 +59,8 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt RequestAdapter = requestAdapter; } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. - /// Find more info here + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -101,7 +101,7 @@ public async Task PostAsync(UnifiedRoleAssignment return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleAssignmentMultiple.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(UnifiedRoleAssignmentMultiple return requestInfo; } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. /// public class RoleAssignmentsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 2b0b97aafd7..94ac9f389e2 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -59,8 +59,8 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt RequestAdapter = requestAdapter; } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. - /// Find more info here + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -101,7 +101,7 @@ public async Task PostAsync(UnifiedRoleAssignment return await RequestAdapter.SendAsync(requestInfo, UnifiedRoleAssignmentMultiple.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(UnifiedRoleAssignmentMultiple return requestInfo; } /// - /// Get a list of unifiedRoleAssignmentMultiple objects for an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. + /// Get the properties and relationships of a unifiedRoleAssignmentMultiple object of an RBAC provider. The following RBAC providers are currently supported:- Cloud PC - device management (Intune) For other Microsoft 365 applications (like Azure AD), use unifiedRoleAssignment. /// public class RoleAssignmentsRequestBuilderGetQueryParameters { /// Include count of items 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..746bcab1ea3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..b88f1ab5f4e --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.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.Beta.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 30cb5811821..59a12e66c29 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.ServicePrincipals.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.ServicePrincipals.Item.MemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..b83c3a15625 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 48579fbc56a..06bc8dd39e7 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.ServicePrincipals.Item.MemberOf.Count; +using Microsoft.Graph.Beta.ServicePrincipals.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.ServicePrincipals.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.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..dc6c27a805a --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..2f198220a38 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.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.Beta.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 dcd1f41b4f5..05597f90ff7 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.ServicePrincipals.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.ServicePrincipals.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..c4cdb75e7bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 c71ba614727..dacae0ffc74 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.ServicePrincipals.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.ServicePrincipals.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.ServicePrincipals.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.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/Sites/SitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs index a4bc1de3c65..9bc4fdee474 100644 --- a/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs @@ -74,8 +74,8 @@ public SitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. - /// Find more info here + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -94,7 +94,7 @@ public async Task GetAsync(Action(requestInfo, SiteCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -120,7 +120,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Search across a SharePoint tenant for [sites][] that match keywords provided. The only property that works for sorting is **createdDateTime**. The search filter is a free text search that uses multiple properties when retrieving the search results. + /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// public class SitesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs index 79a517a1bc4..cbdcd5f72b0 100644 --- a/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 167b991c5d5..6179badbf3f 100644 --- a/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/TeamTemplateDefinition/Item/TeamDefinition/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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 47d6a765348..76c13219bd4 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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 19fee5bdb7d..08eb0730afd 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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// 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 30852df01b5..f393f0dee06 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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs index d63ab2cbb41..ba3beedfc00 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 0b39af66549..64599015455 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/Item/Definitions/Item/TeamDefinition/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. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/TeamTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/TeamTemplatesRequestBuilder.cs index d29f333fe8a..9cbde27a08a 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/TeamTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/TeamTemplates/TeamTemplatesRequestBuilder.cs @@ -59,8 +59,8 @@ public TeamTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter RequestAdapter = requestAdapter; } /// - /// List the teamTemplateDefinition objects associated with a teamTemplate. - /// Find more info here + /// Get the list of teamTemplate objects that are available for a tenant. + /// 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(TeamTemplate body, Action(requestInfo, TeamTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List the teamTemplateDefinition objects associated with a teamTemplate. + /// Get the list of teamTemplate objects that are available for a tenant. /// /// 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(TeamTemplate body, Action - /// List the teamTemplateDefinition objects associated with a teamTemplate. + /// Get the list of teamTemplate objects that are available for a tenant. /// public class TeamTemplatesRequestBuilderGetQueryParameters { /// Include count of items 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 7786f23b72a..c6c9dca7872 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. - /// Find more info here + /// Send a new chatMessage in the specified channel or a chat. + /// 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 chat. This API cannot create a new chat; you must use the list chats method to retrieve the ID of an existing chat before creating a chat message. + /// Send a new chatMessage in the specified channel or a chat. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..c352c7fe5e2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..319885da742 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.Devices.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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/Users/Item/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 170dd20618d..9f6e9dba99e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.Devices.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.Devices.Item.MemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.Users.Item.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/Users/Item/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..e40d7d50289 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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.Beta.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/Devices/Item/MemberOf/MemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/MemberOfRequestBuilder.cs index 9956ebef0bd..79a6770a9fd 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.Users.Item.Devices.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Users.Item.Devices.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.Devices.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.Users.Item.Devices.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/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..864192bfe3b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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/Users/Item/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..4ac9863c384 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.Devices.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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/Users/Item/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 501ab6e64a7..c9d6b3bf982 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,5 +1,6 @@ using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.Devices.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.Devices.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.Users.Item.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/Users/Item/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs new file mode 100644 index 00000000000..dffe5cf1b48 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.Users.Item.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}/users/{user%2Did}/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}/users/{user%2Did}/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.Beta.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/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index d6e59a5feb5..1c182071b83 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Devices/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,6 +1,7 @@ using Microsoft.Graph.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.Users.Item.Devices.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Users.Item.Devices.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.Devices.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.Users.Item.Devices.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/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 e3a7028b398..4c9b405f0d8 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 @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// 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/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index a9861f364bc..a1e4ce2aa49 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 @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. 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..99b3db68d80 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..1d768db38e3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.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.Beta.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 64b584d02fb..bf699704697 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.MemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.MemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..931125c7a99 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/MemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 f9b1ec0706f..ddb1cb4c308 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.Users.Item.MemberOf.Count; +using Microsoft.Graph.Beta.Users.Item.MemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.MemberOf.GraphGroup; using Microsoft.Graph.Beta.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 daa027aff05..42be82cae50 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 @@ -84,8 +84,8 @@ public async Task GetAsync(Action(requestInfo, AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -132,7 +132,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a new message that is being drafted, or created and sent on the fly. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. 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 2dc18e3bdb1..63455ae0022 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 fd1f6f8f2d9..2dbf4db6754 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs @@ -64,8 +64,8 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { 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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. 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.Beta.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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. 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,7 +160,7 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Beta.Models.M 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. You can filter on the messages and get only those that include a mention of the signed-in user. See an example below. By default, the `GET /me/messages` operation does not return the **mentions** property. Use the `$expand` query parameter to find details of each mention in a message. There are two scenarios where an app can get messages in another user's mail folder: /// public class MessagesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Users/Item/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index 881e3d2d322..97f2a4a29f4 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -52,8 +52,8 @@ public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) RequestAdapter = requestAdapter; } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. - /// Find more info here + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -114,7 +114,7 @@ public async Task PatchAsync(MeetingRegistration body, Acti return await RequestAdapter.SendAsync(requestInfo, MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER 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..2fc1e72faaf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -0,0 +1,137 @@ +using Microsoft.Graph.Beta.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.Beta.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..e21c5b232df --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,182 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.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.Beta.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 2ebbff50555..9aa8ac0e809 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; +using Microsoft.Graph.Beta.Users.Item.TransitiveMemberOf.Item.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.TransitiveMemberOf.Item.GraphGroup; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,6 +15,10 @@ namespace Microsoft.Graph.Beta.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..bce2ec9e556 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Users/Item/TransitiveMemberOf/Item/GraphAdministrativeUnit/GraphAdministrativeUnitRequestBuilder.cs @@ -0,0 +1,138 @@ +using Microsoft.Graph.Beta.Models; +using Microsoft.Graph.Beta.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.Beta.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.Beta.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 42f90db75b4..9501a4bf652 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.Beta.Models; using Microsoft.Graph.Beta.Models.ODataErrors; using Microsoft.Graph.Beta.Users.Item.TransitiveMemberOf.Count; +using Microsoft.Graph.Beta.Users.Item.TransitiveMemberOf.GraphAdministrativeUnit; using Microsoft.Graph.Beta.Users.Item.TransitiveMemberOf.GraphGroup; using Microsoft.Graph.Beta.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 c1798161d4b..7990e4a727e 100644 --- a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs @@ -89,8 +89,8 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { RequestAdapter = requestAdapter; } /// - /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. - /// Find more info here + /// Retrieve a list of user objects. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -131,7 +131,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Beta.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. + /// Retrieve a list of user objects. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -185,7 +185,7 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Beta.Models.U return requestInfo; } /// - /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. Because the **user** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **user** instance. + /// Retrieve a list of user objects. This operation returns by default only a subset of the more commonly used properties for each user. These _default_ properties are noted in the Properties section. To get properties that are _not_ returned by default, do a GET operation for the user and specify the properties in a `$select` OData query option. /// 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 194d5f2dfe3..6e5a8c5fd0a 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "9A36FC93BA2C3B398ED35E679B9A80DDB2F42713B0F0AE383790F23B704B8D9BDE4C926B0871C88821F619876462A0B37C5014C1811165F79E8A1E4D4602DD38", + "descriptionHash": "12C3B38BFF684696273A5695AFDDA87E516B257202396F5F4D70386878295721AFFC1718DACD7D60A034D7568B95774432CFF8592AC255AEBF18A0D4A0FF2529", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_beta_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.0.1", diff --git a/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj b/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj index f8d80fc6b80..5820b577bbd 100644 --- a/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj +++ b/src/Microsoft.Graph/Microsoft.Graph.Beta.csproj @@ -22,10 +22,10 @@ 35MSSharedLib1024.snk true -- Latest metadata updates from 14th March 2023 snapshot. +- https://github.com/microsoftgraph/msgraph-beta-sdk-dotnet/blob/master/CHANGELOG.md - 5.22.0 + 5.23.0 diff --git a/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs b/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs index a064003d619..0b6edc37e3e 100644 --- a/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs +++ b/tests/Microsoft.Graph.DotnetCore.Test/Models/ModelSerializationTests.cs @@ -9,6 +9,7 @@ namespace Microsoft.Graph.DotnetCore.Test.Models using Microsoft.Graph.Beta.Models; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Serialization.Json; + using System.Collections.Generic; using System.IO; using System.Text; @@ -159,7 +160,6 @@ public void SerializeAndDeserializeKnownEnumValue() Assert.Null(itemBody.AdditionalData); } - [Fact(Skip = "TODO fix pending odata.type bug")] public void SerializeDateValue() { var now = DateTimeOffset.UtcNow; @@ -198,5 +198,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()); + } } }